Class Campaign.ShoppingSetting.Builder

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

    public static final class Campaign.ShoppingSetting.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Campaign.ShoppingSetting.Builder>
    implements Campaign.ShoppingSettingOrBuilder
     The setting for Shopping campaigns. Defines the universe of products that
     can be advertised by the campaign, and how this campaign interacts with
     other Shopping campaigns.
     
    Protobuf type google.ads.googleads.v14.resources.Campaign.ShoppingSetting
    • 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<Campaign.ShoppingSetting.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<Campaign.ShoppingSetting.Builder>
      • getDefaultInstanceForType

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

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

        public Campaign.ShoppingSetting buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • setField

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

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

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

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

        public Campaign.ShoppingSetting.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<Campaign.ShoppingSetting.Builder>
        Throws:
        java.io.IOException
      • hasMerchantId

        public boolean hasMerchantId()
         Immutable. ID of the Merchant Center account.
         This field is required for create operations. This field is immutable for
         Shopping campaigns.
         
        optional int64 merchant_id = 5 [(.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        hasMerchantId in interface Campaign.ShoppingSettingOrBuilder
        Returns:
        Whether the merchantId field is set.
      • getMerchantId

        public long getMerchantId()
         Immutable. ID of the Merchant Center account.
         This field is required for create operations. This field is immutable for
         Shopping campaigns.
         
        optional int64 merchant_id = 5 [(.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getMerchantId in interface Campaign.ShoppingSettingOrBuilder
        Returns:
        The merchantId.
      • setMerchantId

        public Campaign.ShoppingSetting.Builder setMerchantId​(long value)
         Immutable. ID of the Merchant Center account.
         This field is required for create operations. This field is immutable for
         Shopping campaigns.
         
        optional int64 merchant_id = 5 [(.google.api.field_behavior) = IMMUTABLE];
        Parameters:
        value - The merchantId to set.
        Returns:
        This builder for chaining.
      • clearMerchantId

        public Campaign.ShoppingSetting.Builder clearMerchantId()
         Immutable. ID of the Merchant Center account.
         This field is required for create operations. This field is immutable for
         Shopping campaigns.
         
        optional int64 merchant_id = 5 [(.google.api.field_behavior) = IMMUTABLE];
        Returns:
        This builder for chaining.
      • hasSalesCountry

        public boolean hasSalesCountry()
         Sales country of products to include in the campaign.
         Only one of feed_label or sales_country can be set.
         Field is immutable except for clearing.
         Once this field is cleared, you must use feed_label if you
         want to set the sales country.
         
        optional string sales_country = 6;
        Specified by:
        hasSalesCountry in interface Campaign.ShoppingSettingOrBuilder
        Returns:
        Whether the salesCountry field is set.
      • getSalesCountry

        public java.lang.String getSalesCountry()
         Sales country of products to include in the campaign.
         Only one of feed_label or sales_country can be set.
         Field is immutable except for clearing.
         Once this field is cleared, you must use feed_label if you
         want to set the sales country.
         
        optional string sales_country = 6;
        Specified by:
        getSalesCountry in interface Campaign.ShoppingSettingOrBuilder
        Returns:
        The salesCountry.
      • getSalesCountryBytes

        public com.google.protobuf.ByteString getSalesCountryBytes()
         Sales country of products to include in the campaign.
         Only one of feed_label or sales_country can be set.
         Field is immutable except for clearing.
         Once this field is cleared, you must use feed_label if you
         want to set the sales country.
         
        optional string sales_country = 6;
        Specified by:
        getSalesCountryBytes in interface Campaign.ShoppingSettingOrBuilder
        Returns:
        The bytes for salesCountry.
      • setSalesCountry

        public Campaign.ShoppingSetting.Builder setSalesCountry​(java.lang.String value)
         Sales country of products to include in the campaign.
         Only one of feed_label or sales_country can be set.
         Field is immutable except for clearing.
         Once this field is cleared, you must use feed_label if you
         want to set the sales country.
         
        optional string sales_country = 6;
        Parameters:
        value - The salesCountry to set.
        Returns:
        This builder for chaining.
      • clearSalesCountry

        public Campaign.ShoppingSetting.Builder clearSalesCountry()
         Sales country of products to include in the campaign.
         Only one of feed_label or sales_country can be set.
         Field is immutable except for clearing.
         Once this field is cleared, you must use feed_label if you
         want to set the sales country.
         
        optional string sales_country = 6;
        Returns:
        This builder for chaining.
      • setSalesCountryBytes

        public Campaign.ShoppingSetting.Builder setSalesCountryBytes​(com.google.protobuf.ByteString value)
         Sales country of products to include in the campaign.
         Only one of feed_label or sales_country can be set.
         Field is immutable except for clearing.
         Once this field is cleared, you must use feed_label if you
         want to set the sales country.
         
        optional string sales_country = 6;
        Parameters:
        value - The bytes for salesCountry to set.
        Returns:
        This builder for chaining.
      • getFeedLabel

        public java.lang.String getFeedLabel()
         Feed label of products to include in the campaign.
         Only one of feed_label or sales_country can be set.
         If used instead of sales_country, the feed_label field accepts country
         codes in the same format for example: 'XX'.
         Otherwise can be any string used for feed label in Google Merchant
         Center.
         
        string feed_label = 10;
        Specified by:
        getFeedLabel in interface Campaign.ShoppingSettingOrBuilder
        Returns:
        The feedLabel.
      • getFeedLabelBytes

        public com.google.protobuf.ByteString getFeedLabelBytes()
         Feed label of products to include in the campaign.
         Only one of feed_label or sales_country can be set.
         If used instead of sales_country, the feed_label field accepts country
         codes in the same format for example: 'XX'.
         Otherwise can be any string used for feed label in Google Merchant
         Center.
         
        string feed_label = 10;
        Specified by:
        getFeedLabelBytes in interface Campaign.ShoppingSettingOrBuilder
        Returns:
        The bytes for feedLabel.
      • setFeedLabel

        public Campaign.ShoppingSetting.Builder setFeedLabel​(java.lang.String value)
         Feed label of products to include in the campaign.
         Only one of feed_label or sales_country can be set.
         If used instead of sales_country, the feed_label field accepts country
         codes in the same format for example: 'XX'.
         Otherwise can be any string used for feed label in Google Merchant
         Center.
         
        string feed_label = 10;
        Parameters:
        value - The feedLabel to set.
        Returns:
        This builder for chaining.
      • clearFeedLabel

        public Campaign.ShoppingSetting.Builder clearFeedLabel()
         Feed label of products to include in the campaign.
         Only one of feed_label or sales_country can be set.
         If used instead of sales_country, the feed_label field accepts country
         codes in the same format for example: 'XX'.
         Otherwise can be any string used for feed label in Google Merchant
         Center.
         
        string feed_label = 10;
        Returns:
        This builder for chaining.
      • setFeedLabelBytes

        public Campaign.ShoppingSetting.Builder setFeedLabelBytes​(com.google.protobuf.ByteString value)
         Feed label of products to include in the campaign.
         Only one of feed_label or sales_country can be set.
         If used instead of sales_country, the feed_label field accepts country
         codes in the same format for example: 'XX'.
         Otherwise can be any string used for feed label in Google Merchant
         Center.
         
        string feed_label = 10;
        Parameters:
        value - The bytes for feedLabel to set.
        Returns:
        This builder for chaining.
      • hasCampaignPriority

        public boolean hasCampaignPriority()
         Priority of the campaign. Campaigns with numerically higher priorities
         take precedence over those with lower priorities.
         This field is required for Shopping campaigns, with values between 0 and
         2, inclusive.
         This field is optional for Smart Shopping campaigns, but must be equal to
         3 if set.
         
        optional int32 campaign_priority = 7;
        Specified by:
        hasCampaignPriority in interface Campaign.ShoppingSettingOrBuilder
        Returns:
        Whether the campaignPriority field is set.
      • getCampaignPriority

        public int getCampaignPriority()
         Priority of the campaign. Campaigns with numerically higher priorities
         take precedence over those with lower priorities.
         This field is required for Shopping campaigns, with values between 0 and
         2, inclusive.
         This field is optional for Smart Shopping campaigns, but must be equal to
         3 if set.
         
        optional int32 campaign_priority = 7;
        Specified by:
        getCampaignPriority in interface Campaign.ShoppingSettingOrBuilder
        Returns:
        The campaignPriority.
      • setCampaignPriority

        public Campaign.ShoppingSetting.Builder setCampaignPriority​(int value)
         Priority of the campaign. Campaigns with numerically higher priorities
         take precedence over those with lower priorities.
         This field is required for Shopping campaigns, with values between 0 and
         2, inclusive.
         This field is optional for Smart Shopping campaigns, but must be equal to
         3 if set.
         
        optional int32 campaign_priority = 7;
        Parameters:
        value - The campaignPriority to set.
        Returns:
        This builder for chaining.
      • clearCampaignPriority

        public Campaign.ShoppingSetting.Builder clearCampaignPriority()
         Priority of the campaign. Campaigns with numerically higher priorities
         take precedence over those with lower priorities.
         This field is required for Shopping campaigns, with values between 0 and
         2, inclusive.
         This field is optional for Smart Shopping campaigns, but must be equal to
         3 if set.
         
        optional int32 campaign_priority = 7;
        Returns:
        This builder for chaining.
      • hasEnableLocal

        public boolean hasEnableLocal()
         Whether to include local products.
         
        optional bool enable_local = 8;
        Specified by:
        hasEnableLocal in interface Campaign.ShoppingSettingOrBuilder
        Returns:
        Whether the enableLocal field is set.
      • setEnableLocal

        public Campaign.ShoppingSetting.Builder setEnableLocal​(boolean value)
         Whether to include local products.
         
        optional bool enable_local = 8;
        Parameters:
        value - The enableLocal to set.
        Returns:
        This builder for chaining.
      • clearEnableLocal

        public Campaign.ShoppingSetting.Builder clearEnableLocal()
         Whether to include local products.
         
        optional bool enable_local = 8;
        Returns:
        This builder for chaining.
      • getUseVehicleInventory

        public boolean getUseVehicleInventory()
         Immutable. Whether to target Vehicle Listing inventory. This field is
         supported only in Smart Shopping Campaigns. For setting Vehicle Listing
         inventory in Performance Max campaigns, use `listing_type` instead.
         
        bool use_vehicle_inventory = 9 [(.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getUseVehicleInventory in interface Campaign.ShoppingSettingOrBuilder
        Returns:
        The useVehicleInventory.
      • setUseVehicleInventory

        public Campaign.ShoppingSetting.Builder setUseVehicleInventory​(boolean value)
         Immutable. Whether to target Vehicle Listing inventory. This field is
         supported only in Smart Shopping Campaigns. For setting Vehicle Listing
         inventory in Performance Max campaigns, use `listing_type` instead.
         
        bool use_vehicle_inventory = 9 [(.google.api.field_behavior) = IMMUTABLE];
        Parameters:
        value - The useVehicleInventory to set.
        Returns:
        This builder for chaining.
      • clearUseVehicleInventory

        public Campaign.ShoppingSetting.Builder clearUseVehicleInventory()
         Immutable. Whether to target Vehicle Listing inventory. This field is
         supported only in Smart Shopping Campaigns. For setting Vehicle Listing
         inventory in Performance Max campaigns, use `listing_type` instead.
         
        bool use_vehicle_inventory = 9 [(.google.api.field_behavior) = IMMUTABLE];
        Returns:
        This builder for chaining.
      • getAdvertisingPartnerIdsList

        public java.util.List<java.lang.Long> getAdvertisingPartnerIdsList()
         Immutable. The ads account IDs of advertising partners cooperating within
         the campaign.
         
        repeated int64 advertising_partner_ids = 11 [(.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getAdvertisingPartnerIdsList in interface Campaign.ShoppingSettingOrBuilder
        Returns:
        A list containing the advertisingPartnerIds.
      • getAdvertisingPartnerIdsCount

        public int getAdvertisingPartnerIdsCount()
         Immutable. The ads account IDs of advertising partners cooperating within
         the campaign.
         
        repeated int64 advertising_partner_ids = 11 [(.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getAdvertisingPartnerIdsCount in interface Campaign.ShoppingSettingOrBuilder
        Returns:
        The count of advertisingPartnerIds.
      • getAdvertisingPartnerIds

        public long getAdvertisingPartnerIds​(int index)
         Immutable. The ads account IDs of advertising partners cooperating within
         the campaign.
         
        repeated int64 advertising_partner_ids = 11 [(.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getAdvertisingPartnerIds in interface Campaign.ShoppingSettingOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The advertisingPartnerIds at the given index.
      • setAdvertisingPartnerIds

        public Campaign.ShoppingSetting.Builder setAdvertisingPartnerIds​(int index,
                                                                         long value)
         Immutable. The ads account IDs of advertising partners cooperating within
         the campaign.
         
        repeated int64 advertising_partner_ids = 11 [(.google.api.field_behavior) = IMMUTABLE];
        Parameters:
        index - The index to set the value at.
        value - The advertisingPartnerIds to set.
        Returns:
        This builder for chaining.
      • addAdvertisingPartnerIds

        public Campaign.ShoppingSetting.Builder addAdvertisingPartnerIds​(long value)
         Immutable. The ads account IDs of advertising partners cooperating within
         the campaign.
         
        repeated int64 advertising_partner_ids = 11 [(.google.api.field_behavior) = IMMUTABLE];
        Parameters:
        value - The advertisingPartnerIds to add.
        Returns:
        This builder for chaining.
      • addAllAdvertisingPartnerIds

        public Campaign.ShoppingSetting.Builder addAllAdvertisingPartnerIds​(java.lang.Iterable<? extends java.lang.Long> values)
         Immutable. The ads account IDs of advertising partners cooperating within
         the campaign.
         
        repeated int64 advertising_partner_ids = 11 [(.google.api.field_behavior) = IMMUTABLE];
        Parameters:
        values - The advertisingPartnerIds to add.
        Returns:
        This builder for chaining.
      • clearAdvertisingPartnerIds

        public Campaign.ShoppingSetting.Builder clearAdvertisingPartnerIds()
         Immutable. The ads account IDs of advertising partners cooperating within
         the campaign.
         
        repeated int64 advertising_partner_ids = 11 [(.google.api.field_behavior) = IMMUTABLE];
        Returns:
        This builder for chaining.
      • setUnknownFields

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

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