Class DomainCategory.Builder

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

    public static final class DomainCategory.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<DomainCategory.Builder>
    implements DomainCategoryOrBuilder
     A category generated automatically by crawling a domain. If a campaign uses
     the DynamicSearchAdsSetting, then domain categories will be generated for
     the domain. The categories can be targeted using WebpageConditionInfo.
     See: https://support.google.com/google-ads/answer/2471185
     
    Protobuf type google.ads.googleads.v10.resources.DomainCategory
    • 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<DomainCategory.Builder>
      • clear

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

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

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

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

        public DomainCategory.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<DomainCategory.Builder>
      • setField

        public DomainCategory.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<DomainCategory.Builder>
      • clearField

        public DomainCategory.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<DomainCategory.Builder>
      • clearOneof

        public DomainCategory.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<DomainCategory.Builder>
      • setRepeatedField

        public DomainCategory.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<DomainCategory.Builder>
      • addRepeatedField

        public DomainCategory.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<DomainCategory.Builder>
      • mergeFrom

        public DomainCategory.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<DomainCategory.Builder>
      • isInitialized

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

        public DomainCategory.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<DomainCategory.Builder>
        Throws:
        java.io.IOException
      • getResourceName

        public java.lang.String getResourceName()
         Output only. The resource name of the domain category.
         Domain category resource names have the form:
         `customers/{customer_id}/domainCategories/{campaign_id}~{category_base64}~{language_code}`
         
        string resource_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
        Specified by:
        getResourceName in interface DomainCategoryOrBuilder
        Returns:
        The resourceName.
      • getResourceNameBytes

        public com.google.protobuf.ByteString getResourceNameBytes()
         Output only. The resource name of the domain category.
         Domain category resource names have the form:
         `customers/{customer_id}/domainCategories/{campaign_id}~{category_base64}~{language_code}`
         
        string resource_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
        Specified by:
        getResourceNameBytes in interface DomainCategoryOrBuilder
        Returns:
        The bytes for resourceName.
      • setResourceName

        public DomainCategory.Builder setResourceName​(java.lang.String value)
         Output only. The resource name of the domain category.
         Domain category resource names have the form:
         `customers/{customer_id}/domainCategories/{campaign_id}~{category_base64}~{language_code}`
         
        string resource_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
        Parameters:
        value - The resourceName to set.
        Returns:
        This builder for chaining.
      • clearResourceName

        public DomainCategory.Builder clearResourceName()
         Output only. The resource name of the domain category.
         Domain category resource names have the form:
         `customers/{customer_id}/domainCategories/{campaign_id}~{category_base64}~{language_code}`
         
        string resource_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
        Returns:
        This builder for chaining.
      • setResourceNameBytes

        public DomainCategory.Builder setResourceNameBytes​(com.google.protobuf.ByteString value)
         Output only. The resource name of the domain category.
         Domain category resource names have the form:
         `customers/{customer_id}/domainCategories/{campaign_id}~{category_base64}~{language_code}`
         
        string resource_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
        Parameters:
        value - The bytes for resourceName to set.
        Returns:
        This builder for chaining.
      • hasCampaign

        public boolean hasCampaign()
         Output only. The campaign this category is recommended for.
         
        optional string campaign = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
        Specified by:
        hasCampaign in interface DomainCategoryOrBuilder
        Returns:
        Whether the campaign field is set.
      • getCampaign

        public java.lang.String getCampaign()
         Output only. The campaign this category is recommended for.
         
        optional string campaign = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
        Specified by:
        getCampaign in interface DomainCategoryOrBuilder
        Returns:
        The campaign.
      • getCampaignBytes

        public com.google.protobuf.ByteString getCampaignBytes()
         Output only. The campaign this category is recommended for.
         
        optional string campaign = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
        Specified by:
        getCampaignBytes in interface DomainCategoryOrBuilder
        Returns:
        The bytes for campaign.
      • setCampaign

        public DomainCategory.Builder setCampaign​(java.lang.String value)
         Output only. The campaign this category is recommended for.
         
        optional string campaign = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
        Parameters:
        value - The campaign to set.
        Returns:
        This builder for chaining.
      • clearCampaign

        public DomainCategory.Builder clearCampaign()
         Output only. The campaign this category is recommended for.
         
        optional string campaign = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
        Returns:
        This builder for chaining.
      • setCampaignBytes

        public DomainCategory.Builder setCampaignBytes​(com.google.protobuf.ByteString value)
         Output only. The campaign this category is recommended for.
         
        optional string campaign = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
        Parameters:
        value - The bytes for campaign to set.
        Returns:
        This builder for chaining.
      • hasCategory

        public boolean hasCategory()
         Output only. Recommended category for the website domain. e.g. if you have a website
         about electronics, the categories could be "cameras", "televisions", etc.
         
        optional string category = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasCategory in interface DomainCategoryOrBuilder
        Returns:
        Whether the category field is set.
      • getCategory

        public java.lang.String getCategory()
         Output only. Recommended category for the website domain. e.g. if you have a website
         about electronics, the categories could be "cameras", "televisions", etc.
         
        optional string category = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCategory in interface DomainCategoryOrBuilder
        Returns:
        The category.
      • getCategoryBytes

        public com.google.protobuf.ByteString getCategoryBytes()
         Output only. Recommended category for the website domain. e.g. if you have a website
         about electronics, the categories could be "cameras", "televisions", etc.
         
        optional string category = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCategoryBytes in interface DomainCategoryOrBuilder
        Returns:
        The bytes for category.
      • setCategory

        public DomainCategory.Builder setCategory​(java.lang.String value)
         Output only. Recommended category for the website domain. e.g. if you have a website
         about electronics, the categories could be "cameras", "televisions", etc.
         
        optional string category = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The category to set.
        Returns:
        This builder for chaining.
      • clearCategory

        public DomainCategory.Builder clearCategory()
         Output only. Recommended category for the website domain. e.g. if you have a website
         about electronics, the categories could be "cameras", "televisions", etc.
         
        optional string category = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Returns:
        This builder for chaining.
      • setCategoryBytes

        public DomainCategory.Builder setCategoryBytes​(com.google.protobuf.ByteString value)
         Output only. Recommended category for the website domain. e.g. if you have a website
         about electronics, the categories could be "cameras", "televisions", etc.
         
        optional string category = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The bytes for category to set.
        Returns:
        This builder for chaining.
      • hasLanguageCode

        public boolean hasLanguageCode()
         Output only. The language code specifying the language of the website. e.g. "en" for
         English. The language can be specified in the DynamicSearchAdsSetting
         required for dynamic search ads. This is the language of the pages from
         your website that you want Google Ads to find, create ads for,
         and match searches with.
         
        optional string language_code = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasLanguageCode in interface DomainCategoryOrBuilder
        Returns:
        Whether the languageCode field is set.
      • getLanguageCode

        public java.lang.String getLanguageCode()
         Output only. The language code specifying the language of the website. e.g. "en" for
         English. The language can be specified in the DynamicSearchAdsSetting
         required for dynamic search ads. This is the language of the pages from
         your website that you want Google Ads to find, create ads for,
         and match searches with.
         
        optional string language_code = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getLanguageCode in interface DomainCategoryOrBuilder
        Returns:
        The languageCode.
      • getLanguageCodeBytes

        public com.google.protobuf.ByteString getLanguageCodeBytes()
         Output only. The language code specifying the language of the website. e.g. "en" for
         English. The language can be specified in the DynamicSearchAdsSetting
         required for dynamic search ads. This is the language of the pages from
         your website that you want Google Ads to find, create ads for,
         and match searches with.
         
        optional string language_code = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getLanguageCodeBytes in interface DomainCategoryOrBuilder
        Returns:
        The bytes for languageCode.
      • setLanguageCode

        public DomainCategory.Builder setLanguageCode​(java.lang.String value)
         Output only. The language code specifying the language of the website. e.g. "en" for
         English. The language can be specified in the DynamicSearchAdsSetting
         required for dynamic search ads. This is the language of the pages from
         your website that you want Google Ads to find, create ads for,
         and match searches with.
         
        optional string language_code = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The languageCode to set.
        Returns:
        This builder for chaining.
      • clearLanguageCode

        public DomainCategory.Builder clearLanguageCode()
         Output only. The language code specifying the language of the website. e.g. "en" for
         English. The language can be specified in the DynamicSearchAdsSetting
         required for dynamic search ads. This is the language of the pages from
         your website that you want Google Ads to find, create ads for,
         and match searches with.
         
        optional string language_code = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Returns:
        This builder for chaining.
      • setLanguageCodeBytes

        public DomainCategory.Builder setLanguageCodeBytes​(com.google.protobuf.ByteString value)
         Output only. The language code specifying the language of the website. e.g. "en" for
         English. The language can be specified in the DynamicSearchAdsSetting
         required for dynamic search ads. This is the language of the pages from
         your website that you want Google Ads to find, create ads for,
         and match searches with.
         
        optional string language_code = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The bytes for languageCode to set.
        Returns:
        This builder for chaining.
      • hasDomain

        public boolean hasDomain()
         Output only. The domain for the website. The domain can be specified in the
         DynamicSearchAdsSetting required for dynamic search ads.
         
        optional string domain = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasDomain in interface DomainCategoryOrBuilder
        Returns:
        Whether the domain field is set.
      • getDomain

        public java.lang.String getDomain()
         Output only. The domain for the website. The domain can be specified in the
         DynamicSearchAdsSetting required for dynamic search ads.
         
        optional string domain = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getDomain in interface DomainCategoryOrBuilder
        Returns:
        The domain.
      • getDomainBytes

        public com.google.protobuf.ByteString getDomainBytes()
         Output only. The domain for the website. The domain can be specified in the
         DynamicSearchAdsSetting required for dynamic search ads.
         
        optional string domain = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getDomainBytes in interface DomainCategoryOrBuilder
        Returns:
        The bytes for domain.
      • setDomain

        public DomainCategory.Builder setDomain​(java.lang.String value)
         Output only. The domain for the website. The domain can be specified in the
         DynamicSearchAdsSetting required for dynamic search ads.
         
        optional string domain = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The domain to set.
        Returns:
        This builder for chaining.
      • clearDomain

        public DomainCategory.Builder clearDomain()
         Output only. The domain for the website. The domain can be specified in the
         DynamicSearchAdsSetting required for dynamic search ads.
         
        optional string domain = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Returns:
        This builder for chaining.
      • setDomainBytes

        public DomainCategory.Builder setDomainBytes​(com.google.protobuf.ByteString value)
         Output only. The domain for the website. The domain can be specified in the
         DynamicSearchAdsSetting required for dynamic search ads.
         
        optional string domain = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The bytes for domain to set.
        Returns:
        This builder for chaining.
      • hasCoverageFraction

        public boolean hasCoverageFraction()
         Output only. Fraction of pages on your site that this category matches.
         
        optional double coverage_fraction = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasCoverageFraction in interface DomainCategoryOrBuilder
        Returns:
        Whether the coverageFraction field is set.
      • getCoverageFraction

        public double getCoverageFraction()
         Output only. Fraction of pages on your site that this category matches.
         
        optional double coverage_fraction = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCoverageFraction in interface DomainCategoryOrBuilder
        Returns:
        The coverageFraction.
      • setCoverageFraction

        public DomainCategory.Builder setCoverageFraction​(double value)
         Output only. Fraction of pages on your site that this category matches.
         
        optional double coverage_fraction = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The coverageFraction to set.
        Returns:
        This builder for chaining.
      • clearCoverageFraction

        public DomainCategory.Builder clearCoverageFraction()
         Output only. Fraction of pages on your site that this category matches.
         
        optional double coverage_fraction = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Returns:
        This builder for chaining.
      • hasCategoryRank

        public boolean hasCategoryRank()
         Output only. The position of this category in the set of categories. Lower numbers
         indicate a better match for the domain. null indicates not recommended.
         
        optional int64 category_rank = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasCategoryRank in interface DomainCategoryOrBuilder
        Returns:
        Whether the categoryRank field is set.
      • getCategoryRank

        public long getCategoryRank()
         Output only. The position of this category in the set of categories. Lower numbers
         indicate a better match for the domain. null indicates not recommended.
         
        optional int64 category_rank = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCategoryRank in interface DomainCategoryOrBuilder
        Returns:
        The categoryRank.
      • setCategoryRank

        public DomainCategory.Builder setCategoryRank​(long value)
         Output only. The position of this category in the set of categories. Lower numbers
         indicate a better match for the domain. null indicates not recommended.
         
        optional int64 category_rank = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The categoryRank to set.
        Returns:
        This builder for chaining.
      • clearCategoryRank

        public DomainCategory.Builder clearCategoryRank()
         Output only. The position of this category in the set of categories. Lower numbers
         indicate a better match for the domain. null indicates not recommended.
         
        optional int64 category_rank = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Returns:
        This builder for chaining.
      • hasHasChildren

        public boolean hasHasChildren()
         Output only. Indicates whether this category has sub-categories.
         
        optional bool has_children = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasHasChildren in interface DomainCategoryOrBuilder
        Returns:
        Whether the hasChildren field is set.
      • getHasChildren

        public boolean getHasChildren()
         Output only. Indicates whether this category has sub-categories.
         
        optional bool has_children = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getHasChildren in interface DomainCategoryOrBuilder
        Returns:
        The hasChildren.
      • setHasChildren

        public DomainCategory.Builder setHasChildren​(boolean value)
         Output only. Indicates whether this category has sub-categories.
         
        optional bool has_children = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The hasChildren to set.
        Returns:
        This builder for chaining.
      • clearHasChildren

        public DomainCategory.Builder clearHasChildren()
         Output only. Indicates whether this category has sub-categories.
         
        optional bool has_children = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Returns:
        This builder for chaining.
      • hasRecommendedCpcBidMicros

        public boolean hasRecommendedCpcBidMicros()
         Output only. The recommended cost per click for the category.
         
        optional int64 recommended_cpc_bid_micros = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasRecommendedCpcBidMicros in interface DomainCategoryOrBuilder
        Returns:
        Whether the recommendedCpcBidMicros field is set.
      • getRecommendedCpcBidMicros

        public long getRecommendedCpcBidMicros()
         Output only. The recommended cost per click for the category.
         
        optional int64 recommended_cpc_bid_micros = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getRecommendedCpcBidMicros in interface DomainCategoryOrBuilder
        Returns:
        The recommendedCpcBidMicros.
      • setRecommendedCpcBidMicros

        public DomainCategory.Builder setRecommendedCpcBidMicros​(long value)
         Output only. The recommended cost per click for the category.
         
        optional int64 recommended_cpc_bid_micros = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The recommendedCpcBidMicros to set.
        Returns:
        This builder for chaining.
      • clearRecommendedCpcBidMicros

        public DomainCategory.Builder clearRecommendedCpcBidMicros()
         Output only. The recommended cost per click for the category.
         
        optional int64 recommended_cpc_bid_micros = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final DomainCategory.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<DomainCategory.Builder>
      • mergeUnknownFields

        public final DomainCategory.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<DomainCategory.Builder>