Class CampaignDuration.Builder

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

    public static final class CampaignDuration.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<CampaignDuration.Builder>
    implements CampaignDurationOrBuilder
     The duration of a planned campaign.
     
    Protobuf type google.ads.googleads.v10.services.CampaignDuration
    • 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<CampaignDuration.Builder>
      • clear

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

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

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

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

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

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

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

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

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

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

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

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

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

        public boolean hasDurationInDays()
         The duration value in days.
         This field cannot be combined with the date_range field.
         
        optional int32 duration_in_days = 2;
        Specified by:
        hasDurationInDays in interface CampaignDurationOrBuilder
        Returns:
        Whether the durationInDays field is set.
      • getDurationInDays

        public int getDurationInDays()
         The duration value in days.
         This field cannot be combined with the date_range field.
         
        optional int32 duration_in_days = 2;
        Specified by:
        getDurationInDays in interface CampaignDurationOrBuilder
        Returns:
        The durationInDays.
      • setDurationInDays

        public CampaignDuration.Builder setDurationInDays​(int value)
         The duration value in days.
         This field cannot be combined with the date_range field.
         
        optional int32 duration_in_days = 2;
        Parameters:
        value - The durationInDays to set.
        Returns:
        This builder for chaining.
      • clearDurationInDays

        public CampaignDuration.Builder clearDurationInDays()
         The duration value in days.
         This field cannot be combined with the date_range field.
         
        optional int32 duration_in_days = 2;
        Returns:
        This builder for chaining.
      • hasDateRange

        public boolean hasDateRange()
         Date range of the campaign.
         Dates are in the yyyy-mm-dd format and inclusive.
         The end date must be < 1 year in the future and the
         date range must be <= 92 days long.
         This field cannot be combined with the duration_in_days field.
         
        .google.ads.googleads.v10.common.DateRange date_range = 3;
        Specified by:
        hasDateRange in interface CampaignDurationOrBuilder
        Returns:
        Whether the dateRange field is set.
      • getDateRange

        public DateRange getDateRange()
         Date range of the campaign.
         Dates are in the yyyy-mm-dd format and inclusive.
         The end date must be < 1 year in the future and the
         date range must be <= 92 days long.
         This field cannot be combined with the duration_in_days field.
         
        .google.ads.googleads.v10.common.DateRange date_range = 3;
        Specified by:
        getDateRange in interface CampaignDurationOrBuilder
        Returns:
        The dateRange.
      • setDateRange

        public CampaignDuration.Builder setDateRange​(DateRange value)
         Date range of the campaign.
         Dates are in the yyyy-mm-dd format and inclusive.
         The end date must be < 1 year in the future and the
         date range must be <= 92 days long.
         This field cannot be combined with the duration_in_days field.
         
        .google.ads.googleads.v10.common.DateRange date_range = 3;
      • setDateRange

        public CampaignDuration.Builder setDateRange​(DateRange.Builder builderForValue)
         Date range of the campaign.
         Dates are in the yyyy-mm-dd format and inclusive.
         The end date must be < 1 year in the future and the
         date range must be <= 92 days long.
         This field cannot be combined with the duration_in_days field.
         
        .google.ads.googleads.v10.common.DateRange date_range = 3;
      • mergeDateRange

        public CampaignDuration.Builder mergeDateRange​(DateRange value)
         Date range of the campaign.
         Dates are in the yyyy-mm-dd format and inclusive.
         The end date must be < 1 year in the future and the
         date range must be <= 92 days long.
         This field cannot be combined with the duration_in_days field.
         
        .google.ads.googleads.v10.common.DateRange date_range = 3;
      • clearDateRange

        public CampaignDuration.Builder clearDateRange()
         Date range of the campaign.
         Dates are in the yyyy-mm-dd format and inclusive.
         The end date must be < 1 year in the future and the
         date range must be <= 92 days long.
         This field cannot be combined with the duration_in_days field.
         
        .google.ads.googleads.v10.common.DateRange date_range = 3;
      • getDateRangeBuilder

        public DateRange.Builder getDateRangeBuilder()
         Date range of the campaign.
         Dates are in the yyyy-mm-dd format and inclusive.
         The end date must be < 1 year in the future and the
         date range must be <= 92 days long.
         This field cannot be combined with the duration_in_days field.
         
        .google.ads.googleads.v10.common.DateRange date_range = 3;
      • getDateRangeOrBuilder

        public DateRangeOrBuilder getDateRangeOrBuilder()
         Date range of the campaign.
         Dates are in the yyyy-mm-dd format and inclusive.
         The end date must be < 1 year in the future and the
         date range must be <= 92 days long.
         This field cannot be combined with the duration_in_days field.
         
        .google.ads.googleads.v10.common.DateRange date_range = 3;
        Specified by:
        getDateRangeOrBuilder in interface CampaignDurationOrBuilder
      • setUnknownFields

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

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