Class Campaign

java.lang.Object
software.amazon.awssdk.services.partnercentralmarketing.model.Campaign
All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<Campaign.Builder,Campaign>

@Generated("software.amazon.awssdk:codegen") public final class Campaign extends Object implements SdkPojo, Serializable, ToCopyableBuilder<Campaign.Builder,Campaign>

A marketing campaign resource.

See Also:
  • Method Details

    • campaignId

      public final String campaignId()

      The campaign identifier.

      Returns:
      The campaign identifier.
    • arn

      public final String arn()

      The campaign ARN.

      Returns:
      The campaign ARN.
    • name

      public final String name()

      The display name.

      Returns:
      The display name.
    • state

      public final CampaignState state()

      The campaign's state, derived on every read from EndOn and its assets. See CampaignState.

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

      Returns:
      The campaign's state, derived on every read from EndOn and its assets. See CampaignState.
      See Also:
    • stateAsString

      public final String stateAsString()

      The campaign's state, derived on every read from EndOn and its assets. See CampaignState.

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

      Returns:
      The campaign's state, derived on every read from EndOn and its assets. See CampaignState.
      See Also:
    • campaignTemplateId

      public final String campaignTemplateId()

      The campaign template this campaign draws its assets from. Set at create, immutable.

      Returns:
      The campaign template this campaign draws its assets from. Set at create, immutable.
    • language

      public final AssetLanguage language()

      The language the campaign's assets are written and typeset in: its template's LanguageCode, set at create. To work in another language, create the campaign from that language's template.

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

      Returns:
      The language the campaign's assets are written and typeset in: its template's LanguageCode, set at create. To work in another language, create the campaign from that language's template.
      See Also:
    • languageAsString

      public final String languageAsString()

      The language the campaign's assets are written and typeset in: its template's LanguageCode, set at create. To work in another language, create the campaign from that language's template.

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

      Returns:
      The language the campaign's assets are written and typeset in: its template's LanguageCode, set at create. To work in another language, create the campaign from that language's template.
      See Also:
    • partnerProfile

      public final PartnerProfileBranding partnerProfile()

      The partner's branding — display name, website and logo — from their AWS Partner Central profile, rendered onto every asset of this campaign. Read-only here: the partner edits it in Partner Central, and the next activation or export uses the change. Absent only when the partner has no profile.

      Returns:
      The partner's branding — display name, website and logo — from their AWS Partner Central profile, rendered onto every asset of this campaign. Read-only here: the partner edits it in Partner Central, and the next activation or export uses the change. Absent only when the partner has no profile.
    • senderEmail

      public final String senderEmail()

      The address the campaign's emails are sent from. Absent until one is set.

      Returns:
      The address the campaign's emails are sent from. Absent until one is set.
    • privacyPolicyUrl

      public final String privacyPolicyUrl()

      The URL of the partner's privacy policy. Absent until one is set.

      Returns:
      The URL of the partner's privacy policy. Absent until one is set.
    • partnerAddress

      public final String partnerAddress()

      The partner's postal address. Absent until one is set.

      Returns:
      The partner's postal address. Absent until one is set.
    • partnerBadge

      public final PartnerBadgeDetail partnerBadge()

      The partner's badge. Absent until one is set, and every badge slot shows the Standalone AWS Partner badge while the partner's primary AWS Partner path is at stage Validated or Differentiated. Below that, no badge is shown.

      Returns:
      The partner's badge. Absent until one is set, and every badge slot shows the Standalone AWS Partner badge while the partner's primary AWS Partner path is at stage Validated or Differentiated. Below that, no badge is shown.
    • emailTarget

      public final EmailTargetDetail emailTarget()

      The attached recipient list — metadata only. There is no read path for the addresses.

      Returns:
      The attached recipient list — metadata only. There is no read path for the addresses.
    • hasEmailTargetEngagementGroupIds

      public final boolean hasEmailTargetEngagementGroupIds()
      For responses, this returns true if the service returned a value for the EmailTargetEngagementGroupIds 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.
    • emailTargetEngagementGroupIds

      public final List<String> emailTargetEngagementGroupIds()

      The engagement groups set by CreateCampaign / UpdateCampaign. Absent until set. Resolved to recipients at Start, where the stage can.

      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 hasEmailTargetEngagementGroupIds() method.

      Returns:
      The engagement groups set by CreateCampaign / UpdateCampaign. Absent until set. Resolved to recipients at Start, where the stage can.
    • socialConnections

      public final Map<Platform,List<String>> socialConnections()

      The account the campaign's social posts publish from, per platform, as set by UpdateCampaign. Absent until one is set.

      Needed only for a platform where you hold two or more connections. With none set, a post uses your one connection on its platform, and fails `SOCIAL_CONNECTION_NOT_CHOSEN` when you hold several. A choice that no longer names a connection on its platform fails `SOCIAL_CONNECTION_MISSING`. Join with `ListSocialConnections` for each connection's status.

      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 hasSocialConnections() method.

      Returns:
      The account the campaign's social posts publish from, per platform, as set by UpdateCampaign . Absent until one is set.

    • hasSocialConnections

      public final boolean hasSocialConnections()
      For responses, this returns true if the service returned a value for the SocialConnections 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.
    • socialConnectionsAsStrings

      public final Map<String,List<String>> socialConnectionsAsStrings()

      The account the campaign's social posts publish from, per platform, as set by UpdateCampaign. Absent until one is set.

      Needed only for a platform where you hold two or more connections. With none set, a post uses your one connection on its platform, and fails `SOCIAL_CONNECTION_NOT_CHOSEN` when you hold several. A choice that no longer names a connection on its platform fails `SOCIAL_CONNECTION_MISSING`. Join with `ListSocialConnections` for each connection's status.

      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 hasSocialConnections() method.

      Returns:
      The account the campaign's social posts publish from, per platform, as set by UpdateCampaign . Absent until one is set.

    • estimatedBudget

      public final MonetaryValue estimatedBudget()

      What the partner expects the campaign to cost.

      Returns:
      What the partner expects the campaign to cost.
    • totalBudget

      public final MonetaryValue totalBudget()

      The campaign's total budget.

      Returns:
      The campaign's total budget.
    • targetAudience

      public final TargetAudience targetAudience()

      Target audience configuration.

      Returns:
      Target audience configuration.
    • startOn

      public final String startOn()

      The first day of the campaign's run window.

      Returns:
      The first day of the campaign's run window.
    • endOn

      public final String endOn()

      The last day of the campaign's run window.

      Returns:
      The last day of the campaign's run window.
    • createdAt

      public final Instant createdAt()

      Creation timestamp.

      Returns:
      Creation timestamp.
    • updatedAt

      public final Instant updatedAt()

      Last update timestamp.

      Returns:
      Last update timestamp.
    • hasActivationIssues

      public final boolean hasActivationIssues()
      For responses, this returns true if the service returned a value for the ActivationIssues 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.
    • activationIssues

      public final List<ActivationIssue> activationIssues()

      Campaign settings that must be set before the assets listed in each issue can be activated. Empty when nothing is missing.

      Each issue names the setting in CampaignSetting — set it with UpdateCampaign — or the profile value in PartnerProfileField — set it in Partner Central — and the assets it blocks in AffectedAssetIds. StartCampaignAssetActivationTask refuses with ValidationException (CAMPAIGN_INCOMPLETE) while a requested asset is affected.

      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 hasActivationIssues() method.

      Returns:
      Campaign settings that must be set before the assets listed in each issue can be activated. Empty when nothing is missing.

      Each issue names the setting in CampaignSetting — set it with UpdateCampaign — or the profile value in PartnerProfileField — set it in Partner Central — and the assets it blocks in AffectedAssetIds. StartCampaignAssetActivationTask refuses with ValidationException (CAMPAIGN_INCOMPLETE) while a requested asset is affected.

    • toBuilder

      public Campaign.Builder 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<Campaign.Builder,Campaign>
      Returns:
      a builder for type T
    • builder

      public static Campaign.Builder builder()
    • serializableBuilderClass

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

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

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • 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)
    • 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.