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

com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsResult Maven / Gradle / Ivy

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

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

/**
 * 
 * The result of generating keyword historical metrics.
 * 
* * Protobuf type {@code google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsResult} */ public final class GenerateKeywordHistoricalMetricsResult extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsResult) GenerateKeywordHistoricalMetricsResultOrBuilder { private static final long serialVersionUID = 0L; // Use GenerateKeywordHistoricalMetricsResult.newBuilder() to construct. private GenerateKeywordHistoricalMetricsResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private GenerateKeywordHistoricalMetricsResult() { text_ = ""; closeVariants_ = com.google.protobuf.LazyStringArrayList.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new GenerateKeywordHistoricalMetricsResult(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.ads.googleads.v17.services.KeywordPlanIdeaServiceProto.internal_static_google_ads_googleads_v17_services_GenerateKeywordHistoricalMetricsResult_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.ads.googleads.v17.services.KeywordPlanIdeaServiceProto.internal_static_google_ads_googleads_v17_services_GenerateKeywordHistoricalMetricsResult_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsResult.class, com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsResult.Builder.class); } private int bitField0_; public static final int TEXT_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object text_ = ""; /** *
   * The text of the query associated with one or more keywords.
   * Note that we de-dupe your keywords list, eliminating close variants
   * before returning the keywords as text. For example, if your request
   * originally contained the keywords "car" and "cars", the returned search
   * query will only contain "cars". The list of de-duped queries will be
   * included in close_variants field.
   * 
* * optional string text = 1; * @return Whether the text field is set. */ @java.lang.Override public boolean hasText() { return ((bitField0_ & 0x00000001) != 0); } /** *
   * The text of the query associated with one or more keywords.
   * Note that we de-dupe your keywords list, eliminating close variants
   * before returning the keywords as text. For example, if your request
   * originally contained the keywords "car" and "cars", the returned search
   * query will only contain "cars". The list of de-duped queries will be
   * included in close_variants field.
   * 
* * optional string text = 1; * @return The text. */ @java.lang.Override public java.lang.String getText() { java.lang.Object ref = text_; 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(); text_ = s; return s; } } /** *
   * The text of the query associated with one or more keywords.
   * Note that we de-dupe your keywords list, eliminating close variants
   * before returning the keywords as text. For example, if your request
   * originally contained the keywords "car" and "cars", the returned search
   * query will only contain "cars". The list of de-duped queries will be
   * included in close_variants field.
   * 
* * optional string text = 1; * @return The bytes for text. */ @java.lang.Override public com.google.protobuf.ByteString getTextBytes() { java.lang.Object ref = text_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); text_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int CLOSE_VARIANTS_FIELD_NUMBER = 3; @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList closeVariants_ = com.google.protobuf.LazyStringArrayList.emptyList(); /** *
   * The list of close variants from the requested keywords whose stats
   * are combined into this GenerateKeywordHistoricalMetricsResult.
   * 
* * repeated string close_variants = 3; * @return A list containing the closeVariants. */ public com.google.protobuf.ProtocolStringList getCloseVariantsList() { return closeVariants_; } /** *
   * The list of close variants from the requested keywords whose stats
   * are combined into this GenerateKeywordHistoricalMetricsResult.
   * 
* * repeated string close_variants = 3; * @return The count of closeVariants. */ public int getCloseVariantsCount() { return closeVariants_.size(); } /** *
   * The list of close variants from the requested keywords whose stats
   * are combined into this GenerateKeywordHistoricalMetricsResult.
   * 
* * repeated string close_variants = 3; * @param index The index of the element to return. * @return The closeVariants at the given index. */ public java.lang.String getCloseVariants(int index) { return closeVariants_.get(index); } /** *
   * The list of close variants from the requested keywords whose stats
   * are combined into this GenerateKeywordHistoricalMetricsResult.
   * 
* * repeated string close_variants = 3; * @param index The index of the value to return. * @return The bytes of the closeVariants at the given index. */ public com.google.protobuf.ByteString getCloseVariantsBytes(int index) { return closeVariants_.getByteString(index); } public static final int KEYWORD_METRICS_FIELD_NUMBER = 2; private com.google.ads.googleads.v17.common.KeywordPlanHistoricalMetrics keywordMetrics_; /** *
   * The historical metrics for text and its close variants
   * 
* * .google.ads.googleads.v17.common.KeywordPlanHistoricalMetrics keyword_metrics = 2; * @return Whether the keywordMetrics field is set. */ @java.lang.Override public boolean hasKeywordMetrics() { return ((bitField0_ & 0x00000002) != 0); } /** *
   * The historical metrics for text and its close variants
   * 
* * .google.ads.googleads.v17.common.KeywordPlanHistoricalMetrics keyword_metrics = 2; * @return The keywordMetrics. */ @java.lang.Override public com.google.ads.googleads.v17.common.KeywordPlanHistoricalMetrics getKeywordMetrics() { return keywordMetrics_ == null ? com.google.ads.googleads.v17.common.KeywordPlanHistoricalMetrics.getDefaultInstance() : keywordMetrics_; } /** *
   * The historical metrics for text and its close variants
   * 
* * .google.ads.googleads.v17.common.KeywordPlanHistoricalMetrics keyword_metrics = 2; */ @java.lang.Override public com.google.ads.googleads.v17.common.KeywordPlanHistoricalMetricsOrBuilder getKeywordMetricsOrBuilder() { return keywordMetrics_ == null ? com.google.ads.googleads.v17.common.KeywordPlanHistoricalMetrics.getDefaultInstance() : keywordMetrics_; } 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 (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, text_); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(2, getKeywordMetrics()); } for (int i = 0; i < closeVariants_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, closeVariants_.getRaw(i)); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, text_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getKeywordMetrics()); } { int dataSize = 0; for (int i = 0; i < closeVariants_.size(); i++) { dataSize += computeStringSizeNoTag(closeVariants_.getRaw(i)); } size += dataSize; size += 1 * getCloseVariantsList().size(); } 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.services.GenerateKeywordHistoricalMetricsResult)) { return super.equals(obj); } com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsResult other = (com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsResult) obj; if (hasText() != other.hasText()) return false; if (hasText()) { if (!getText() .equals(other.getText())) return false; } if (!getCloseVariantsList() .equals(other.getCloseVariantsList())) return false; if (hasKeywordMetrics() != other.hasKeywordMetrics()) return false; if (hasKeywordMetrics()) { if (!getKeywordMetrics() .equals(other.getKeywordMetrics())) 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(); if (hasText()) { hash = (37 * hash) + TEXT_FIELD_NUMBER; hash = (53 * hash) + getText().hashCode(); } if (getCloseVariantsCount() > 0) { hash = (37 * hash) + CLOSE_VARIANTS_FIELD_NUMBER; hash = (53 * hash) + getCloseVariantsList().hashCode(); } if (hasKeywordMetrics()) { hash = (37 * hash) + KEYWORD_METRICS_FIELD_NUMBER; hash = (53 * hash) + getKeywordMetrics().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsResult parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsResult 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.services.GenerateKeywordHistoricalMetricsResult parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsResult 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.services.GenerateKeywordHistoricalMetricsResult parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsResult 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.services.GenerateKeywordHistoricalMetricsResult parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsResult 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.services.GenerateKeywordHistoricalMetricsResult parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsResult 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.services.GenerateKeywordHistoricalMetricsResult 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.services.GenerateKeywordHistoricalMetricsResult 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.services.GenerateKeywordHistoricalMetricsResult 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; } /** *
   * The result of generating keyword historical metrics.
   * 
* * Protobuf type {@code google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsResult} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsResult) com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsResultOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.ads.googleads.v17.services.KeywordPlanIdeaServiceProto.internal_static_google_ads_googleads_v17_services_GenerateKeywordHistoricalMetricsResult_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.ads.googleads.v17.services.KeywordPlanIdeaServiceProto.internal_static_google_ads_googleads_v17_services_GenerateKeywordHistoricalMetricsResult_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsResult.class, com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsResult.Builder.class); } // Construct using com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsResult.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getKeywordMetricsFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; text_ = ""; closeVariants_ = com.google.protobuf.LazyStringArrayList.emptyList(); keywordMetrics_ = null; if (keywordMetricsBuilder_ != null) { keywordMetricsBuilder_.dispose(); keywordMetricsBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.ads.googleads.v17.services.KeywordPlanIdeaServiceProto.internal_static_google_ads_googleads_v17_services_GenerateKeywordHistoricalMetricsResult_descriptor; } @java.lang.Override public com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsResult getDefaultInstanceForType() { return com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsResult.getDefaultInstance(); } @java.lang.Override public com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsResult build() { com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsResult result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsResult buildPartial() { com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsResult result = new com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsResult(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsResult result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.text_ = text_; to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { closeVariants_.makeImmutable(); result.closeVariants_ = closeVariants_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.keywordMetrics_ = keywordMetricsBuilder_ == null ? keywordMetrics_ : keywordMetricsBuilder_.build(); to_bitField0_ |= 0x00000002; } result.bitField0_ |= to_bitField0_; } @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.services.GenerateKeywordHistoricalMetricsResult) { return mergeFrom((com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsResult)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsResult other) { if (other == com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsResult.getDefaultInstance()) return this; if (other.hasText()) { text_ = other.text_; bitField0_ |= 0x00000001; onChanged(); } if (!other.closeVariants_.isEmpty()) { if (closeVariants_.isEmpty()) { closeVariants_ = other.closeVariants_; bitField0_ |= 0x00000002; } else { ensureCloseVariantsIsMutable(); closeVariants_.addAll(other.closeVariants_); } onChanged(); } if (other.hasKeywordMetrics()) { mergeKeywordMetrics(other.getKeywordMetrics()); } 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: { text_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { input.readMessage( getKeywordMetricsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 18 case 26: { java.lang.String s = input.readStringRequireUtf8(); ensureCloseVariantsIsMutable(); closeVariants_.add(s); break; } // case 26 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 text_ = ""; /** *
     * The text of the query associated with one or more keywords.
     * Note that we de-dupe your keywords list, eliminating close variants
     * before returning the keywords as text. For example, if your request
     * originally contained the keywords "car" and "cars", the returned search
     * query will only contain "cars". The list of de-duped queries will be
     * included in close_variants field.
     * 
* * optional string text = 1; * @return Whether the text field is set. */ public boolean hasText() { return ((bitField0_ & 0x00000001) != 0); } /** *
     * The text of the query associated with one or more keywords.
     * Note that we de-dupe your keywords list, eliminating close variants
     * before returning the keywords as text. For example, if your request
     * originally contained the keywords "car" and "cars", the returned search
     * query will only contain "cars". The list of de-duped queries will be
     * included in close_variants field.
     * 
* * optional string text = 1; * @return The text. */ public java.lang.String getText() { java.lang.Object ref = text_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); text_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * The text of the query associated with one or more keywords.
     * Note that we de-dupe your keywords list, eliminating close variants
     * before returning the keywords as text. For example, if your request
     * originally contained the keywords "car" and "cars", the returned search
     * query will only contain "cars". The list of de-duped queries will be
     * included in close_variants field.
     * 
* * optional string text = 1; * @return The bytes for text. */ public com.google.protobuf.ByteString getTextBytes() { java.lang.Object ref = text_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); text_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * The text of the query associated with one or more keywords.
     * Note that we de-dupe your keywords list, eliminating close variants
     * before returning the keywords as text. For example, if your request
     * originally contained the keywords "car" and "cars", the returned search
     * query will only contain "cars". The list of de-duped queries will be
     * included in close_variants field.
     * 
* * optional string text = 1; * @param value The text to set. * @return This builder for chaining. */ public Builder setText( java.lang.String value) { if (value == null) { throw new NullPointerException(); } text_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** *
     * The text of the query associated with one or more keywords.
     * Note that we de-dupe your keywords list, eliminating close variants
     * before returning the keywords as text. For example, if your request
     * originally contained the keywords "car" and "cars", the returned search
     * query will only contain "cars". The list of de-duped queries will be
     * included in close_variants field.
     * 
* * optional string text = 1; * @return This builder for chaining. */ public Builder clearText() { text_ = getDefaultInstance().getText(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** *
     * The text of the query associated with one or more keywords.
     * Note that we de-dupe your keywords list, eliminating close variants
     * before returning the keywords as text. For example, if your request
     * originally contained the keywords "car" and "cars", the returned search
     * query will only contain "cars". The list of de-duped queries will be
     * included in close_variants field.
     * 
* * optional string text = 1; * @param value The bytes for text to set. * @return This builder for chaining. */ public Builder setTextBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); text_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private com.google.protobuf.LazyStringArrayList closeVariants_ = com.google.protobuf.LazyStringArrayList.emptyList(); private void ensureCloseVariantsIsMutable() { if (!closeVariants_.isModifiable()) { closeVariants_ = new com.google.protobuf.LazyStringArrayList(closeVariants_); } bitField0_ |= 0x00000002; } /** *
     * The list of close variants from the requested keywords whose stats
     * are combined into this GenerateKeywordHistoricalMetricsResult.
     * 
* * repeated string close_variants = 3; * @return A list containing the closeVariants. */ public com.google.protobuf.ProtocolStringList getCloseVariantsList() { closeVariants_.makeImmutable(); return closeVariants_; } /** *
     * The list of close variants from the requested keywords whose stats
     * are combined into this GenerateKeywordHistoricalMetricsResult.
     * 
* * repeated string close_variants = 3; * @return The count of closeVariants. */ public int getCloseVariantsCount() { return closeVariants_.size(); } /** *
     * The list of close variants from the requested keywords whose stats
     * are combined into this GenerateKeywordHistoricalMetricsResult.
     * 
* * repeated string close_variants = 3; * @param index The index of the element to return. * @return The closeVariants at the given index. */ public java.lang.String getCloseVariants(int index) { return closeVariants_.get(index); } /** *
     * The list of close variants from the requested keywords whose stats
     * are combined into this GenerateKeywordHistoricalMetricsResult.
     * 
* * repeated string close_variants = 3; * @param index The index of the value to return. * @return The bytes of the closeVariants at the given index. */ public com.google.protobuf.ByteString getCloseVariantsBytes(int index) { return closeVariants_.getByteString(index); } /** *
     * The list of close variants from the requested keywords whose stats
     * are combined into this GenerateKeywordHistoricalMetricsResult.
     * 
* * repeated string close_variants = 3; * @param index The index to set the value at. * @param value The closeVariants to set. * @return This builder for chaining. */ public Builder setCloseVariants( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureCloseVariantsIsMutable(); closeVariants_.set(index, value); bitField0_ |= 0x00000002; onChanged(); return this; } /** *
     * The list of close variants from the requested keywords whose stats
     * are combined into this GenerateKeywordHistoricalMetricsResult.
     * 
* * repeated string close_variants = 3; * @param value The closeVariants to add. * @return This builder for chaining. */ public Builder addCloseVariants( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureCloseVariantsIsMutable(); closeVariants_.add(value); bitField0_ |= 0x00000002; onChanged(); return this; } /** *
     * The list of close variants from the requested keywords whose stats
     * are combined into this GenerateKeywordHistoricalMetricsResult.
     * 
* * repeated string close_variants = 3; * @param values The closeVariants to add. * @return This builder for chaining. */ public Builder addAllCloseVariants( java.lang.Iterable values) { ensureCloseVariantsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, closeVariants_); bitField0_ |= 0x00000002; onChanged(); return this; } /** *
     * The list of close variants from the requested keywords whose stats
     * are combined into this GenerateKeywordHistoricalMetricsResult.
     * 
* * repeated string close_variants = 3; * @return This builder for chaining. */ public Builder clearCloseVariants() { closeVariants_ = com.google.protobuf.LazyStringArrayList.emptyList(); bitField0_ = (bitField0_ & ~0x00000002);; onChanged(); return this; } /** *
     * The list of close variants from the requested keywords whose stats
     * are combined into this GenerateKeywordHistoricalMetricsResult.
     * 
* * repeated string close_variants = 3; * @param value The bytes of the closeVariants to add. * @return This builder for chaining. */ public Builder addCloseVariantsBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureCloseVariantsIsMutable(); closeVariants_.add(value); bitField0_ |= 0x00000002; onChanged(); return this; } private com.google.ads.googleads.v17.common.KeywordPlanHistoricalMetrics keywordMetrics_; private com.google.protobuf.SingleFieldBuilderV3< com.google.ads.googleads.v17.common.KeywordPlanHistoricalMetrics, com.google.ads.googleads.v17.common.KeywordPlanHistoricalMetrics.Builder, com.google.ads.googleads.v17.common.KeywordPlanHistoricalMetricsOrBuilder> keywordMetricsBuilder_; /** *
     * The historical metrics for text and its close variants
     * 
* * .google.ads.googleads.v17.common.KeywordPlanHistoricalMetrics keyword_metrics = 2; * @return Whether the keywordMetrics field is set. */ public boolean hasKeywordMetrics() { return ((bitField0_ & 0x00000004) != 0); } /** *
     * The historical metrics for text and its close variants
     * 
* * .google.ads.googleads.v17.common.KeywordPlanHistoricalMetrics keyword_metrics = 2; * @return The keywordMetrics. */ public com.google.ads.googleads.v17.common.KeywordPlanHistoricalMetrics getKeywordMetrics() { if (keywordMetricsBuilder_ == null) { return keywordMetrics_ == null ? com.google.ads.googleads.v17.common.KeywordPlanHistoricalMetrics.getDefaultInstance() : keywordMetrics_; } else { return keywordMetricsBuilder_.getMessage(); } } /** *
     * The historical metrics for text and its close variants
     * 
* * .google.ads.googleads.v17.common.KeywordPlanHistoricalMetrics keyword_metrics = 2; */ public Builder setKeywordMetrics(com.google.ads.googleads.v17.common.KeywordPlanHistoricalMetrics value) { if (keywordMetricsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } keywordMetrics_ = value; } else { keywordMetricsBuilder_.setMessage(value); } bitField0_ |= 0x00000004; onChanged(); return this; } /** *
     * The historical metrics for text and its close variants
     * 
* * .google.ads.googleads.v17.common.KeywordPlanHistoricalMetrics keyword_metrics = 2; */ public Builder setKeywordMetrics( com.google.ads.googleads.v17.common.KeywordPlanHistoricalMetrics.Builder builderForValue) { if (keywordMetricsBuilder_ == null) { keywordMetrics_ = builderForValue.build(); } else { keywordMetricsBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; onChanged(); return this; } /** *
     * The historical metrics for text and its close variants
     * 
* * .google.ads.googleads.v17.common.KeywordPlanHistoricalMetrics keyword_metrics = 2; */ public Builder mergeKeywordMetrics(com.google.ads.googleads.v17.common.KeywordPlanHistoricalMetrics value) { if (keywordMetricsBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0) && keywordMetrics_ != null && keywordMetrics_ != com.google.ads.googleads.v17.common.KeywordPlanHistoricalMetrics.getDefaultInstance()) { getKeywordMetricsBuilder().mergeFrom(value); } else { keywordMetrics_ = value; } } else { keywordMetricsBuilder_.mergeFrom(value); } if (keywordMetrics_ != null) { bitField0_ |= 0x00000004; onChanged(); } return this; } /** *
     * The historical metrics for text and its close variants
     * 
* * .google.ads.googleads.v17.common.KeywordPlanHistoricalMetrics keyword_metrics = 2; */ public Builder clearKeywordMetrics() { bitField0_ = (bitField0_ & ~0x00000004); keywordMetrics_ = null; if (keywordMetricsBuilder_ != null) { keywordMetricsBuilder_.dispose(); keywordMetricsBuilder_ = null; } onChanged(); return this; } /** *
     * The historical metrics for text and its close variants
     * 
* * .google.ads.googleads.v17.common.KeywordPlanHistoricalMetrics keyword_metrics = 2; */ public com.google.ads.googleads.v17.common.KeywordPlanHistoricalMetrics.Builder getKeywordMetricsBuilder() { bitField0_ |= 0x00000004; onChanged(); return getKeywordMetricsFieldBuilder().getBuilder(); } /** *
     * The historical metrics for text and its close variants
     * 
* * .google.ads.googleads.v17.common.KeywordPlanHistoricalMetrics keyword_metrics = 2; */ public com.google.ads.googleads.v17.common.KeywordPlanHistoricalMetricsOrBuilder getKeywordMetricsOrBuilder() { if (keywordMetricsBuilder_ != null) { return keywordMetricsBuilder_.getMessageOrBuilder(); } else { return keywordMetrics_ == null ? com.google.ads.googleads.v17.common.KeywordPlanHistoricalMetrics.getDefaultInstance() : keywordMetrics_; } } /** *
     * The historical metrics for text and its close variants
     * 
* * .google.ads.googleads.v17.common.KeywordPlanHistoricalMetrics keyword_metrics = 2; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.ads.googleads.v17.common.KeywordPlanHistoricalMetrics, com.google.ads.googleads.v17.common.KeywordPlanHistoricalMetrics.Builder, com.google.ads.googleads.v17.common.KeywordPlanHistoricalMetricsOrBuilder> getKeywordMetricsFieldBuilder() { if (keywordMetricsBuilder_ == null) { keywordMetricsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.ads.googleads.v17.common.KeywordPlanHistoricalMetrics, com.google.ads.googleads.v17.common.KeywordPlanHistoricalMetrics.Builder, com.google.ads.googleads.v17.common.KeywordPlanHistoricalMetricsOrBuilder>( getKeywordMetrics(), getParentForChildren(), isClean()); keywordMetrics_ = null; } return keywordMetricsBuilder_; } @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.services.GenerateKeywordHistoricalMetricsResult) } // @@protoc_insertion_point(class_scope:google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsResult) private static final com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsResult DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsResult(); } public static com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsResult getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public GenerateKeywordHistoricalMetricsResult 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.services.GenerateKeywordHistoricalMetricsResult getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy