Interface TemplateFieldValue.Builder

  • Method Details

    • text

      Text value — for both text and RichText fields. A RichText value is a markup fragment restricted to the field's AllowedTags.

      Parameters:
      text - Text value — for both text and RichText fields. A RichText value is a markup fragment restricted to the field's AllowedTags.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • imageReference

      TemplateFieldValue.Builder imageReference(String imageReference)

      Image reference (image fields).

      On a write, one of exactly two forms:

      • the s3:// URI of a file you staged in the Partner Central file staging bucket. It is scanned, then copied into this asset.
      • the URL Build with AI returned for a suggested image, unchanged. It is copied into this asset and not scanned. Any other URL is refused with FILE_REFERENCE_INVALID, including one a read returned: to keep the current image, omit the field; to put it on another asset, use CampaignAssetImage.

      On a read, a URL the caller can fetch: an image in the asset's own storage comes back as a presigned GET that expires one hour after the read, so fetch it again with GetCampaignAsset when it returns 403; an image already on DG's public CDN comes back as that stable URL. A stored reference outside this asset's storage, or not a raster image, is never signed, and the value is omitted. The signed URL serves the image as its image type, whatever the upload declared.

      Parameters:
      imageReference - Image reference (image fields).

      On a write, one of exactly two forms:

      • the s3:// URI of a file you staged in the Partner Central file staging bucket. It is scanned, then copied into this asset.
      • the URL Build with AI returned for a suggested image, unchanged. It is copied into this asset and not scanned. Any other URL is refused with FILE_REFERENCE_INVALID, including one a read returned: to keep the current image, omit the field; to put it on another asset, use CampaignAssetImage.

      On a read, a URL the caller can fetch: an image in the asset's own storage comes back as a presigned GET that expires one hour after the read, so fetch it again with GetCampaignAsset when it returns 403; an image already on DG's public CDN comes back as that stable URL. A stored reference outside this asset's storage, or not a raster image, is never signed, and the value is omitted. The signed URL serves the image as its image type, whatever the upload declared.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • linkedAssetId

      TemplateFieldValue.Builder linkedAssetId(String linkedAssetId)

      The asset an AssetLink field names: the id of an asset on the same campaign, of the field's category. It is a prerequisite of this asset while linked, so it activates first, this asset cannot start until it is live, and it cannot be deleted.

      Parameters:
      linkedAssetId - The asset an AssetLink field names: the id of an asset on the same campaign, of the field's category. It is a prerequisite of this asset while linked, so it activates first, this asset cannot start until it is live, and it cannot be deleted.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • campaignAssetImage

      TemplateFieldValue.Builder campaignAssetImage(CampaignAssetImageSource campaignAssetImage)

      Write only. Copies an image stored on another of your assets into this image field. The image is checked against this field's constraints and not scanned again. Also requires partnercentral:GetCampaignAsset on the source campaign. Reads return the copy as ImageReference.

      Parameters:
      campaignAssetImage - Write only. Copies an image stored on another of your assets into this image field. The image is checked against this field's constraints and not scanned again. Also requires partnercentral:GetCampaignAsset on the source campaign. Reads return the copy as ImageReference.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • campaignAssetImage

      default TemplateFieldValue.Builder campaignAssetImage(Consumer<CampaignAssetImageSource.Builder> campaignAssetImage)

      Write only. Copies an image stored on another of your assets into this image field. The image is checked against this field's constraints and not scanned again. Also requires partnercentral:GetCampaignAsset on the source campaign. Reads return the copy as ImageReference.

      This is a convenience method that creates an instance of the CampaignAssetImageSource.Builder avoiding the need to create one manually via CampaignAssetImageSource.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to campaignAssetImage(CampaignAssetImageSource).

      Parameters:
      campaignAssetImage - a consumer that will call methods on CampaignAssetImageSource.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: