Class UpdateCampaignAssetRequest

All Implemented Interfaces:
SdkPojo, ToCopyableBuilder<UpdateCampaignAssetRequest.Builder,UpdateCampaignAssetRequest>

@Generated("software.amazon.awssdk:codegen") public final class UpdateCampaignAssetRequest extends PartnerCentralMarketingRequest implements ToCopyableBuilder<UpdateCampaignAssetRequest.Builder,UpdateCampaignAssetRequest>

Input for UpdateCampaignAsset operation.

  • Method Details

    • catalog

      public final Catalog catalog()

      The catalog (AWS or Sandbox).

      If the service returns an enum value that is not available in the current SDK version, catalog will return Catalog.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from catalogAsString().

      Returns:
      The catalog (AWS or Sandbox).
      See Also:
    • catalogAsString

      public final String catalogAsString()

      The catalog (AWS or Sandbox).

      If the service returns an enum value that is not available in the current SDK version, catalog will return Catalog.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from catalogAsString().

      Returns:
      The catalog (AWS or Sandbox).
      See Also:
    • campaignIdentifier

      public final String campaignIdentifier()

      The campaign identifier.

      Returns:
      The campaign identifier.
    • campaignAssetIdentifier

      public final String campaignAssetIdentifier()

      The asset identifier.

      Returns:
      The asset identifier.
    • hasFieldValues

      public final boolean hasFieldValues()
      For responses, this returns true if the service returned a value for the FieldValues property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
    • fieldValues

      public final List<FieldValueInput> fieldValues()

      Value-only updates to the asset's pinned template fields, keyed by FieldId. The field schema (labels, descriptions, constraints, placeholders, image defaults) is service-owned and pinned at instantiation, so clients send only the values they are changing. Fields omitted keep their stored values; send the entry with Value omitted to clear one.

      Named FieldValues to match the member it edits on CampaignAsset, which is the same concept read back. It was templateFieldUpdates; the two names for one concept were the defect, not the length.

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasFieldValues() method.

      Returns:
      Value-only updates to the asset's pinned template fields, keyed by FieldId. The field schema (labels, descriptions, constraints, placeholders, image defaults) is service-owned and pinned at instantiation, so clients send only the values they are changing. Fields omitted keep their stored values; send the entry with Value omitted to clear one.

      Named FieldValues to match the member it edits on CampaignAsset, which is the same concept read back. It was templateFieldUpdates; the two names for one concept were the defect, not the length.

    • layout

      public final String layout()

      Selects a multi-layout asset's layout: one of the values in CampaignAsset.layout.options.

      PATCH: omitted leaves the selection unchanged, and there is no way to clear it. A value that is not one of the asset's options — or any value on a single-layout asset — is a plain ValidationException, and nothing in the call is applied. Every pinned field stays writable whichever layout is selected.

      Returns:
      Selects a multi-layout asset's layout: one of the values in CampaignAsset.layout.options .

      PATCH: omitted leaves the selection unchanged, and there is no way to clear it. A value that is not one of the asset's options — or any value on a single-layout asset — is a plain ValidationException, and nothing in the call is applied. Every pinned field stays writable whichever layout is selected.

    • sendMode

      public final SendMode sendMode()

      When a sendable asset (EMAIL, SOCIAL_POST) sends: on activation, or at ScheduledSendAt.

      A mode beside a value rather than a union, on purpose: ScheduledSendAt stays a plain Timestamp, and the precedent is EventBridge Scheduler's FlexibleTimeWindow { Mode, MaximumWindowInMinutes }. The pair is checked as one, and a request where they disagree is refused with ValidationException (INVALID_VALUE, naming the member) and applies nothing:

      • SCHEDULED requires ScheduledSendAt; a reschedule resends SCHEDULED with the new time;
      • ON_ACTIVATION forbids ScheduledSendAt, and drops any time already stored;
      • ScheduledSendAt without SendMode is refused.

      PATCH: omitted leaves both unchanged. Until a mode is chosen the asset reports SEND_MODE_MISSING and does not activate: no default, because an unchosen send mails the real audience. Rejected with ValidationException (NOT_SUPPORTED_FOR_CATEGORY) for a category that has no send ( LANDING_PAGE, DOCUMENT, BANNER_AD). Like every other edit, it reaches the delivery platform at the asset's next activation, and a live email or social post refuses it ( ASSET_ALREADY_ACTIVE): deactivate first.

      If the service returns an enum value that is not available in the current SDK version, sendMode will return SendMode.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from sendModeAsString().

      Returns:
      When a sendable asset (EMAIL, SOCIAL_POST) sends: on activation, or at ScheduledSendAt.

      A mode beside a value rather than a union, on purpose: ScheduledSendAt stays a plain Timestamp, and the precedent is EventBridge Scheduler's FlexibleTimeWindow { Mode, MaximumWindowInMinutes }. The pair is checked as one, and a request where they disagree is refused with ValidationException (INVALID_VALUE, naming the member) and applies nothing:

      • SCHEDULED requires ScheduledSendAt; a reschedule resends SCHEDULED with the new time;
      • ON_ACTIVATION forbids ScheduledSendAt, and drops any time already stored;
      • ScheduledSendAt without SendMode is refused.

      PATCH: omitted leaves both unchanged. Until a mode is chosen the asset reports SEND_MODE_MISSING and does not activate: no default, because an unchosen send mails the real audience. Rejected with ValidationException (NOT_SUPPORTED_FOR_CATEGORY) for a category that has no send (LANDING_PAGE, DOCUMENT, BANNER_AD). Like every other edit, it reaches the delivery platform at the asset's next activation, and a live email or social post refuses it (ASSET_ALREADY_ACTIVE): deactivate first.

      See Also:
    • sendModeAsString

      public final String sendModeAsString()

      When a sendable asset (EMAIL, SOCIAL_POST) sends: on activation, or at ScheduledSendAt.

      A mode beside a value rather than a union, on purpose: ScheduledSendAt stays a plain Timestamp, and the precedent is EventBridge Scheduler's FlexibleTimeWindow { Mode, MaximumWindowInMinutes }. The pair is checked as one, and a request where they disagree is refused with ValidationException (INVALID_VALUE, naming the member) and applies nothing:

      • SCHEDULED requires ScheduledSendAt; a reschedule resends SCHEDULED with the new time;
      • ON_ACTIVATION forbids ScheduledSendAt, and drops any time already stored;
      • ScheduledSendAt without SendMode is refused.

      PATCH: omitted leaves both unchanged. Until a mode is chosen the asset reports SEND_MODE_MISSING and does not activate: no default, because an unchosen send mails the real audience. Rejected with ValidationException (NOT_SUPPORTED_FOR_CATEGORY) for a category that has no send ( LANDING_PAGE, DOCUMENT, BANNER_AD). Like every other edit, it reaches the delivery platform at the asset's next activation, and a live email or social post refuses it ( ASSET_ALREADY_ACTIVE): deactivate first.

      If the service returns an enum value that is not available in the current SDK version, sendMode will return SendMode.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from sendModeAsString().

      Returns:
      When a sendable asset (EMAIL, SOCIAL_POST) sends: on activation, or at ScheduledSendAt.

      A mode beside a value rather than a union, on purpose: ScheduledSendAt stays a plain Timestamp, and the precedent is EventBridge Scheduler's FlexibleTimeWindow { Mode, MaximumWindowInMinutes }. The pair is checked as one, and a request where they disagree is refused with ValidationException (INVALID_VALUE, naming the member) and applies nothing:

      • SCHEDULED requires ScheduledSendAt; a reschedule resends SCHEDULED with the new time;
      • ON_ACTIVATION forbids ScheduledSendAt, and drops any time already stored;
      • ScheduledSendAt without SendMode is refused.

      PATCH: omitted leaves both unchanged. Until a mode is chosen the asset reports SEND_MODE_MISSING and does not activate: no default, because an unchosen send mails the real audience. Rejected with ValidationException (NOT_SUPPORTED_FOR_CATEGORY) for a category that has no send (LANDING_PAGE, DOCUMENT, BANNER_AD). Like every other edit, it reaches the delivery platform at the asset's next activation, and a live email or social post refuses it (ASSET_ALREADY_ACTIVE): deactivate first.

      See Also:
    • scheduledSendAt

      public final Instant scheduledSendAt()

      The send time, with SendMode: SCHEDULED and only then. See SendMode.

      Must be at least an hour out (SEND_WINDOW_TOO_SOON), unless it is the time already stored: resending the stored mode and time changes nothing and is accepted, so a form that always resubmits does not trip the window.

      Must also fall on or before the campaign's EndOn (by the end of that UTC day): refused with ValidationException (INVALID_VALUE) otherwise, so nothing is scheduled to send after the campaign completes.

      Was scheduleDate, a YYYY-MM-DD string. Retyped because a date alone cannot express a send time, which is the whole point of a schedule — and because the resource already spelled the same concept ScheduledSendAt on the activation responses. Two spellings of one concept on one resource was the defect.

      Returns:
      The send time, with SendMode: SCHEDULED and only then. See SendMode.

      Must be at least an hour out (SEND_WINDOW_TOO_SOON), unless it is the time already stored: resending the stored mode and time changes nothing and is accepted, so a form that always resubmits does not trip the window.

      Must also fall on or before the campaign's EndOn (by the end of that UTC day): refused with ValidationException (INVALID_VALUE) otherwise, so nothing is scheduled to send after the campaign completes.

      Was scheduleDate, a YYYY-MM-DD string. Retyped because a date alone cannot express a send time, which is the whole point of a schedule — and because the resource already spelled the same concept ScheduledSendAt on the activation responses. Two spellings of one concept on one resource was the defect.

    • clientToken

      public final String clientToken()

      Idempotency token. Retry-safety only — this is not a concurrency token, and sequential edits to one field are last-writer-wins.

      Returns:
      Idempotency token. Retry-safety only — this is not a concurrency token, and sequential edits to one field are last-writer-wins.
    • toBuilder

      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<UpdateCampaignAssetRequest.Builder,UpdateCampaignAssetRequest>
      Specified by:
      toBuilder in class PartnerCentralMarketingRequest
      Returns:
      a builder for type T
    • builder

      public static UpdateCampaignAssetRequest.Builder builder()
    • serializableBuilderClass

      public static Class<? extends UpdateCampaignAssetRequest.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class AwsRequest
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class AwsRequest
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Description copied from interface: SdkPojo
      Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • toString

      public final String toString()
      Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
      Description copied from class: SdkRequest
      Used to retrieve the value of a field from any class that extends SdkRequest. The field name specified should match the member name from the corresponding service-2.json model specified in the codegen-resources folder for a given service. The class specifies what class to cast the returned value to. If the returned value is also a modeled class, the SdkRequest.getValueForField(String, Class) method will again be available.
      Overrides:
      getValueForField in class SdkRequest
      Parameters:
      fieldName - The name of the member to be retrieved.
      clazz - The class to cast the returned object to.
      Returns:
      Optional containing the casted return value
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.
    • sdkFieldNameToField

      public final Map<String,SdkField<?>> sdkFieldNameToField()
      Specified by:
      sdkFieldNameToField in interface SdkPojo
      Returns:
      The mapping between the field name and its corresponding field.