Class CampaignDraft.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<CampaignDraft.Builder>
com.google.ads.googleads.v18.resources.CampaignDraft.Builder
All Implemented Interfaces:
CampaignDraftOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
CampaignDraft

public static final class CampaignDraft.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<CampaignDraft.Builder> implements CampaignDraftOrBuilder
 A campaign draft.
 
Protobuf type google.ads.googleads.v18.resources.CampaignDraft
  • Method Details

    • 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<CampaignDraft.Builder>
    • clear

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

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

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

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

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

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

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

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

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

      public CampaignDraft.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<CampaignDraft.Builder>
    • mergeFrom

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

      public CampaignDraft.Builder mergeFrom(CampaignDraft other)
    • isInitialized

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

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

      public String getResourceName()
       Immutable. The resource name of the campaign draft.
       Campaign draft resource names have the form:
      
       `customers/{customer_id}/campaignDrafts/{base_campaign_id}~{draft_id}`
       
      string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
      Specified by:
      getResourceName in interface CampaignDraftOrBuilder
      Returns:
      The resourceName.
    • getResourceNameBytes

      public com.google.protobuf.ByteString getResourceNameBytes()
       Immutable. The resource name of the campaign draft.
       Campaign draft resource names have the form:
      
       `customers/{customer_id}/campaignDrafts/{base_campaign_id}~{draft_id}`
       
      string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
      Specified by:
      getResourceNameBytes in interface CampaignDraftOrBuilder
      Returns:
      The bytes for resourceName.
    • setResourceName

      public CampaignDraft.Builder setResourceName(String value)
       Immutable. The resource name of the campaign draft.
       Campaign draft resource names have the form:
      
       `customers/{customer_id}/campaignDrafts/{base_campaign_id}~{draft_id}`
       
      string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The resourceName to set.
      Returns:
      This builder for chaining.
    • clearResourceName

      public CampaignDraft.Builder clearResourceName()
       Immutable. The resource name of the campaign draft.
       Campaign draft resource names have the form:
      
       `customers/{customer_id}/campaignDrafts/{base_campaign_id}~{draft_id}`
       
      string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • setResourceNameBytes

      public CampaignDraft.Builder setResourceNameBytes(com.google.protobuf.ByteString value)
       Immutable. The resource name of the campaign draft.
       Campaign draft resource names have the form:
      
       `customers/{customer_id}/campaignDrafts/{base_campaign_id}~{draft_id}`
       
      string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The bytes for resourceName to set.
      Returns:
      This builder for chaining.
    • hasDraftId

      public boolean hasDraftId()
       Output only. The ID of the draft.
      
       This field is read-only.
       
      optional int64 draft_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasDraftId in interface CampaignDraftOrBuilder
      Returns:
      Whether the draftId field is set.
    • getDraftId

      public long getDraftId()
       Output only. The ID of the draft.
      
       This field is read-only.
       
      optional int64 draft_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getDraftId in interface CampaignDraftOrBuilder
      Returns:
      The draftId.
    • setDraftId

      public CampaignDraft.Builder setDraftId(long value)
       Output only. The ID of the draft.
      
       This field is read-only.
       
      optional int64 draft_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The draftId to set.
      Returns:
      This builder for chaining.
    • clearDraftId

      public CampaignDraft.Builder clearDraftId()
       Output only. The ID of the draft.
      
       This field is read-only.
       
      optional int64 draft_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • hasBaseCampaign

      public boolean hasBaseCampaign()
       Immutable. The base campaign to which the draft belongs.
       
      optional string base_campaign = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
      Specified by:
      hasBaseCampaign in interface CampaignDraftOrBuilder
      Returns:
      Whether the baseCampaign field is set.
    • getBaseCampaign

      public String getBaseCampaign()
       Immutable. The base campaign to which the draft belongs.
       
      optional string base_campaign = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
      Specified by:
      getBaseCampaign in interface CampaignDraftOrBuilder
      Returns:
      The baseCampaign.
    • getBaseCampaignBytes

      public com.google.protobuf.ByteString getBaseCampaignBytes()
       Immutable. The base campaign to which the draft belongs.
       
      optional string base_campaign = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
      Specified by:
      getBaseCampaignBytes in interface CampaignDraftOrBuilder
      Returns:
      The bytes for baseCampaign.
    • setBaseCampaign

      public CampaignDraft.Builder setBaseCampaign(String value)
       Immutable. The base campaign to which the draft belongs.
       
      optional string base_campaign = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The baseCampaign to set.
      Returns:
      This builder for chaining.
    • clearBaseCampaign

      public CampaignDraft.Builder clearBaseCampaign()
       Immutable. The base campaign to which the draft belongs.
       
      optional string base_campaign = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • setBaseCampaignBytes

      public CampaignDraft.Builder setBaseCampaignBytes(com.google.protobuf.ByteString value)
       Immutable. The base campaign to which the draft belongs.
       
      optional string base_campaign = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The bytes for baseCampaign to set.
      Returns:
      This builder for chaining.
    • hasName

      public boolean hasName()
       The name of the campaign draft.
      
       This field is required and should not be empty when creating new
       campaign drafts.
      
       It must not contain any null (code point 0x0), NL line feed
       (code point 0xA) or carriage return (code point 0xD) characters.
       
      optional string name = 11;
      Specified by:
      hasName in interface CampaignDraftOrBuilder
      Returns:
      Whether the name field is set.
    • getName

      public String getName()
       The name of the campaign draft.
      
       This field is required and should not be empty when creating new
       campaign drafts.
      
       It must not contain any null (code point 0x0), NL line feed
       (code point 0xA) or carriage return (code point 0xD) characters.
       
      optional string name = 11;
      Specified by:
      getName in interface CampaignDraftOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       The name of the campaign draft.
      
       This field is required and should not be empty when creating new
       campaign drafts.
      
       It must not contain any null (code point 0x0), NL line feed
       (code point 0xA) or carriage return (code point 0xD) characters.
       
      optional string name = 11;
      Specified by:
      getNameBytes in interface CampaignDraftOrBuilder
      Returns:
      The bytes for name.
    • setName

      public CampaignDraft.Builder setName(String value)
       The name of the campaign draft.
      
       This field is required and should not be empty when creating new
       campaign drafts.
      
       It must not contain any null (code point 0x0), NL line feed
       (code point 0xA) or carriage return (code point 0xD) characters.
       
      optional string name = 11;
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public CampaignDraft.Builder clearName()
       The name of the campaign draft.
      
       This field is required and should not be empty when creating new
       campaign drafts.
      
       It must not contain any null (code point 0x0), NL line feed
       (code point 0xA) or carriage return (code point 0xD) characters.
       
      optional string name = 11;
      Returns:
      This builder for chaining.
    • setNameBytes

      public CampaignDraft.Builder setNameBytes(com.google.protobuf.ByteString value)
       The name of the campaign draft.
      
       This field is required and should not be empty when creating new
       campaign drafts.
      
       It must not contain any null (code point 0x0), NL line feed
       (code point 0xA) or carriage return (code point 0xD) characters.
       
      optional string name = 11;
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • hasDraftCampaign

      public boolean hasDraftCampaign()
       Output only. Resource name of the Campaign that results from overlaying the
       draft changes onto the base campaign.
      
       This field is read-only.
       
      optional string draft_campaign = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
      Specified by:
      hasDraftCampaign in interface CampaignDraftOrBuilder
      Returns:
      Whether the draftCampaign field is set.
    • getDraftCampaign

      public String getDraftCampaign()
       Output only. Resource name of the Campaign that results from overlaying the
       draft changes onto the base campaign.
      
       This field is read-only.
       
      optional string draft_campaign = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
      Specified by:
      getDraftCampaign in interface CampaignDraftOrBuilder
      Returns:
      The draftCampaign.
    • getDraftCampaignBytes

      public com.google.protobuf.ByteString getDraftCampaignBytes()
       Output only. Resource name of the Campaign that results from overlaying the
       draft changes onto the base campaign.
      
       This field is read-only.
       
      optional string draft_campaign = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
      Specified by:
      getDraftCampaignBytes in interface CampaignDraftOrBuilder
      Returns:
      The bytes for draftCampaign.
    • setDraftCampaign

      public CampaignDraft.Builder setDraftCampaign(String value)
       Output only. Resource name of the Campaign that results from overlaying the
       draft changes onto the base campaign.
      
       This field is read-only.
       
      optional string draft_campaign = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The draftCampaign to set.
      Returns:
      This builder for chaining.
    • clearDraftCampaign

      public CampaignDraft.Builder clearDraftCampaign()
       Output only. Resource name of the Campaign that results from overlaying the
       draft changes onto the base campaign.
      
       This field is read-only.
       
      optional string draft_campaign = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • setDraftCampaignBytes

      public CampaignDraft.Builder setDraftCampaignBytes(com.google.protobuf.ByteString value)
       Output only. Resource name of the Campaign that results from overlaying the
       draft changes onto the base campaign.
      
       This field is read-only.
       
      optional string draft_campaign = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The bytes for draftCampaign to set.
      Returns:
      This builder for chaining.
    • getStatusValue

      public int getStatusValue()
       Output only. The status of the campaign draft. This field is read-only.
      
       When a new campaign draft is added, the status defaults to PROPOSED.
       
      .google.ads.googleads.v18.enums.CampaignDraftStatusEnum.CampaignDraftStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getStatusValue in interface CampaignDraftOrBuilder
      Returns:
      The enum numeric value on the wire for status.
    • setStatusValue

      public CampaignDraft.Builder setStatusValue(int value)
       Output only. The status of the campaign draft. This field is read-only.
      
       When a new campaign draft is added, the status defaults to PROPOSED.
       
      .google.ads.googleads.v18.enums.CampaignDraftStatusEnum.CampaignDraftStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The enum numeric value on the wire for status to set.
      Returns:
      This builder for chaining.
    • getStatus

       Output only. The status of the campaign draft. This field is read-only.
      
       When a new campaign draft is added, the status defaults to PROPOSED.
       
      .google.ads.googleads.v18.enums.CampaignDraftStatusEnum.CampaignDraftStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getStatus in interface CampaignDraftOrBuilder
      Returns:
      The status.
    • setStatus

       Output only. The status of the campaign draft. This field is read-only.
      
       When a new campaign draft is added, the status defaults to PROPOSED.
       
      .google.ads.googleads.v18.enums.CampaignDraftStatusEnum.CampaignDraftStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The status to set.
      Returns:
      This builder for chaining.
    • clearStatus

      public CampaignDraft.Builder clearStatus()
       Output only. The status of the campaign draft. This field is read-only.
      
       When a new campaign draft is added, the status defaults to PROPOSED.
       
      .google.ads.googleads.v18.enums.CampaignDraftStatusEnum.CampaignDraftStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • hasHasExperimentRunning

      public boolean hasHasExperimentRunning()
       Output only. Whether there is an experiment based on this draft currently
       serving.
       
      optional bool has_experiment_running = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasHasExperimentRunning in interface CampaignDraftOrBuilder
      Returns:
      Whether the hasExperimentRunning field is set.
    • getHasExperimentRunning

      public boolean getHasExperimentRunning()
       Output only. Whether there is an experiment based on this draft currently
       serving.
       
      optional bool has_experiment_running = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getHasExperimentRunning in interface CampaignDraftOrBuilder
      Returns:
      The hasExperimentRunning.
    • setHasExperimentRunning

      public CampaignDraft.Builder setHasExperimentRunning(boolean value)
       Output only. Whether there is an experiment based on this draft currently
       serving.
       
      optional bool has_experiment_running = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The hasExperimentRunning to set.
      Returns:
      This builder for chaining.
    • clearHasExperimentRunning

      public CampaignDraft.Builder clearHasExperimentRunning()
       Output only. Whether there is an experiment based on this draft currently
       serving.
       
      optional bool has_experiment_running = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • hasLongRunningOperation

      public boolean hasLongRunningOperation()
       Output only. The resource name of the long-running operation that can be
       used to poll for completion of draft promotion. This is only set if the
       draft promotion is in progress or finished.
       
      optional string long_running_operation = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasLongRunningOperation in interface CampaignDraftOrBuilder
      Returns:
      Whether the longRunningOperation field is set.
    • getLongRunningOperation

      public String getLongRunningOperation()
       Output only. The resource name of the long-running operation that can be
       used to poll for completion of draft promotion. This is only set if the
       draft promotion is in progress or finished.
       
      optional string long_running_operation = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getLongRunningOperation in interface CampaignDraftOrBuilder
      Returns:
      The longRunningOperation.
    • getLongRunningOperationBytes

      public com.google.protobuf.ByteString getLongRunningOperationBytes()
       Output only. The resource name of the long-running operation that can be
       used to poll for completion of draft promotion. This is only set if the
       draft promotion is in progress or finished.
       
      optional string long_running_operation = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getLongRunningOperationBytes in interface CampaignDraftOrBuilder
      Returns:
      The bytes for longRunningOperation.
    • setLongRunningOperation

      public CampaignDraft.Builder setLongRunningOperation(String value)
       Output only. The resource name of the long-running operation that can be
       used to poll for completion of draft promotion. This is only set if the
       draft promotion is in progress or finished.
       
      optional string long_running_operation = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The longRunningOperation to set.
      Returns:
      This builder for chaining.
    • clearLongRunningOperation

      public CampaignDraft.Builder clearLongRunningOperation()
       Output only. The resource name of the long-running operation that can be
       used to poll for completion of draft promotion. This is only set if the
       draft promotion is in progress or finished.
       
      optional string long_running_operation = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • setLongRunningOperationBytes

      public CampaignDraft.Builder setLongRunningOperationBytes(com.google.protobuf.ByteString value)
       Output only. The resource name of the long-running operation that can be
       used to poll for completion of draft promotion. This is only set if the
       draft promotion is in progress or finished.
       
      optional string long_running_operation = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The bytes for longRunningOperation to set.
      Returns:
      This builder for chaining.
    • setUnknownFields

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

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