Class ResponsiveSearchAdInfo.Builder

  • All Implemented Interfaces:
    ResponsiveSearchAdInfoOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, java.lang.Cloneable
    Enclosing class:
    ResponsiveSearchAdInfo

    public static final class ResponsiveSearchAdInfo.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<ResponsiveSearchAdInfo.Builder>
    implements ResponsiveSearchAdInfoOrBuilder
     A responsive search ad.
     Responsive search ads let you create an ad that adapts to show more text, and
     more relevant messages, to your customers. Enter multiple headlines and
     descriptions when creating a responsive search ad, and over time, Google Ads
     will automatically test different combinations and learn which combinations
     perform best. By adapting your ad's content to more closely match potential
     customers' search terms, responsive search ads may improve your campaign's
     performance.
     More information at https://support.google.com/google-ads/answer/7684791
     
    Protobuf type google.ads.googleads.v10.common.ResponsiveSearchAdInfo
    • Method Detail

      • getDescriptor

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

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

        public ResponsiveSearchAdInfo.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.GeneratedMessageV3.Builder<ResponsiveSearchAdInfo.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.GeneratedMessageV3.Builder<ResponsiveSearchAdInfo.Builder>
      • getDefaultInstanceForType

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

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

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

        public ResponsiveSearchAdInfo.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<ResponsiveSearchAdInfo.Builder>
      • setField

        public ResponsiveSearchAdInfo.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                       java.lang.Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<ResponsiveSearchAdInfo.Builder>
      • clearField

        public ResponsiveSearchAdInfo.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<ResponsiveSearchAdInfo.Builder>
      • clearOneof

        public ResponsiveSearchAdInfo.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<ResponsiveSearchAdInfo.Builder>
      • setRepeatedField

        public ResponsiveSearchAdInfo.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                               int index,
                                                               java.lang.Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<ResponsiveSearchAdInfo.Builder>
      • addRepeatedField

        public ResponsiveSearchAdInfo.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                               java.lang.Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<ResponsiveSearchAdInfo.Builder>
      • isInitialized

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

        public ResponsiveSearchAdInfo.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                 throws java.io.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<ResponsiveSearchAdInfo.Builder>
        Throws:
        java.io.IOException
      • getHeadlinesList

        public java.util.List<AdTextAsset> getHeadlinesList()
         List of text assets for headlines. When the ad serves the headlines will
         be selected from this list.
         
        repeated .google.ads.googleads.v10.common.AdTextAsset headlines = 1;
        Specified by:
        getHeadlinesList in interface ResponsiveSearchAdInfoOrBuilder
      • getHeadlinesCount

        public int getHeadlinesCount()
         List of text assets for headlines. When the ad serves the headlines will
         be selected from this list.
         
        repeated .google.ads.googleads.v10.common.AdTextAsset headlines = 1;
        Specified by:
        getHeadlinesCount in interface ResponsiveSearchAdInfoOrBuilder
      • getHeadlines

        public AdTextAsset getHeadlines​(int index)
         List of text assets for headlines. When the ad serves the headlines will
         be selected from this list.
         
        repeated .google.ads.googleads.v10.common.AdTextAsset headlines = 1;
        Specified by:
        getHeadlines in interface ResponsiveSearchAdInfoOrBuilder
      • setHeadlines

        public ResponsiveSearchAdInfo.Builder setHeadlines​(int index,
                                                           AdTextAsset value)
         List of text assets for headlines. When the ad serves the headlines will
         be selected from this list.
         
        repeated .google.ads.googleads.v10.common.AdTextAsset headlines = 1;
      • setHeadlines

        public ResponsiveSearchAdInfo.Builder setHeadlines​(int index,
                                                           AdTextAsset.Builder builderForValue)
         List of text assets for headlines. When the ad serves the headlines will
         be selected from this list.
         
        repeated .google.ads.googleads.v10.common.AdTextAsset headlines = 1;
      • addHeadlines

        public ResponsiveSearchAdInfo.Builder addHeadlines​(AdTextAsset value)
         List of text assets for headlines. When the ad serves the headlines will
         be selected from this list.
         
        repeated .google.ads.googleads.v10.common.AdTextAsset headlines = 1;
      • addHeadlines

        public ResponsiveSearchAdInfo.Builder addHeadlines​(int index,
                                                           AdTextAsset value)
         List of text assets for headlines. When the ad serves the headlines will
         be selected from this list.
         
        repeated .google.ads.googleads.v10.common.AdTextAsset headlines = 1;
      • addHeadlines

        public ResponsiveSearchAdInfo.Builder addHeadlines​(AdTextAsset.Builder builderForValue)
         List of text assets for headlines. When the ad serves the headlines will
         be selected from this list.
         
        repeated .google.ads.googleads.v10.common.AdTextAsset headlines = 1;
      • addHeadlines

        public ResponsiveSearchAdInfo.Builder addHeadlines​(int index,
                                                           AdTextAsset.Builder builderForValue)
         List of text assets for headlines. When the ad serves the headlines will
         be selected from this list.
         
        repeated .google.ads.googleads.v10.common.AdTextAsset headlines = 1;
      • addAllHeadlines

        public ResponsiveSearchAdInfo.Builder addAllHeadlines​(java.lang.Iterable<? extends AdTextAsset> values)
         List of text assets for headlines. When the ad serves the headlines will
         be selected from this list.
         
        repeated .google.ads.googleads.v10.common.AdTextAsset headlines = 1;
      • clearHeadlines

        public ResponsiveSearchAdInfo.Builder clearHeadlines()
         List of text assets for headlines. When the ad serves the headlines will
         be selected from this list.
         
        repeated .google.ads.googleads.v10.common.AdTextAsset headlines = 1;
      • removeHeadlines

        public ResponsiveSearchAdInfo.Builder removeHeadlines​(int index)
         List of text assets for headlines. When the ad serves the headlines will
         be selected from this list.
         
        repeated .google.ads.googleads.v10.common.AdTextAsset headlines = 1;
      • getHeadlinesBuilder

        public AdTextAsset.Builder getHeadlinesBuilder​(int index)
         List of text assets for headlines. When the ad serves the headlines will
         be selected from this list.
         
        repeated .google.ads.googleads.v10.common.AdTextAsset headlines = 1;
      • addHeadlinesBuilder

        public AdTextAsset.Builder addHeadlinesBuilder()
         List of text assets for headlines. When the ad serves the headlines will
         be selected from this list.
         
        repeated .google.ads.googleads.v10.common.AdTextAsset headlines = 1;
      • addHeadlinesBuilder

        public AdTextAsset.Builder addHeadlinesBuilder​(int index)
         List of text assets for headlines. When the ad serves the headlines will
         be selected from this list.
         
        repeated .google.ads.googleads.v10.common.AdTextAsset headlines = 1;
      • getHeadlinesBuilderList

        public java.util.List<AdTextAsset.Builder> getHeadlinesBuilderList()
         List of text assets for headlines. When the ad serves the headlines will
         be selected from this list.
         
        repeated .google.ads.googleads.v10.common.AdTextAsset headlines = 1;
      • getDescriptionsList

        public java.util.List<AdTextAsset> getDescriptionsList()
         List of text assets for descriptions. When the ad serves the descriptions
         will be selected from this list.
         
        repeated .google.ads.googleads.v10.common.AdTextAsset descriptions = 2;
        Specified by:
        getDescriptionsList in interface ResponsiveSearchAdInfoOrBuilder
      • getDescriptionsCount

        public int getDescriptionsCount()
         List of text assets for descriptions. When the ad serves the descriptions
         will be selected from this list.
         
        repeated .google.ads.googleads.v10.common.AdTextAsset descriptions = 2;
        Specified by:
        getDescriptionsCount in interface ResponsiveSearchAdInfoOrBuilder
      • getDescriptions

        public AdTextAsset getDescriptions​(int index)
         List of text assets for descriptions. When the ad serves the descriptions
         will be selected from this list.
         
        repeated .google.ads.googleads.v10.common.AdTextAsset descriptions = 2;
        Specified by:
        getDescriptions in interface ResponsiveSearchAdInfoOrBuilder
      • setDescriptions

        public ResponsiveSearchAdInfo.Builder setDescriptions​(int index,
                                                              AdTextAsset value)
         List of text assets for descriptions. When the ad serves the descriptions
         will be selected from this list.
         
        repeated .google.ads.googleads.v10.common.AdTextAsset descriptions = 2;
      • setDescriptions

        public ResponsiveSearchAdInfo.Builder setDescriptions​(int index,
                                                              AdTextAsset.Builder builderForValue)
         List of text assets for descriptions. When the ad serves the descriptions
         will be selected from this list.
         
        repeated .google.ads.googleads.v10.common.AdTextAsset descriptions = 2;
      • addDescriptions

        public ResponsiveSearchAdInfo.Builder addDescriptions​(AdTextAsset value)
         List of text assets for descriptions. When the ad serves the descriptions
         will be selected from this list.
         
        repeated .google.ads.googleads.v10.common.AdTextAsset descriptions = 2;
      • addDescriptions

        public ResponsiveSearchAdInfo.Builder addDescriptions​(int index,
                                                              AdTextAsset value)
         List of text assets for descriptions. When the ad serves the descriptions
         will be selected from this list.
         
        repeated .google.ads.googleads.v10.common.AdTextAsset descriptions = 2;
      • addDescriptions

        public ResponsiveSearchAdInfo.Builder addDescriptions​(AdTextAsset.Builder builderForValue)
         List of text assets for descriptions. When the ad serves the descriptions
         will be selected from this list.
         
        repeated .google.ads.googleads.v10.common.AdTextAsset descriptions = 2;
      • addDescriptions

        public ResponsiveSearchAdInfo.Builder addDescriptions​(int index,
                                                              AdTextAsset.Builder builderForValue)
         List of text assets for descriptions. When the ad serves the descriptions
         will be selected from this list.
         
        repeated .google.ads.googleads.v10.common.AdTextAsset descriptions = 2;
      • addAllDescriptions

        public ResponsiveSearchAdInfo.Builder addAllDescriptions​(java.lang.Iterable<? extends AdTextAsset> values)
         List of text assets for descriptions. When the ad serves the descriptions
         will be selected from this list.
         
        repeated .google.ads.googleads.v10.common.AdTextAsset descriptions = 2;
      • clearDescriptions

        public ResponsiveSearchAdInfo.Builder clearDescriptions()
         List of text assets for descriptions. When the ad serves the descriptions
         will be selected from this list.
         
        repeated .google.ads.googleads.v10.common.AdTextAsset descriptions = 2;
      • removeDescriptions

        public ResponsiveSearchAdInfo.Builder removeDescriptions​(int index)
         List of text assets for descriptions. When the ad serves the descriptions
         will be selected from this list.
         
        repeated .google.ads.googleads.v10.common.AdTextAsset descriptions = 2;
      • getDescriptionsBuilder

        public AdTextAsset.Builder getDescriptionsBuilder​(int index)
         List of text assets for descriptions. When the ad serves the descriptions
         will be selected from this list.
         
        repeated .google.ads.googleads.v10.common.AdTextAsset descriptions = 2;
      • addDescriptionsBuilder

        public AdTextAsset.Builder addDescriptionsBuilder()
         List of text assets for descriptions. When the ad serves the descriptions
         will be selected from this list.
         
        repeated .google.ads.googleads.v10.common.AdTextAsset descriptions = 2;
      • addDescriptionsBuilder

        public AdTextAsset.Builder addDescriptionsBuilder​(int index)
         List of text assets for descriptions. When the ad serves the descriptions
         will be selected from this list.
         
        repeated .google.ads.googleads.v10.common.AdTextAsset descriptions = 2;
      • getDescriptionsBuilderList

        public java.util.List<AdTextAsset.Builder> getDescriptionsBuilderList()
         List of text assets for descriptions. When the ad serves the descriptions
         will be selected from this list.
         
        repeated .google.ads.googleads.v10.common.AdTextAsset descriptions = 2;
      • hasPath1

        public boolean hasPath1()
         First part of text that can be appended to the URL in the ad.
         
        optional string path1 = 5;
        Specified by:
        hasPath1 in interface ResponsiveSearchAdInfoOrBuilder
        Returns:
        Whether the path1 field is set.
      • getPath1

        public java.lang.String getPath1()
         First part of text that can be appended to the URL in the ad.
         
        optional string path1 = 5;
        Specified by:
        getPath1 in interface ResponsiveSearchAdInfoOrBuilder
        Returns:
        The path1.
      • getPath1Bytes

        public com.google.protobuf.ByteString getPath1Bytes()
         First part of text that can be appended to the URL in the ad.
         
        optional string path1 = 5;
        Specified by:
        getPath1Bytes in interface ResponsiveSearchAdInfoOrBuilder
        Returns:
        The bytes for path1.
      • setPath1

        public ResponsiveSearchAdInfo.Builder setPath1​(java.lang.String value)
         First part of text that can be appended to the URL in the ad.
         
        optional string path1 = 5;
        Parameters:
        value - The path1 to set.
        Returns:
        This builder for chaining.
      • clearPath1

        public ResponsiveSearchAdInfo.Builder clearPath1()
         First part of text that can be appended to the URL in the ad.
         
        optional string path1 = 5;
        Returns:
        This builder for chaining.
      • setPath1Bytes

        public ResponsiveSearchAdInfo.Builder setPath1Bytes​(com.google.protobuf.ByteString value)
         First part of text that can be appended to the URL in the ad.
         
        optional string path1 = 5;
        Parameters:
        value - The bytes for path1 to set.
        Returns:
        This builder for chaining.
      • hasPath2

        public boolean hasPath2()
         Second part of text that can be appended to the URL in the ad. This field
         can only be set when `path1` is also set.
         
        optional string path2 = 6;
        Specified by:
        hasPath2 in interface ResponsiveSearchAdInfoOrBuilder
        Returns:
        Whether the path2 field is set.
      • getPath2

        public java.lang.String getPath2()
         Second part of text that can be appended to the URL in the ad. This field
         can only be set when `path1` is also set.
         
        optional string path2 = 6;
        Specified by:
        getPath2 in interface ResponsiveSearchAdInfoOrBuilder
        Returns:
        The path2.
      • getPath2Bytes

        public com.google.protobuf.ByteString getPath2Bytes()
         Second part of text that can be appended to the URL in the ad. This field
         can only be set when `path1` is also set.
         
        optional string path2 = 6;
        Specified by:
        getPath2Bytes in interface ResponsiveSearchAdInfoOrBuilder
        Returns:
        The bytes for path2.
      • setPath2

        public ResponsiveSearchAdInfo.Builder setPath2​(java.lang.String value)
         Second part of text that can be appended to the URL in the ad. This field
         can only be set when `path1` is also set.
         
        optional string path2 = 6;
        Parameters:
        value - The path2 to set.
        Returns:
        This builder for chaining.
      • clearPath2

        public ResponsiveSearchAdInfo.Builder clearPath2()
         Second part of text that can be appended to the URL in the ad. This field
         can only be set when `path1` is also set.
         
        optional string path2 = 6;
        Returns:
        This builder for chaining.
      • setPath2Bytes

        public ResponsiveSearchAdInfo.Builder setPath2Bytes​(com.google.protobuf.ByteString value)
         Second part of text that can be appended to the URL in the ad. This field
         can only be set when `path1` is also set.
         
        optional string path2 = 6;
        Parameters:
        value - The bytes for path2 to set.
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final ResponsiveSearchAdInfo.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<ResponsiveSearchAdInfo.Builder>
      • mergeUnknownFields

        public final ResponsiveSearchAdInfo.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<ResponsiveSearchAdInfo.Builder>