All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.ads.googleads.v17.resources.ExperimentArm Maven / Gradle / Ivy

The newest version!
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/ads/googleads/v17/resources/experiment_arm.proto

// Protobuf Java Version: 3.25.3
package com.google.ads.googleads.v17.resources;

/**
 * 
 * A Google ads experiment for users to experiment changes on multiple
 * campaigns, compare the performance, and apply the effective changes.
 * 
* * Protobuf type {@code google.ads.googleads.v17.resources.ExperimentArm} */ public final class ExperimentArm extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.ads.googleads.v17.resources.ExperimentArm) ExperimentArmOrBuilder { private static final long serialVersionUID = 0L; // Use ExperimentArm.newBuilder() to construct. private ExperimentArm(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private ExperimentArm() { resourceName_ = ""; experiment_ = ""; name_ = ""; campaigns_ = com.google.protobuf.LazyStringArrayList.emptyList(); inDesignCampaigns_ = com.google.protobuf.LazyStringArrayList.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new ExperimentArm(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.ads.googleads.v17.resources.ExperimentArmProto.internal_static_google_ads_googleads_v17_resources_ExperimentArm_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.ads.googleads.v17.resources.ExperimentArmProto.internal_static_google_ads_googleads_v17_resources_ExperimentArm_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.ads.googleads.v17.resources.ExperimentArm.class, com.google.ads.googleads.v17.resources.ExperimentArm.Builder.class); } public static final int RESOURCE_NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object resourceName_ = ""; /** *
   * Immutable. The resource name of the experiment arm.
   * Experiment arm resource names have the form:
   *
   * `customers/{customer_id}/experimentArms/{TrialArm.trial_id}~{TrialArm.trial_arm_id}`
   * 
* * string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } * @return The resourceName. */ @java.lang.Override public java.lang.String getResourceName() { java.lang.Object ref = resourceName_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); resourceName_ = s; return s; } } /** *
   * Immutable. The resource name of the experiment arm.
   * Experiment arm resource names have the form:
   *
   * `customers/{customer_id}/experimentArms/{TrialArm.trial_id}~{TrialArm.trial_arm_id}`
   * 
* * string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } * @return The bytes for resourceName. */ @java.lang.Override public com.google.protobuf.ByteString getResourceNameBytes() { java.lang.Object ref = resourceName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); resourceName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int EXPERIMENT_FIELD_NUMBER = 8; @SuppressWarnings("serial") private volatile java.lang.Object experiment_ = ""; /** *
   * Immutable. The experiment to which the ExperimentArm belongs.
   * 
* * string experiment = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } * @return The experiment. */ @java.lang.Override public java.lang.String getExperiment() { java.lang.Object ref = experiment_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); experiment_ = s; return s; } } /** *
   * Immutable. The experiment to which the ExperimentArm belongs.
   * 
* * string experiment = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } * @return The bytes for experiment. */ @java.lang.Override public com.google.protobuf.ByteString getExperimentBytes() { java.lang.Object ref = experiment_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); experiment_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int NAME_FIELD_NUMBER = 3; @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; /** *
   * Required. The name of the experiment arm. It must have a minimum length of
   * 1 and maximum length of 1024. It must be unique under an experiment.
   * 
* * string name = 3 [(.google.api.field_behavior) = REQUIRED]; * @return The name. */ @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** *
   * Required. The name of the experiment arm. It must have a minimum length of
   * 1 and maximum length of 1024. It must be unique under an experiment.
   * 
* * string name = 3 [(.google.api.field_behavior) = REQUIRED]; * @return The bytes for name. */ @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int CONTROL_FIELD_NUMBER = 4; private boolean control_ = false; /** *
   * Whether this arm is a control arm. A control arm is the arm against
   * which the other arms are compared.
   * 
* * bool control = 4; * @return The control. */ @java.lang.Override public boolean getControl() { return control_; } public static final int TRAFFIC_SPLIT_FIELD_NUMBER = 5; private long trafficSplit_ = 0L; /** *
   * Traffic split of the trial arm. The value should be between 1 and 100
   * and must total 100 between the two trial arms.
   * 
* * int64 traffic_split = 5; * @return The trafficSplit. */ @java.lang.Override public long getTrafficSplit() { return trafficSplit_; } public static final int CAMPAIGNS_FIELD_NUMBER = 6; @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList campaigns_ = com.google.protobuf.LazyStringArrayList.emptyList(); /** *
   * List of campaigns in the trial arm. The max length is one.
   * 
* * repeated string campaigns = 6 [(.google.api.resource_reference) = { ... } * @return A list containing the campaigns. */ public com.google.protobuf.ProtocolStringList getCampaignsList() { return campaigns_; } /** *
   * List of campaigns in the trial arm. The max length is one.
   * 
* * repeated string campaigns = 6 [(.google.api.resource_reference) = { ... } * @return The count of campaigns. */ public int getCampaignsCount() { return campaigns_.size(); } /** *
   * List of campaigns in the trial arm. The max length is one.
   * 
* * repeated string campaigns = 6 [(.google.api.resource_reference) = { ... } * @param index The index of the element to return. * @return The campaigns at the given index. */ public java.lang.String getCampaigns(int index) { return campaigns_.get(index); } /** *
   * List of campaigns in the trial arm. The max length is one.
   * 
* * repeated string campaigns = 6 [(.google.api.resource_reference) = { ... } * @param index The index of the value to return. * @return The bytes of the campaigns at the given index. */ public com.google.protobuf.ByteString getCampaignsBytes(int index) { return campaigns_.getByteString(index); } public static final int IN_DESIGN_CAMPAIGNS_FIELD_NUMBER = 7; @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList inDesignCampaigns_ = com.google.protobuf.LazyStringArrayList.emptyList(); /** *
   * Output only. The in design campaigns in the treatment experiment arm.
   * 
* * repeated string in_design_campaigns = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } * @return A list containing the inDesignCampaigns. */ public com.google.protobuf.ProtocolStringList getInDesignCampaignsList() { return inDesignCampaigns_; } /** *
   * Output only. The in design campaigns in the treatment experiment arm.
   * 
* * repeated string in_design_campaigns = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } * @return The count of inDesignCampaigns. */ public int getInDesignCampaignsCount() { return inDesignCampaigns_.size(); } /** *
   * Output only. The in design campaigns in the treatment experiment arm.
   * 
* * repeated string in_design_campaigns = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } * @param index The index of the element to return. * @return The inDesignCampaigns at the given index. */ public java.lang.String getInDesignCampaigns(int index) { return inDesignCampaigns_.get(index); } /** *
   * Output only. The in design campaigns in the treatment experiment arm.
   * 
* * repeated string in_design_campaigns = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } * @param index The index of the value to return. * @return The bytes of the inDesignCampaigns at the given index. */ public com.google.protobuf.ByteString getInDesignCampaignsBytes(int index) { return inDesignCampaigns_.getByteString(index); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resourceName_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); } if (control_ != false) { output.writeBool(4, control_); } if (trafficSplit_ != 0L) { output.writeInt64(5, trafficSplit_); } for (int i = 0; i < campaigns_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, campaigns_.getRaw(i)); } for (int i = 0; i < inDesignCampaigns_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, inDesignCampaigns_.getRaw(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(experiment_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 8, experiment_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resourceName_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); } if (control_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(4, control_); } if (trafficSplit_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(5, trafficSplit_); } { int dataSize = 0; for (int i = 0; i < campaigns_.size(); i++) { dataSize += computeStringSizeNoTag(campaigns_.getRaw(i)); } size += dataSize; size += 1 * getCampaignsList().size(); } { int dataSize = 0; for (int i = 0; i < inDesignCampaigns_.size(); i++) { dataSize += computeStringSizeNoTag(inDesignCampaigns_.getRaw(i)); } size += dataSize; size += 1 * getInDesignCampaignsList().size(); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(experiment_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, experiment_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.ads.googleads.v17.resources.ExperimentArm)) { return super.equals(obj); } com.google.ads.googleads.v17.resources.ExperimentArm other = (com.google.ads.googleads.v17.resources.ExperimentArm) obj; if (!getResourceName() .equals(other.getResourceName())) return false; if (!getExperiment() .equals(other.getExperiment())) return false; if (!getName() .equals(other.getName())) return false; if (getControl() != other.getControl()) return false; if (getTrafficSplit() != other.getTrafficSplit()) return false; if (!getCampaignsList() .equals(other.getCampaignsList())) return false; if (!getInDesignCampaignsList() .equals(other.getInDesignCampaignsList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + RESOURCE_NAME_FIELD_NUMBER; hash = (53 * hash) + getResourceName().hashCode(); hash = (37 * hash) + EXPERIMENT_FIELD_NUMBER; hash = (53 * hash) + getExperiment().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + CONTROL_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getControl()); hash = (37 * hash) + TRAFFIC_SPLIT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getTrafficSplit()); if (getCampaignsCount() > 0) { hash = (37 * hash) + CAMPAIGNS_FIELD_NUMBER; hash = (53 * hash) + getCampaignsList().hashCode(); } if (getInDesignCampaignsCount() > 0) { hash = (37 * hash) + IN_DESIGN_CAMPAIGNS_FIELD_NUMBER; hash = (53 * hash) + getInDesignCampaignsList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.ads.googleads.v17.resources.ExperimentArm parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.ads.googleads.v17.resources.ExperimentArm parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.ads.googleads.v17.resources.ExperimentArm parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.ads.googleads.v17.resources.ExperimentArm parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.ads.googleads.v17.resources.ExperimentArm parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.ads.googleads.v17.resources.ExperimentArm parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.ads.googleads.v17.resources.ExperimentArm parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.ads.googleads.v17.resources.ExperimentArm parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.ads.googleads.v17.resources.ExperimentArm parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.google.ads.googleads.v17.resources.ExperimentArm parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.ads.googleads.v17.resources.ExperimentArm parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.ads.googleads.v17.resources.ExperimentArm parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.ads.googleads.v17.resources.ExperimentArm prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
   * A Google ads experiment for users to experiment changes on multiple
   * campaigns, compare the performance, and apply the effective changes.
   * 
* * Protobuf type {@code google.ads.googleads.v17.resources.ExperimentArm} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.ads.googleads.v17.resources.ExperimentArm) com.google.ads.googleads.v17.resources.ExperimentArmOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.ads.googleads.v17.resources.ExperimentArmProto.internal_static_google_ads_googleads_v17_resources_ExperimentArm_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.ads.googleads.v17.resources.ExperimentArmProto.internal_static_google_ads_googleads_v17_resources_ExperimentArm_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.ads.googleads.v17.resources.ExperimentArm.class, com.google.ads.googleads.v17.resources.ExperimentArm.Builder.class); } // Construct using com.google.ads.googleads.v17.resources.ExperimentArm.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; resourceName_ = ""; experiment_ = ""; name_ = ""; control_ = false; trafficSplit_ = 0L; campaigns_ = com.google.protobuf.LazyStringArrayList.emptyList(); inDesignCampaigns_ = com.google.protobuf.LazyStringArrayList.emptyList(); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.ads.googleads.v17.resources.ExperimentArmProto.internal_static_google_ads_googleads_v17_resources_ExperimentArm_descriptor; } @java.lang.Override public com.google.ads.googleads.v17.resources.ExperimentArm getDefaultInstanceForType() { return com.google.ads.googleads.v17.resources.ExperimentArm.getDefaultInstance(); } @java.lang.Override public com.google.ads.googleads.v17.resources.ExperimentArm build() { com.google.ads.googleads.v17.resources.ExperimentArm result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.ads.googleads.v17.resources.ExperimentArm buildPartial() { com.google.ads.googleads.v17.resources.ExperimentArm result = new com.google.ads.googleads.v17.resources.ExperimentArm(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.google.ads.googleads.v17.resources.ExperimentArm result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.resourceName_ = resourceName_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.experiment_ = experiment_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.name_ = name_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.control_ = control_; } if (((from_bitField0_ & 0x00000010) != 0)) { result.trafficSplit_ = trafficSplit_; } if (((from_bitField0_ & 0x00000020) != 0)) { campaigns_.makeImmutable(); result.campaigns_ = campaigns_; } if (((from_bitField0_ & 0x00000040) != 0)) { inDesignCampaigns_.makeImmutable(); result.inDesignCampaigns_ = inDesignCampaigns_; } } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.ads.googleads.v17.resources.ExperimentArm) { return mergeFrom((com.google.ads.googleads.v17.resources.ExperimentArm)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.ads.googleads.v17.resources.ExperimentArm other) { if (other == com.google.ads.googleads.v17.resources.ExperimentArm.getDefaultInstance()) return this; if (!other.getResourceName().isEmpty()) { resourceName_ = other.resourceName_; bitField0_ |= 0x00000001; onChanged(); } if (!other.getExperiment().isEmpty()) { experiment_ = other.experiment_; bitField0_ |= 0x00000002; onChanged(); } if (!other.getName().isEmpty()) { name_ = other.name_; bitField0_ |= 0x00000004; onChanged(); } if (other.getControl() != false) { setControl(other.getControl()); } if (other.getTrafficSplit() != 0L) { setTrafficSplit(other.getTrafficSplit()); } if (!other.campaigns_.isEmpty()) { if (campaigns_.isEmpty()) { campaigns_ = other.campaigns_; bitField0_ |= 0x00000020; } else { ensureCampaignsIsMutable(); campaigns_.addAll(other.campaigns_); } onChanged(); } if (!other.inDesignCampaigns_.isEmpty()) { if (inDesignCampaigns_.isEmpty()) { inDesignCampaigns_ = other.inDesignCampaigns_; bitField0_ |= 0x00000040; } else { ensureInDesignCampaignsIsMutable(); inDesignCampaigns_.addAll(other.inDesignCampaigns_); } onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { resourceName_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 26: { name_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000004; break; } // case 26 case 32: { control_ = input.readBool(); bitField0_ |= 0x00000008; break; } // case 32 case 40: { trafficSplit_ = input.readInt64(); bitField0_ |= 0x00000010; break; } // case 40 case 50: { java.lang.String s = input.readStringRequireUtf8(); ensureCampaignsIsMutable(); campaigns_.add(s); break; } // case 50 case 58: { java.lang.String s = input.readStringRequireUtf8(); ensureInDesignCampaignsIsMutable(); inDesignCampaigns_.add(s); break; } // case 58 case 66: { experiment_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 66 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object resourceName_ = ""; /** *
     * Immutable. The resource name of the experiment arm.
     * Experiment arm resource names have the form:
     *
     * `customers/{customer_id}/experimentArms/{TrialArm.trial_id}~{TrialArm.trial_arm_id}`
     * 
