Class CampaignExperiment

  • All Implemented Interfaces:
    CampaignExperimentOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, java.io.Serializable

    public final class CampaignExperiment
    extends com.google.protobuf.GeneratedMessageV3
    implements CampaignExperimentOrBuilder
     An A/B experiment that compares the performance of the base campaign
     (the control) and a variation of that campaign (the experiment).
     
    Protobuf type google.ads.googleads.v10.resources.CampaignExperiment
    See Also:
    Serialized Form
    • Field Detail

      • RESOURCE_NAME_FIELD_NUMBER

        public static final int RESOURCE_NAME_FIELD_NUMBER
        See Also:
        Constant Field Values
      • CAMPAIGN_DRAFT_FIELD_NUMBER

        public static final int CAMPAIGN_DRAFT_FIELD_NUMBER
        See Also:
        Constant Field Values
      • DESCRIPTION_FIELD_NUMBER

        public static final int DESCRIPTION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • TRAFFIC_SPLIT_PERCENT_FIELD_NUMBER

        public static final int TRAFFIC_SPLIT_PERCENT_FIELD_NUMBER
        See Also:
        Constant Field Values
      • TRAFFIC_SPLIT_TYPE_FIELD_NUMBER

        public static final int TRAFFIC_SPLIT_TYPE_FIELD_NUMBER
        See Also:
        Constant Field Values
      • EXPERIMENT_CAMPAIGN_FIELD_NUMBER

        public static final int EXPERIMENT_CAMPAIGN_FIELD_NUMBER
        See Also:
        Constant Field Values
      • LONG_RUNNING_OPERATION_FIELD_NUMBER

        public static final int LONG_RUNNING_OPERATION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • START_DATE_FIELD_NUMBER

        public static final int START_DATE_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

      • newInstance

        protected java.lang.Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getUnknownFields

        public final com.google.protobuf.UnknownFieldSet getUnknownFields()
        Specified by:
        getUnknownFields in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getUnknownFields in class com.google.protobuf.GeneratedMessageV3
      • 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
      • getResourceName

        public java.lang.String getResourceName()
         Immutable. The resource name of the campaign experiment.
         Campaign experiment resource names have the form:
         `customers/{customer_id}/campaignExperiments/{campaign_experiment_id}`
         
        string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
        Specified by:
        getResourceName in interface CampaignExperimentOrBuilder
        Returns:
        The resourceName.
      • getResourceNameBytes

        public com.google.protobuf.ByteString getResourceNameBytes()
         Immutable. The resource name of the campaign experiment.
         Campaign experiment resource names have the form:
         `customers/{customer_id}/campaignExperiments/{campaign_experiment_id}`
         
        string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
        Specified by:
        getResourceNameBytes in interface CampaignExperimentOrBuilder
        Returns:
        The bytes for resourceName.
      • hasId

        public boolean hasId()
         Output only. The ID of the campaign experiment.
         This field is read-only.
         
        optional int64 id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasId in interface CampaignExperimentOrBuilder
        Returns:
        Whether the id field is set.
      • getId

        public long getId()
         Output only. The ID of the campaign experiment.
         This field is read-only.
         
        optional int64 id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getId in interface CampaignExperimentOrBuilder
        Returns:
        The id.
      • hasCampaignDraft

        public boolean hasCampaignDraft()
         Immutable. The campaign draft with staged changes to the base campaign.
         
        optional string campaign_draft = 14 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
        Specified by:
        hasCampaignDraft in interface CampaignExperimentOrBuilder
        Returns:
        Whether the campaignDraft field is set.
      • getCampaignDraft

        public java.lang.String getCampaignDraft()
         Immutable. The campaign draft with staged changes to the base campaign.
         
        optional string campaign_draft = 14 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
        Specified by:
        getCampaignDraft in interface CampaignExperimentOrBuilder
        Returns:
        The campaignDraft.
      • getCampaignDraftBytes

        public com.google.protobuf.ByteString getCampaignDraftBytes()
         Immutable. The campaign draft with staged changes to the base campaign.
         
        optional string campaign_draft = 14 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
        Specified by:
        getCampaignDraftBytes in interface CampaignExperimentOrBuilder
        Returns:
        The bytes for campaignDraft.
      • hasName

        public boolean hasName()
         The name of the campaign experiment.
         This field is required when creating new campaign experiments
         and must not conflict with the name of another non-removed
         campaign experiment or campaign.
         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 = 15;
        Specified by:
        hasName in interface CampaignExperimentOrBuilder
        Returns:
        Whether the name field is set.
      • getName

        public java.lang.String getName()
         The name of the campaign experiment.
         This field is required when creating new campaign experiments
         and must not conflict with the name of another non-removed
         campaign experiment or campaign.
         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 = 15;
        Specified by:
        getName in interface CampaignExperimentOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         The name of the campaign experiment.
         This field is required when creating new campaign experiments
         and must not conflict with the name of another non-removed
         campaign experiment or campaign.
         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 = 15;
        Specified by:
        getNameBytes in interface CampaignExperimentOrBuilder
        Returns:
        The bytes for name.
      • hasDescription

        public boolean hasDescription()
         The description of the experiment.
         
        optional string description = 16;
        Specified by:
        hasDescription in interface CampaignExperimentOrBuilder
        Returns:
        Whether the description field is set.
      • getDescription

        public java.lang.String getDescription()
         The description of the experiment.
         
        optional string description = 16;
        Specified by:
        getDescription in interface CampaignExperimentOrBuilder
        Returns:
        The description.
      • getDescriptionBytes

        public com.google.protobuf.ByteString getDescriptionBytes()
         The description of the experiment.
         
        optional string description = 16;
        Specified by:
        getDescriptionBytes in interface CampaignExperimentOrBuilder
        Returns:
        The bytes for description.
      • hasTrafficSplitPercent

        public boolean hasTrafficSplitPercent()
         Immutable. Share of traffic directed to experiment as a percent (must be between 1 and
         99 inclusive. Base campaign receives the remainder of the traffic
         (100 - traffic_split_percent). Required for create.
         
        optional int64 traffic_split_percent = 17 [(.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        hasTrafficSplitPercent in interface CampaignExperimentOrBuilder
        Returns:
        Whether the trafficSplitPercent field is set.
      • getTrafficSplitPercent

        public long getTrafficSplitPercent()
         Immutable. Share of traffic directed to experiment as a percent (must be between 1 and
         99 inclusive. Base campaign receives the remainder of the traffic
         (100 - traffic_split_percent). Required for create.
         
        optional int64 traffic_split_percent = 17 [(.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getTrafficSplitPercent in interface CampaignExperimentOrBuilder
        Returns:
        The trafficSplitPercent.
      • getTrafficSplitTypeValue

        public int getTrafficSplitTypeValue()
         Immutable. Determines the behavior of the traffic split.
         
        .google.ads.googleads.v10.enums.CampaignExperimentTrafficSplitTypeEnum.CampaignExperimentTrafficSplitType traffic_split_type = 7 [(.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getTrafficSplitTypeValue in interface CampaignExperimentOrBuilder
        Returns:
        The enum numeric value on the wire for trafficSplitType.
      • hasExperimentCampaign

        public boolean hasExperimentCampaign()
         Output only. The experiment campaign, as opposed to the base campaign.
         
        optional string experiment_campaign = 18 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
        Specified by:
        hasExperimentCampaign in interface CampaignExperimentOrBuilder
        Returns:
        Whether the experimentCampaign field is set.
      • getExperimentCampaign

        public java.lang.String getExperimentCampaign()
         Output only. The experiment campaign, as opposed to the base campaign.
         
        optional string experiment_campaign = 18 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
        Specified by:
        getExperimentCampaign in interface CampaignExperimentOrBuilder
        Returns:
        The experimentCampaign.
      • getExperimentCampaignBytes

        public com.google.protobuf.ByteString getExperimentCampaignBytes()
         Output only. The experiment campaign, as opposed to the base campaign.
         
        optional string experiment_campaign = 18 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
        Specified by:
        getExperimentCampaignBytes in interface CampaignExperimentOrBuilder
        Returns:
        The bytes for experimentCampaign.
      • getStatusValue

        public int getStatusValue()
         Output only. The status of the campaign experiment. This field is read-only.
         
        .google.ads.googleads.v10.enums.CampaignExperimentStatusEnum.CampaignExperimentStatus status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getStatusValue in interface CampaignExperimentOrBuilder
        Returns:
        The enum numeric value on the wire for status.
      • hasLongRunningOperation

        public boolean hasLongRunningOperation()
         Output only. The resource name of the long-running operation that can be used to poll
         for completion of experiment create or promote. The most recent long
         running operation is returned.
         
        optional string long_running_operation = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasLongRunningOperation in interface CampaignExperimentOrBuilder
        Returns:
        Whether the longRunningOperation field is set.
      • getLongRunningOperation

        public java.lang.String getLongRunningOperation()
         Output only. The resource name of the long-running operation that can be used to poll
         for completion of experiment create or promote. The most recent long
         running operation is returned.
         
        optional string long_running_operation = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getLongRunningOperation in interface CampaignExperimentOrBuilder
        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 experiment create or promote. The most recent long
         running operation is returned.
         
        optional string long_running_operation = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getLongRunningOperationBytes in interface CampaignExperimentOrBuilder
        Returns:
        The bytes for longRunningOperation.
      • hasStartDate

        public boolean hasStartDate()
         Date when the campaign experiment starts. By default, the experiment starts
         now or on the campaign's start date, whichever is later. If this field is
         set, then the experiment starts at the beginning of the specified date in
         the customer's time zone. Cannot be changed once the experiment starts.
         Format: YYYY-MM-DD
         Example: 2019-03-14
         
        optional string start_date = 20;
        Specified by:
        hasStartDate in interface CampaignExperimentOrBuilder
        Returns:
        Whether the startDate field is set.
      • getStartDate

        public java.lang.String getStartDate()
         Date when the campaign experiment starts. By default, the experiment starts
         now or on the campaign's start date, whichever is later. If this field is
         set, then the experiment starts at the beginning of the specified date in
         the customer's time zone. Cannot be changed once the experiment starts.
         Format: YYYY-MM-DD
         Example: 2019-03-14
         
        optional string start_date = 20;
        Specified by:
        getStartDate in interface CampaignExperimentOrBuilder
        Returns:
        The startDate.
      • getStartDateBytes

        public com.google.protobuf.ByteString getStartDateBytes()
         Date when the campaign experiment starts. By default, the experiment starts
         now or on the campaign's start date, whichever is later. If this field is
         set, then the experiment starts at the beginning of the specified date in
         the customer's time zone. Cannot be changed once the experiment starts.
         Format: YYYY-MM-DD
         Example: 2019-03-14
         
        optional string start_date = 20;
        Specified by:
        getStartDateBytes in interface CampaignExperimentOrBuilder
        Returns:
        The bytes for startDate.
      • hasEndDate

        public boolean hasEndDate()
         The last day of the campaign experiment. By default, the experiment ends on
         the campaign's end date. If this field is set, then the experiment ends at
         the end of the specified date in the customer's time zone.
         Format: YYYY-MM-DD
         Example: 2019-04-18
         
        optional string end_date = 21;
        Specified by:
        hasEndDate in interface CampaignExperimentOrBuilder
        Returns:
        Whether the endDate field is set.
      • getEndDate

        public java.lang.String getEndDate()
         The last day of the campaign experiment. By default, the experiment ends on
         the campaign's end date. If this field is set, then the experiment ends at
         the end of the specified date in the customer's time zone.
         Format: YYYY-MM-DD
         Example: 2019-04-18
         
        optional string end_date = 21;
        Specified by:
        getEndDate in interface CampaignExperimentOrBuilder
        Returns:
        The endDate.
      • getEndDateBytes

        public com.google.protobuf.ByteString getEndDateBytes()
         The last day of the campaign experiment. By default, the experiment ends on
         the campaign's end date. If this field is set, then the experiment ends at
         the end of the specified date in the customer's time zone.
         Format: YYYY-MM-DD
         Example: 2019-04-18
         
        optional string end_date = 21;
        Specified by:
        getEndDateBytes in interface CampaignExperimentOrBuilder
        Returns:
        The bytes for endDate.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws java.io.IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        java.io.IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static CampaignExperiment parseFrom​(java.nio.ByteBuffer data)
                                            throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static CampaignExperiment parseFrom​(java.nio.ByteBuffer data,
                                                   com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                            throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static CampaignExperiment parseFrom​(com.google.protobuf.ByteString data)
                                            throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static CampaignExperiment parseFrom​(com.google.protobuf.ByteString data,
                                                   com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                            throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static CampaignExperiment parseFrom​(byte[] data)
                                            throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static CampaignExperiment parseFrom​(byte[] data,
                                                   com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                            throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static CampaignExperiment parseFrom​(java.io.InputStream input)
                                            throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static CampaignExperiment parseFrom​(java.io.InputStream input,
                                                   com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                            throws java.io.IOException
        Throws:
        java.io.IOException
      • parseDelimitedFrom

        public static CampaignExperiment parseDelimitedFrom​(java.io.InputStream input)
                                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • parseDelimitedFrom

        public static CampaignExperiment parseDelimitedFrom​(java.io.InputStream input,
                                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static CampaignExperiment parseFrom​(com.google.protobuf.CodedInputStream input)
                                            throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static CampaignExperiment parseFrom​(com.google.protobuf.CodedInputStream input,
                                                   com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                            throws java.io.IOException
        Throws:
        java.io.IOException
      • newBuilderForType

        public CampaignExperiment.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public CampaignExperiment.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected CampaignExperiment.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getParserForType

        public com.google.protobuf.Parser<CampaignExperiment> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public CampaignExperiment getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder