Class UpdateCampaignAssetRequest
- All Implemented Interfaces:
SdkPojo,ToCopyableBuilder<UpdateCampaignAssetRequest.Builder,UpdateCampaignAssetRequest>
Input for UpdateCampaignAsset operation.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbuilder()final StringThe asset identifier.final StringThe campaign identifier.final Catalogcatalog()The catalog (AWS or Sandbox).final StringThe catalog (AWS or Sandbox).final StringIdempotency token.final booleanfinal booleanequalsBySdkFields(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final List<FieldValueInput> Value-only updates to the asset's pinned template fields, keyed by FieldId.final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) Used to retrieve the value of a field from any class that extendsSdkRequest.final booleanFor responses, this returns true if the service returned a value for the FieldValues property.final inthashCode()final Stringlayout()Selects a multi-layout asset's layout: one of the values inCampaignAsset.layout.options.final InstantThe send time, withSendMode: SCHEDULEDand only then.final SendModesendMode()When a sendable asset (EMAIL,SOCIAL_POST) sends: on activation, or atScheduledSendAt.final StringWhen a sendable asset (EMAIL,SOCIAL_POST) sends: on activation, or atScheduledSendAt.static Class<? extends UpdateCampaignAssetRequest.Builder> Take this object and create a builder that contains all of the current property values of this object.final StringtoString()Returns a string representation of this object.Methods inherited from class software.amazon.awssdk.awscore.AwsRequest
overrideConfigurationMethods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
catalog
The catalog (AWS or Sandbox).
If the service returns an enum value that is not available in the current SDK version,
catalogwill returnCatalog.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromcatalogAsString().- Returns:
- The catalog (AWS or Sandbox).
- See Also:
-
catalogAsString
The catalog (AWS or Sandbox).
If the service returns an enum value that is not available in the current SDK version,
catalogwill returnCatalog.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromcatalogAsString().- Returns:
- The catalog (AWS or Sandbox).
- See Also:
-
campaignIdentifier
-
campaignAssetIdentifier
-
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 theisEmpty()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
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
Valueomitted to clear one.Named
FieldValuesto match the member it edits onCampaignAsset, which is the same concept read back. It wastemplateFieldUpdates; 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
Valueomitted to clear one.Named
FieldValuesto match the member it edits onCampaignAsset, which is the same concept read back. It wastemplateFieldUpdates; the two names for one concept were the defect, not the length.
-
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
When a sendable asset (
EMAIL,SOCIAL_POST) sends: on activation, or atScheduledSendAt.A mode beside a value rather than a union, on purpose:
ScheduledSendAtstays a plainTimestamp, and the precedent is EventBridge Scheduler'sFlexibleTimeWindow { Mode, MaximumWindowInMinutes }. The pair is checked as one, and a request where they disagree is refused withValidationException(INVALID_VALUE, naming the member) and applies nothing:SCHEDULEDrequiresScheduledSendAt; a reschedule resendsSCHEDULEDwith the new time;ON_ACTIVATIONforbidsScheduledSendAt, and drops any time already stored;ScheduledSendAtwithoutSendModeis refused.
PATCH: omitted leaves both unchanged. Until a mode is chosen the asset reports
SEND_MODE_MISSINGand does not activate: no default, because an unchosen send mails the real audience. Rejected withValidationException(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,
sendModewill returnSendMode.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromsendModeAsString().- Returns:
- When a sendable asset (
EMAIL,SOCIAL_POST) sends: on activation, or atScheduledSendAt.A mode beside a value rather than a union, on purpose:
ScheduledSendAtstays a plainTimestamp, and the precedent is EventBridge Scheduler'sFlexibleTimeWindow { Mode, MaximumWindowInMinutes }. The pair is checked as one, and a request where they disagree is refused withValidationException(INVALID_VALUE, naming the member) and applies nothing:SCHEDULEDrequiresScheduledSendAt; a reschedule resendsSCHEDULEDwith the new time;ON_ACTIVATIONforbidsScheduledSendAt, and drops any time already stored;ScheduledSendAtwithoutSendModeis refused.
PATCH: omitted leaves both unchanged. Until a mode is chosen the asset reports
SEND_MODE_MISSINGand does not activate: no default, because an unchosen send mails the real audience. Rejected withValidationException(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
When a sendable asset (
EMAIL,SOCIAL_POST) sends: on activation, or atScheduledSendAt.A mode beside a value rather than a union, on purpose:
ScheduledSendAtstays a plainTimestamp, and the precedent is EventBridge Scheduler'sFlexibleTimeWindow { Mode, MaximumWindowInMinutes }. The pair is checked as one, and a request where they disagree is refused withValidationException(INVALID_VALUE, naming the member) and applies nothing:SCHEDULEDrequiresScheduledSendAt; a reschedule resendsSCHEDULEDwith the new time;ON_ACTIVATIONforbidsScheduledSendAt, and drops any time already stored;ScheduledSendAtwithoutSendModeis refused.
PATCH: omitted leaves both unchanged. Until a mode is chosen the asset reports
SEND_MODE_MISSINGand does not activate: no default, because an unchosen send mails the real audience. Rejected withValidationException(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,
sendModewill returnSendMode.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromsendModeAsString().- Returns:
- When a sendable asset (
EMAIL,SOCIAL_POST) sends: on activation, or atScheduledSendAt.A mode beside a value rather than a union, on purpose:
ScheduledSendAtstays a plainTimestamp, and the precedent is EventBridge Scheduler'sFlexibleTimeWindow { Mode, MaximumWindowInMinutes }. The pair is checked as one, and a request where they disagree is refused withValidationException(INVALID_VALUE, naming the member) and applies nothing:SCHEDULEDrequiresScheduledSendAt; a reschedule resendsSCHEDULEDwith the new time;ON_ACTIVATIONforbidsScheduledSendAt, and drops any time already stored;ScheduledSendAtwithoutSendModeis refused.
PATCH: omitted leaves both unchanged. Until a mode is chosen the asset reports
SEND_MODE_MISSINGand does not activate: no default, because an unchosen send mails the real audience. Rejected withValidationException(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
The send time, with
SendMode: SCHEDULEDand only then. SeeSendMode.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 withValidationException(INVALID_VALUE) otherwise, so nothing is scheduled to send after the campaign completes.Was
scheduleDate, aYYYY-MM-DDstring. 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 conceptScheduledSendAton the activation responses. Two spellings of one concept on one resource was the defect.- Returns:
- The send time, with
SendMode: SCHEDULEDand only then. SeeSendMode.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 withValidationException(INVALID_VALUE) otherwise, so nothing is scheduled to send after the campaign completes.Was
scheduleDate, aYYYY-MM-DDstring. 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 conceptScheduledSendAton the activation responses. Two spellings of one concept on one resource was the defect.
-
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:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<UpdateCampaignAssetRequest.Builder,UpdateCampaignAssetRequest> - Specified by:
toBuilderin classPartnerCentralMarketingRequest- Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
public final int hashCode()- Overrides:
hashCodein classAwsRequest
-
equals
- Overrides:
equalsin classAwsRequest
-
equalsBySdkFields
Description copied from interface:SdkPojoIndicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojoclass, and is generated based on a service model.If an
SdkPojoclass does not have any inherited fields,equalsBySdkFieldsandequalsare essentially the same.- Specified by:
equalsBySdkFieldsin interfaceSdkPojo- Parameters:
obj- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
Description copied from class:SdkRequestUsed to retrieve the value of a field from any class that extendsSdkRequest. 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, theSdkRequest.getValueForField(String, Class)method will again be available.- Overrides:
getValueForFieldin classSdkRequest- 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
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo- Returns:
- The mapping between the field name and its corresponding field.
-