* * string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } * @return The resourceName. */ public java.lang.String getResourceName() { java.lang.Object ref = resourceName_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); resourceName_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * Immutable. The resource name of the experiment arm.
     * Experiment arm resource names have the form:
     *
     * `customers/{customer_id}/experimentArms/{TrialArm.trial_id}~{TrialArm.trial_arm_id}`
     * 
* * string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } * @return The bytes for resourceName. */ public com.google.protobuf.ByteString getResourceNameBytes() { java.lang.Object ref = resourceName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); resourceName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Immutable. The resource name of the experiment arm.
     * Experiment arm resource names have the form:
     *
     * `customers/{customer_id}/experimentArms/{TrialArm.trial_id}~{TrialArm.trial_arm_id}`
     * 
* * string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } * @param value The resourceName to set. * @return This builder for chaining. */ public Builder setResourceName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } resourceName_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** *
     * Immutable. The resource name of the experiment arm.
     * Experiment arm resource names have the form:
     *
     * `customers/{customer_id}/experimentArms/{TrialArm.trial_id}~{TrialArm.trial_arm_id}`
     * 
* * string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } * @return This builder for chaining. */ public Builder clearResourceName() { resourceName_ = getDefaultInstance().getResourceName(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** *
     * Immutable. The resource name of the experiment arm.
     * Experiment arm resource names have the form:
     *
     * `customers/{customer_id}/experimentArms/{TrialArm.trial_id}~{TrialArm.trial_arm_id}`
     * 
* * string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } * @param value The bytes for resourceName to set. * @return This builder for chaining. */ public Builder setResourceNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); resourceName_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private java.lang.Object experiment_ = ""; /** *
     * Immutable. The experiment to which the ExperimentArm belongs.
     * 
* * string experiment = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } * @return The experiment. */ public java.lang.String getExperiment() { java.lang.Object ref = experiment_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); experiment_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * Immutable. The experiment to which the ExperimentArm belongs.
     * 
