Class ShareablePreview.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<ShareablePreview.Builder>
com.google.ads.googleads.v25.actions.ShareablePreview.Builder
All Implemented Interfaces:
ShareablePreviewOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
ShareablePreview

public static final class ShareablePreview.Builder extends com.google.protobuf.GeneratedMessage.Builder<ShareablePreview.Builder> implements ShareablePreviewOrBuilder
 A shareable preview with its identifier.

 Only Performance Max asset groups and certain YouTube video/audio ad formats
 are supported. Other ad types, such as Responsive Search Ads or Responsive
 Display Ads, are not supported and return an `UNSUPPORTED_AD_TYPE` error.

 The generated preview URLs cannot be embedded in an iframe because the
 response headers include `X-Frame-Options: deny`.
 
Protobuf type google.ads.googleads.v25.actions.ShareablePreview
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<ShareablePreview.Builder>
    • clear

      public ShareablePreview.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<ShareablePreview.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<ShareablePreview.Builder>
    • getDefaultInstanceForType

      public ShareablePreview getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public ShareablePreview build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public ShareablePreview buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public ShareablePreview.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ShareablePreview.Builder>
    • mergeFrom

      public ShareablePreview.Builder mergeFrom(ShareablePreview other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<ShareablePreview.Builder>
    • mergeFrom

      public ShareablePreview.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ShareablePreview.Builder>
      Throws:
      IOException
    • getIdentifierCase

      public ShareablePreview.IdentifierCase getIdentifierCase()
      Specified by:
      getIdentifierCase in interface ShareablePreviewOrBuilder
    • clearIdentifier

      public ShareablePreview.Builder clearIdentifier()
    • getPreviewTypeValue

      public int getPreviewTypeValue()
       Required. The type of preview to generate.
       
      .google.ads.googleads.v25.enums.PreviewTypeEnum.PreviewType preview_type = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getPreviewTypeValue in interface ShareablePreviewOrBuilder
      Returns:
      The enum numeric value on the wire for previewType.
    • setPreviewTypeValue

      public ShareablePreview.Builder setPreviewTypeValue(int value)
       Required. The type of preview to generate.
       
      .google.ads.googleads.v25.enums.PreviewTypeEnum.PreviewType preview_type = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The enum numeric value on the wire for previewType to set.
      Returns:
      This builder for chaining.
    • getPreviewType

      public PreviewTypeEnum.PreviewType getPreviewType()
       Required. The type of preview to generate.
       
      .google.ads.googleads.v25.enums.PreviewTypeEnum.PreviewType preview_type = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getPreviewType in interface ShareablePreviewOrBuilder
      Returns:
      The previewType.
    • setPreviewType

       Required. The type of preview to generate.
       
      .google.ads.googleads.v25.enums.PreviewTypeEnum.PreviewType preview_type = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The previewType to set.
      Returns:
      This builder for chaining.
    • clearPreviewType

      public ShareablePreview.Builder clearPreviewType()
       Required. The type of preview to generate.
       
      .google.ads.googleads.v25.enums.PreviewTypeEnum.PreviewType preview_type = 1 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • hasAdGroupAd

      public boolean hasAdGroupAd()
       Ad group ad of the shareable preview. Only supported for preview type
       YOUTUBE_LIVE_PREVIEW.
       Format: customers/{customer_id}/adGroupAds/{ad_group_id}~{ad_id}
       
      string ad_group_ad = 2;
      Specified by:
      hasAdGroupAd in interface ShareablePreviewOrBuilder
      Returns:
      Whether the adGroupAd field is set.
    • getAdGroupAd

      public String getAdGroupAd()
       Ad group ad of the shareable preview. Only supported for preview type
       YOUTUBE_LIVE_PREVIEW.
       Format: customers/{customer_id}/adGroupAds/{ad_group_id}~{ad_id}
       
      string ad_group_ad = 2;
      Specified by:
      getAdGroupAd in interface ShareablePreviewOrBuilder
      Returns:
      The adGroupAd.
    • getAdGroupAdBytes

      public com.google.protobuf.ByteString getAdGroupAdBytes()
       Ad group ad of the shareable preview. Only supported for preview type
       YOUTUBE_LIVE_PREVIEW.
       Format: customers/{customer_id}/adGroupAds/{ad_group_id}~{ad_id}
       
      string ad_group_ad = 2;
      Specified by:
      getAdGroupAdBytes in interface ShareablePreviewOrBuilder
      Returns:
      The bytes for adGroupAd.
    • setAdGroupAd

      public ShareablePreview.Builder setAdGroupAd(String value)
       Ad group ad of the shareable preview. Only supported for preview type
       YOUTUBE_LIVE_PREVIEW.
       Format: customers/{customer_id}/adGroupAds/{ad_group_id}~{ad_id}
       
      string ad_group_ad = 2;
      Parameters:
      value - The adGroupAd to set.
      Returns:
      This builder for chaining.
    • clearAdGroupAd

      public ShareablePreview.Builder clearAdGroupAd()
       Ad group ad of the shareable preview. Only supported for preview type
       YOUTUBE_LIVE_PREVIEW.
       Format: customers/{customer_id}/adGroupAds/{ad_group_id}~{ad_id}
       
      string ad_group_ad = 2;
      Returns:
      This builder for chaining.
    • setAdGroupAdBytes

      public ShareablePreview.Builder setAdGroupAdBytes(com.google.protobuf.ByteString value)
       Ad group ad of the shareable preview. Only supported for preview type
       YOUTUBE_LIVE_PREVIEW.
       Format: customers/{customer_id}/adGroupAds/{ad_group_id}~{ad_id}
       
      string ad_group_ad = 2;
      Parameters:
      value - The bytes for adGroupAd to set.
      Returns:
      This builder for chaining.
    • hasAssetGroup

      public boolean hasAssetGroup()
       Asset group of the shareable preview.
       Format: customers/{customer_id}/assetGroups/{asset_group_id}
       
      string asset_group = 3;
      Specified by:
      hasAssetGroup in interface ShareablePreviewOrBuilder
      Returns:
      Whether the assetGroup field is set.
    • getAssetGroup

      public String getAssetGroup()
       Asset group of the shareable preview.
       Format: customers/{customer_id}/assetGroups/{asset_group_id}
       
      string asset_group = 3;
      Specified by:
      getAssetGroup in interface ShareablePreviewOrBuilder
      Returns:
      The assetGroup.
    • getAssetGroupBytes

      public com.google.protobuf.ByteString getAssetGroupBytes()
       Asset group of the shareable preview.
       Format: customers/{customer_id}/assetGroups/{asset_group_id}
       
      string asset_group = 3;
      Specified by:
      getAssetGroupBytes in interface ShareablePreviewOrBuilder
      Returns:
      The bytes for assetGroup.
    • setAssetGroup

      public ShareablePreview.Builder setAssetGroup(String value)
       Asset group of the shareable preview.
       Format: customers/{customer_id}/assetGroups/{asset_group_id}
       
      string asset_group = 3;
      Parameters:
      value - The assetGroup to set.
      Returns:
      This builder for chaining.
    • clearAssetGroup

      public ShareablePreview.Builder clearAssetGroup()
       Asset group of the shareable preview.
       Format: customers/{customer_id}/assetGroups/{asset_group_id}
       
      string asset_group = 3;
      Returns:
      This builder for chaining.
    • setAssetGroupBytes

      public ShareablePreview.Builder setAssetGroupBytes(com.google.protobuf.ByteString value)
       Asset group of the shareable preview.
       Format: customers/{customer_id}/assetGroups/{asset_group_id}
       
      string asset_group = 3;
      Parameters:
      value - The bytes for assetGroup to set.
      Returns:
      This builder for chaining.