* * string experiment = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } * @return The bytes for experiment. */ public com.google.protobuf.ByteString getExperimentBytes() { java.lang.Object ref = experiment_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); experiment_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Immutable. The experiment to which the ExperimentArm belongs.
     * 
* * string experiment = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } * @param value The experiment to set. * @return This builder for chaining. */ public Builder setExperiment( java.lang.String value) { if (value == null) { throw new NullPointerException(); } experiment_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** *
     * Immutable. The experiment to which the ExperimentArm belongs.
     * 
* * string experiment = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } * @return This builder for chaining. */ public Builder clearExperiment() { experiment_ = getDefaultInstance().getExperiment(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** *
     * Immutable. The experiment to which the ExperimentArm belongs.
     * 
* * string experiment = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } * @param value The bytes for experiment to set. * @return This builder for chaining. */ public Builder setExperimentBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); experiment_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } private java.lang.Object name_ = ""; /** *
     * Required. The name of the experiment arm. It must have a minimum length of
     * 1 and maximum length of 1024. It must be unique under an experiment.
     * 
* * string name = 3 [(.google.api.field_behavior) = REQUIRED]; * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * Required. The name of the experiment arm. It must have a minimum length of
     * 1 and maximum length of 1024. It must be unique under an experiment.
     * 
* * string name = 3 [(.google.api.field_behavior) = REQUIRED]; * @return The bytes for name. */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Required. The name of the experiment arm. It must have a minimum length of
     * 1 and maximum length of 1024. It must be unique under an experiment.
     * 
* * string name = 3 [(.google.api.field_behavior) = REQUIRED]; * @param value The name to set. * @return This builder for chaining. */ public Builder setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** *
     * Required. The name of the experiment arm. It must have a minimum length of
     * 1 and maximum length of 1024. It must be unique under an experiment.
     * 
* * string name = 3 [(.google.api.field_behavior) = REQUIRED]; * @return This builder for chaining. */ public Builder clearName() { name_ = getDefaultInstance().getName(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } /** *
     * Required. The name of the experiment arm. It must have a minimum length of
     * 1 and maximum length of 1024. It must be unique under an experiment.
     * 
* * string name = 3 [(.google.api.field_behavior) = REQUIRED]; * @param value The bytes for name to set. * @return This builder for chaining. */ public Builder setNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } private boolean control_ ; /** *
     * Whether this arm is a control arm. A control arm is the arm against
     * which the other arms are compared.
     * 
* * bool control = 4; * @return The control. */ @java.lang.Override public boolean getControl() { return control_; } /** *
     * Whether this arm is a control arm. A control arm is the arm against
     * which the other arms are compared.
     * 
* * bool control = 4; * @param value The control to set. * @return This builder for chaining. */ public Builder setControl(boolean value) { control_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** *
     * Whether this arm is a control arm. A control arm is the arm against
     * which the other arms are compared.
     * 
* * bool control = 4; * @return This builder for chaining. */ public Builder clearControl() { bitField0_ = (bitField0_ & ~0x00000008); control_ = false; onChanged(); return this; } private long trafficSplit_ ; /** *
     * Traffic split of the trial arm. The value should be between 1 and 100
     * and must total 100 between the two trial arms.
     * 
* * int64 traffic_split = 5; * @return The trafficSplit. */ @java.lang.Override public long getTrafficSplit() { return trafficSplit_; } /** *
     * Traffic split of the trial arm. The value should be between 1 and 100
     * and must total 100 between the two trial arms.
     * 
* * int64 traffic_split = 5; * @param value The trafficSplit to set. * @return This builder for chaining. */ public Builder setTrafficSplit(long value) { trafficSplit_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** *
     * Traffic split of the trial arm. The value should be between 1 and 100
     * and must total 100 between the two trial arms.
     * 
* * int64 traffic_split = 5; * @return This builder for chaining. */ public Builder clearTrafficSplit() { bitField0_ = (bitField0_ & ~0x00000010); trafficSplit_ = 0L; onChanged(); return this; } private com.google.protobuf.LazyStringArrayList campaigns_ = com.google.protobuf.LazyStringArrayList.emptyList(); private void ensureCampaignsIsMutable() { if (!campaigns_.isModifiable()) { campaigns_ = new com.google.protobuf.LazyStringArrayList(campaigns_); } bitField0_ |= 0x00000020; } /** *
     * List of campaigns in the trial arm. The max length is one.
     * 
* * repeated string campaigns = 6 [(.google.api.resource_reference) = { ... } * @return A list containing the campaigns. */ public com.google.protobuf.ProtocolStringList getCampaignsList() { campaigns_.makeImmutable(); return campaigns_; } /** *
     * List of campaigns in the trial arm. The max length is one.
     * 
* * repeated string campaigns = 6 [(.google.api.resource_reference) = { ... } * @return The count of campaigns. */ public int getCampaignsCount() { return campaigns_.size(); } /** *
     * List of campaigns in the trial arm. The max length is one.
     * 
* * repeated string campaigns = 6 [(.google.api.resource_reference) = { ... } * @param index The index of the element to return. * @return The campaigns at the given index. */ public java.lang.String getCampaigns(int index) { return campaigns_.get(index); } /** *
     * List of campaigns in the trial arm. The max length is one.
     * 
* * repeated string campaigns = 6 [(.google.api.resource_reference) = { ... } * @param index The index of the value to return. * @return The bytes of the campaigns at the given index. */ public com.google.protobuf.ByteString getCampaignsBytes(int index) { return campaigns_.getByteString(index); } /** *
     * List of campaigns in the trial arm. The max length is one.
     * 
* * repeated string campaigns = 6 [(.google.api.resource_reference) = { ... } * @param index The index to set the value at. * @param value The campaigns to set. * @return This builder for chaining. */ public Builder setCampaigns( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureCampaignsIsMutable(); campaigns_.set(index, value); bitField0_ |= 0x00000020; onChanged(); return this; } /** *
     * List of campaigns in the trial arm. The max length is one.
     * 
* * repeated string campaigns = 6 [(.google.api.resource_reference) = { ... } * @param value The campaigns to add. * @return This builder for chaining. */ public Builder addCampaigns( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureCampaignsIsMutable(); campaigns_.add(value); bitField0_ |= 0x00000020; onChanged(); return this; } /** *
     * List of campaigns in the trial arm. The max length is one.
     * 
* * repeated string campaigns = 6 [(.google.api.resource_reference) = { ... } * @param values The campaigns to add. * @return This builder for chaining. */ public Builder addAllCampaigns( java.lang.Iterable values) { ensureCampaignsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, campaigns_); bitField0_ |= 0x00000020; onChanged(); return this; } /** *
     * List of campaigns in the trial arm. The max length is one.
     * 
* * repeated string campaigns = 6 [(.google.api.resource_reference) = { ... } * @return This builder for chaining. */ public Builder clearCampaigns() { campaigns_ = com.google.protobuf.LazyStringArrayList.emptyList(); bitField0_ = (bitField0_ & ~0x00000020);; onChanged(); return this; } /** *
     * List of campaigns in the trial arm. The max length is one.
     * 
* * repeated string campaigns = 6 [(.google.api.resource_reference) = { ... } * @param value The bytes of the campaigns to add. * @return This builder for chaining. */ public Builder addCampaignsBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureCampaignsIsMutable(); campaigns_.add(value); bitField0_ |= 0x00000020; onChanged(); return this; } private com.google.protobuf.LazyStringArrayList inDesignCampaigns_ = com.google.protobuf.LazyStringArrayList.emptyList(); private void ensureInDesignCampaignsIsMutable() { if (!inDesignCampaigns_.isModifiable()) { inDesignCampaigns_ = new com.google.protobuf.LazyStringArrayList(inDesignCampaigns_); } bitField0_ |= 0x00000040; } /** *
     * Output only. The in design campaigns in the treatment experiment arm.
     * 
* * repeated string in_design_campaigns = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } * @return A list containing the inDesignCampaigns. */ public com.google.protobuf.ProtocolStringList getInDesignCampaignsList() { inDesignCampaigns_.makeImmutable(); return inDesignCampaigns_; } /** *
     * Output only. The in design campaigns in the treatment experiment arm.
     * 
* * repeated string in_design_campaigns = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } * @return The count of inDesignCampaigns. */ public int getInDesignCampaignsCount() { return inDesignCampaigns_.size(); } /** *
     * Output only. The in design campaigns in the treatment experiment arm.
     * 
* * repeated string in_design_campaigns = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } * @param index The index of the element to return. * @return The inDesignCampaigns at the given index. */ public java.lang.String getInDesignCampaigns(int index) { return inDesignCampaigns_.get(index); } /** *
     * Output only. The in design campaigns in the treatment experiment arm.
     * 
* * repeated string in_design_campaigns = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } * @param index The index of the value to return. * @return The bytes of the inDesignCampaigns at the given index. */ public com.google.protobuf.ByteString getInDesignCampaignsBytes(int index) { return inDesignCampaigns_.getByteString(index); } /** *
     * Output only. The in design campaigns in the treatment experiment arm.
     * 
* * repeated string in_design_campaigns = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } * @param index The index to set the value at. * @param value The inDesignCampaigns to set. * @return This builder for chaining. */ public Builder setInDesignCampaigns( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureInDesignCampaignsIsMutable(); inDesignCampaigns_.set(index, value); bitField0_ |= 0x00000040; onChanged(); return this; } /** *
     * Output only. The in design campaigns in the treatment experiment arm.
     * 
* * repeated string in_design_campaigns = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } * @param value The inDesignCampaigns to add. * @return This builder for chaining. */ public Builder addInDesignCampaigns( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureInDesignCampaignsIsMutable(); inDesignCampaigns_.add(value); bitField0_ |= 0x00000040; onChanged(); return this; } /** *
     * Output only. The in design campaigns in the treatment experiment arm.
     * 
* * repeated string in_design_campaigns = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } * @param values The inDesignCampaigns to add. * @return This builder for chaining. */ public Builder addAllInDesignCampaigns( java.lang.Iterable values) { ensureInDesignCampaignsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, inDesignCampaigns_); bitField0_ |= 0x00000040; onChanged(); return this; } /** *
     * Output only. The in design campaigns in the treatment experiment arm.
     * 
* * repeated string in_design_campaigns = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } * @return This builder for chaining. */ public Builder clearInDesignCampaigns() { inDesignCampaigns_ = com.google.protobuf.LazyStringArrayList.emptyList(); bitField0_ = (bitField0_ & ~0x00000040);; onChanged(); return this; } /** *
     * Output only. The in design campaigns in the treatment experiment arm.
     * 
* * repeated string in_design_campaigns = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } * @param value The bytes of the inDesignCampaigns to add. * @return This builder for chaining. */ public Builder addInDesignCampaignsBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureInDesignCampaignsIsMutable(); inDesignCampaigns_.add(value); bitField0_ |= 0x00000040; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.ads.googleads.v17.resources.ExperimentArm) } // @@protoc_insertion_point(class_scope:google.ads.googleads.v17.resources.ExperimentArm) private static final com.google.ads.googleads.v17.resources.ExperimentArm DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.ads.googleads.v17.resources.ExperimentArm(); } public static com.google.ads.googleads.v17.resources.ExperimentArm getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public ExperimentArm parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.ads.googleads.v17.resources.ExperimentArm getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy