com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of google-ads-stubs-v17 Show documentation
Show all versions of google-ads-stubs-v17 Show documentation
Stubs for GAAPI version google-ads-stubs-v17
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;
/**
*
* Request message for
* [KeywordPlanIdeaService.GenerateKeywordHistoricalMetrics][google.ads.googleads.v17.services.KeywordPlanIdeaService.GenerateKeywordHistoricalMetrics].
*
*
* Protobuf type {@code google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsRequest}
*/
public final class GenerateKeywordHistoricalMetricsRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsRequest)
GenerateKeywordHistoricalMetricsRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use GenerateKeywordHistoricalMetricsRequest.newBuilder() to construct.
private GenerateKeywordHistoricalMetricsRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private GenerateKeywordHistoricalMetricsRequest() {
customerId_ = "";
keywords_ =
com.google.protobuf.LazyStringArrayList.emptyList();
language_ = "";
geoTargetConstants_ =
com.google.protobuf.LazyStringArrayList.emptyList();
keywordPlanNetwork_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new GenerateKeywordHistoricalMetricsRequest();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.ads.googleads.v17.services.KeywordPlanIdeaServiceProto.internal_static_google_ads_googleads_v17_services_GenerateKeywordHistoricalMetricsRequest_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_GenerateKeywordHistoricalMetricsRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsRequest.class, com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsRequest.Builder.class);
}
private int bitField0_;
public static final int CUSTOMER_ID_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object customerId_ = "";
/**
*
* The ID of the customer with the recommendation.
*
*
* string customer_id = 1;
* @return The customerId.
*/
@java.lang.Override
public java.lang.String getCustomerId() {
java.lang.Object ref = customerId_;
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();
customerId_ = s;
return s;
}
}
/**
*
* The ID of the customer with the recommendation.
*
*
* string customer_id = 1;
* @return The bytes for customerId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getCustomerIdBytes() {
java.lang.Object ref = customerId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
customerId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int KEYWORDS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList keywords_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* A list of keywords to get historical metrics.
* Not all inputs will be returned as a result of near-exact deduplication.
* For example, if stats for "car" and "cars" are requested, only "car" will
* be returned.
* A maximum of 10,000 keywords can be used.
*
*
* repeated string keywords = 2;
* @return A list containing the keywords.
*/
public com.google.protobuf.ProtocolStringList
getKeywordsList() {
return keywords_;
}
/**
*
* A list of keywords to get historical metrics.
* Not all inputs will be returned as a result of near-exact deduplication.
* For example, if stats for "car" and "cars" are requested, only "car" will
* be returned.
* A maximum of 10,000 keywords can be used.
*
*
* repeated string keywords = 2;
* @return The count of keywords.
*/
public int getKeywordsCount() {
return keywords_.size();
}
/**
*
* A list of keywords to get historical metrics.
* Not all inputs will be returned as a result of near-exact deduplication.
* For example, if stats for "car" and "cars" are requested, only "car" will
* be returned.
* A maximum of 10,000 keywords can be used.
*
*
* repeated string keywords = 2;
* @param index The index of the element to return.
* @return The keywords at the given index.
*/
public java.lang.String getKeywords(int index) {
return keywords_.get(index);
}
/**
*
* A list of keywords to get historical metrics.
* Not all inputs will be returned as a result of near-exact deduplication.
* For example, if stats for "car" and "cars" are requested, only "car" will
* be returned.
* A maximum of 10,000 keywords can be used.
*
*
* repeated string keywords = 2;
* @param index The index of the value to return.
* @return The bytes of the keywords at the given index.
*/
public com.google.protobuf.ByteString
getKeywordsBytes(int index) {
return keywords_.getByteString(index);
}
public static final int LANGUAGE_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private volatile java.lang.Object language_ = "";
/**
*
* The resource name of the language to target.
* Each keyword belongs to some set of languages; a keyword is included if
* language is one of its languages.
* If not set, all keywords will be included.
*
*
* optional string language = 4;
* @return Whether the language field is set.
*/
@java.lang.Override
public boolean hasLanguage() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* The resource name of the language to target.
* Each keyword belongs to some set of languages; a keyword is included if
* language is one of its languages.
* If not set, all keywords will be included.
*
*
* optional string language = 4;
* @return The language.
*/
@java.lang.Override
public java.lang.String getLanguage() {
java.lang.Object ref = language_;
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();
language_ = s;
return s;
}
}
/**
*
* The resource name of the language to target.
* Each keyword belongs to some set of languages; a keyword is included if
* language is one of its languages.
* If not set, all keywords will be included.
*
*
* optional string language = 4;
* @return The bytes for language.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getLanguageBytes() {
java.lang.Object ref = language_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
language_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int INCLUDE_ADULT_KEYWORDS_FIELD_NUMBER = 5;
private boolean includeAdultKeywords_ = false;
/**
*
* If true, adult keywords will be included in response.
* The default value is false.
*
*
* bool include_adult_keywords = 5;
* @return The includeAdultKeywords.
*/
@java.lang.Override
public boolean getIncludeAdultKeywords() {
return includeAdultKeywords_;
}
public static final int GEO_TARGET_CONSTANTS_FIELD_NUMBER = 6;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList geoTargetConstants_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* The resource names of the location to target. Maximum is 10.
* An empty list MAY be used to specify all targeting geos.
*
*
* repeated string geo_target_constants = 6;
* @return A list containing the geoTargetConstants.
*/
public com.google.protobuf.ProtocolStringList
getGeoTargetConstantsList() {
return geoTargetConstants_;
}
/**
*
* The resource names of the location to target. Maximum is 10.
* An empty list MAY be used to specify all targeting geos.
*
*
* repeated string geo_target_constants = 6;
* @return The count of geoTargetConstants.
*/
public int getGeoTargetConstantsCount() {
return geoTargetConstants_.size();
}
/**
*
* The resource names of the location to target. Maximum is 10.
* An empty list MAY be used to specify all targeting geos.
*
*
* repeated string geo_target_constants = 6;
* @param index The index of the element to return.
* @return The geoTargetConstants at the given index.
*/
public java.lang.String getGeoTargetConstants(int index) {
return geoTargetConstants_.get(index);
}
/**
*
* The resource names of the location to target. Maximum is 10.
* An empty list MAY be used to specify all targeting geos.
*
*
* repeated string geo_target_constants = 6;
* @param index The index of the value to return.
* @return The bytes of the geoTargetConstants at the given index.
*/
public com.google.protobuf.ByteString
getGeoTargetConstantsBytes(int index) {
return geoTargetConstants_.getByteString(index);
}
public static final int KEYWORD_PLAN_NETWORK_FIELD_NUMBER = 7;
private int keywordPlanNetwork_ = 0;
/**
*
* Targeting network.
* If not set, Google Search And Partners Network will be used.
*
*
* .google.ads.googleads.v17.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork keyword_plan_network = 7;
* @return The enum numeric value on the wire for keywordPlanNetwork.
*/
@java.lang.Override public int getKeywordPlanNetworkValue() {
return keywordPlanNetwork_;
}
/**
*
* Targeting network.
* If not set, Google Search And Partners Network will be used.
*
*
* .google.ads.googleads.v17.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork keyword_plan_network = 7;
* @return The keywordPlanNetwork.
*/
@java.lang.Override public com.google.ads.googleads.v17.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork getKeywordPlanNetwork() {
com.google.ads.googleads.v17.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork result = com.google.ads.googleads.v17.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork.forNumber(keywordPlanNetwork_);
return result == null ? com.google.ads.googleads.v17.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork.UNRECOGNIZED : result;
}
public static final int AGGREGATE_METRICS_FIELD_NUMBER = 8;
private com.google.ads.googleads.v17.common.KeywordPlanAggregateMetrics aggregateMetrics_;
/**
*
* The aggregate fields to include in response.
*
*
* .google.ads.googleads.v17.common.KeywordPlanAggregateMetrics aggregate_metrics = 8;
* @return Whether the aggregateMetrics field is set.
*/
@java.lang.Override
public boolean hasAggregateMetrics() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* The aggregate fields to include in response.
*
*
* .google.ads.googleads.v17.common.KeywordPlanAggregateMetrics aggregate_metrics = 8;
* @return The aggregateMetrics.
*/
@java.lang.Override
public com.google.ads.googleads.v17.common.KeywordPlanAggregateMetrics getAggregateMetrics() {
return aggregateMetrics_ == null ? com.google.ads.googleads.v17.common.KeywordPlanAggregateMetrics.getDefaultInstance() : aggregateMetrics_;
}
/**
*
* The aggregate fields to include in response.
*
*
* .google.ads.googleads.v17.common.KeywordPlanAggregateMetrics aggregate_metrics = 8;
*/
@java.lang.Override
public com.google.ads.googleads.v17.common.KeywordPlanAggregateMetricsOrBuilder getAggregateMetricsOrBuilder() {
return aggregateMetrics_ == null ? com.google.ads.googleads.v17.common.KeywordPlanAggregateMetrics.getDefaultInstance() : aggregateMetrics_;
}
public static final int HISTORICAL_METRICS_OPTIONS_FIELD_NUMBER = 3;
private com.google.ads.googleads.v17.common.HistoricalMetricsOptions historicalMetricsOptions_;
/**
*
* The options for historical metrics data.
*
*
* .google.ads.googleads.v17.common.HistoricalMetricsOptions historical_metrics_options = 3;
* @return Whether the historicalMetricsOptions field is set.
*/
@java.lang.Override
public boolean hasHistoricalMetricsOptions() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* The options for historical metrics data.
*
*
* .google.ads.googleads.v17.common.HistoricalMetricsOptions historical_metrics_options = 3;
* @return The historicalMetricsOptions.
*/
@java.lang.Override
public com.google.ads.googleads.v17.common.HistoricalMetricsOptions getHistoricalMetricsOptions() {
return historicalMetricsOptions_ == null ? com.google.ads.googleads.v17.common.HistoricalMetricsOptions.getDefaultInstance() : historicalMetricsOptions_;
}
/**
*
* The options for historical metrics data.
*
*
* .google.ads.googleads.v17.common.HistoricalMetricsOptions historical_metrics_options = 3;
*/
@java.lang.Override
public com.google.ads.googleads.v17.common.HistoricalMetricsOptionsOrBuilder getHistoricalMetricsOptionsOrBuilder() {
return historicalMetricsOptions_ == null ? com.google.ads.googleads.v17.common.HistoricalMetricsOptions.getDefaultInstance() : historicalMetricsOptions_;
}
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(customerId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, customerId_);
}
for (int i = 0; i < keywords_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, keywords_.getRaw(i));
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(3, getHistoricalMetricsOptions());
}
if (((bitField0_ & 0x00000001) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, language_);
}
if (includeAdultKeywords_ != false) {
output.writeBool(5, includeAdultKeywords_);
}
for (int i = 0; i < geoTargetConstants_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, geoTargetConstants_.getRaw(i));
}
if (keywordPlanNetwork_ != com.google.ads.googleads.v17.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork.UNSPECIFIED.getNumber()) {
output.writeEnum(7, keywordPlanNetwork_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(8, getAggregateMetrics());
}
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(customerId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, customerId_);
}
{
int dataSize = 0;
for (int i = 0; i < keywords_.size(); i++) {
dataSize += computeStringSizeNoTag(keywords_.getRaw(i));
}
size += dataSize;
size += 1 * getKeywordsList().size();
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getHistoricalMetricsOptions());
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, language_);
}
if (includeAdultKeywords_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(5, includeAdultKeywords_);
}
{
int dataSize = 0;
for (int i = 0; i < geoTargetConstants_.size(); i++) {
dataSize += computeStringSizeNoTag(geoTargetConstants_.getRaw(i));
}
size += dataSize;
size += 1 * getGeoTargetConstantsList().size();
}
if (keywordPlanNetwork_ != com.google.ads.googleads.v17.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork.UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(7, keywordPlanNetwork_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, getAggregateMetrics());
}
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.GenerateKeywordHistoricalMetricsRequest)) {
return super.equals(obj);
}
com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsRequest other = (com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsRequest) obj;
if (!getCustomerId()
.equals(other.getCustomerId())) return false;
if (!getKeywordsList()
.equals(other.getKeywordsList())) return false;
if (hasLanguage() != other.hasLanguage()) return false;
if (hasLanguage()) {
if (!getLanguage()
.equals(other.getLanguage())) return false;
}
if (getIncludeAdultKeywords()
!= other.getIncludeAdultKeywords()) return false;
if (!getGeoTargetConstantsList()
.equals(other.getGeoTargetConstantsList())) return false;
if (keywordPlanNetwork_ != other.keywordPlanNetwork_) return false;
if (hasAggregateMetrics() != other.hasAggregateMetrics()) return false;
if (hasAggregateMetrics()) {
if (!getAggregateMetrics()
.equals(other.getAggregateMetrics())) return false;
}
if (hasHistoricalMetricsOptions() != other.hasHistoricalMetricsOptions()) return false;
if (hasHistoricalMetricsOptions()) {
if (!getHistoricalMetricsOptions()
.equals(other.getHistoricalMetricsOptions())) 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) + CUSTOMER_ID_FIELD_NUMBER;
hash = (53 * hash) + getCustomerId().hashCode();
if (getKeywordsCount() > 0) {
hash = (37 * hash) + KEYWORDS_FIELD_NUMBER;
hash = (53 * hash) + getKeywordsList().hashCode();
}
if (hasLanguage()) {
hash = (37 * hash) + LANGUAGE_FIELD_NUMBER;
hash = (53 * hash) + getLanguage().hashCode();
}
hash = (37 * hash) + INCLUDE_ADULT_KEYWORDS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getIncludeAdultKeywords());
if (getGeoTargetConstantsCount() > 0) {
hash = (37 * hash) + GEO_TARGET_CONSTANTS_FIELD_NUMBER;
hash = (53 * hash) + getGeoTargetConstantsList().hashCode();
}
hash = (37 * hash) + KEYWORD_PLAN_NETWORK_FIELD_NUMBER;
hash = (53 * hash) + keywordPlanNetwork_;
if (hasAggregateMetrics()) {
hash = (37 * hash) + AGGREGATE_METRICS_FIELD_NUMBER;
hash = (53 * hash) + getAggregateMetrics().hashCode();
}
if (hasHistoricalMetricsOptions()) {
hash = (37 * hash) + HISTORICAL_METRICS_OPTIONS_FIELD_NUMBER;
hash = (53 * hash) + getHistoricalMetricsOptions().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsRequest 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.GenerateKeywordHistoricalMetricsRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsRequest 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.GenerateKeywordHistoricalMetricsRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsRequest 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.GenerateKeywordHistoricalMetricsRequest 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.GenerateKeywordHistoricalMetricsRequest 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.GenerateKeywordHistoricalMetricsRequest 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.GenerateKeywordHistoricalMetricsRequest 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.GenerateKeywordHistoricalMetricsRequest 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.GenerateKeywordHistoricalMetricsRequest 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.GenerateKeywordHistoricalMetricsRequest 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;
}
/**
*
* Request message for
* [KeywordPlanIdeaService.GenerateKeywordHistoricalMetrics][google.ads.googleads.v17.services.KeywordPlanIdeaService.GenerateKeywordHistoricalMetrics].
*
*
* Protobuf type {@code google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsRequest)
com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.ads.googleads.v17.services.KeywordPlanIdeaServiceProto.internal_static_google_ads_googleads_v17_services_GenerateKeywordHistoricalMetricsRequest_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_GenerateKeywordHistoricalMetricsRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsRequest.class, com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsRequest.Builder.class);
}
// Construct using com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getAggregateMetricsFieldBuilder();
getHistoricalMetricsOptionsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
customerId_ = "";
keywords_ =
com.google.protobuf.LazyStringArrayList.emptyList();
language_ = "";
includeAdultKeywords_ = false;
geoTargetConstants_ =
com.google.protobuf.LazyStringArrayList.emptyList();
keywordPlanNetwork_ = 0;
aggregateMetrics_ = null;
if (aggregateMetricsBuilder_ != null) {
aggregateMetricsBuilder_.dispose();
aggregateMetricsBuilder_ = null;
}
historicalMetricsOptions_ = null;
if (historicalMetricsOptionsBuilder_ != null) {
historicalMetricsOptionsBuilder_.dispose();
historicalMetricsOptionsBuilder_ = 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_GenerateKeywordHistoricalMetricsRequest_descriptor;
}
@java.lang.Override
public com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsRequest getDefaultInstanceForType() {
return com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsRequest.getDefaultInstance();
}
@java.lang.Override
public com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsRequest build() {
com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsRequest buildPartial() {
com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsRequest result = new com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsRequest(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsRequest result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.customerId_ = customerId_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
keywords_.makeImmutable();
result.keywords_ = keywords_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000004) != 0)) {
result.language_ = language_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.includeAdultKeywords_ = includeAdultKeywords_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
geoTargetConstants_.makeImmutable();
result.geoTargetConstants_ = geoTargetConstants_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.keywordPlanNetwork_ = keywordPlanNetwork_;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.aggregateMetrics_ = aggregateMetricsBuilder_ == null
? aggregateMetrics_
: aggregateMetricsBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.historicalMetricsOptions_ = historicalMetricsOptionsBuilder_ == null
? historicalMetricsOptions_
: historicalMetricsOptionsBuilder_.build();
to_bitField0_ |= 0x00000004;
}
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.GenerateKeywordHistoricalMetricsRequest) {
return mergeFrom((com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsRequest other) {
if (other == com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsRequest.getDefaultInstance()) return this;
if (!other.getCustomerId().isEmpty()) {
customerId_ = other.customerId_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.keywords_.isEmpty()) {
if (keywords_.isEmpty()) {
keywords_ = other.keywords_;
bitField0_ |= 0x00000002;
} else {
ensureKeywordsIsMutable();
keywords_.addAll(other.keywords_);
}
onChanged();
}
if (other.hasLanguage()) {
language_ = other.language_;
bitField0_ |= 0x00000004;
onChanged();
}
if (other.getIncludeAdultKeywords() != false) {
setIncludeAdultKeywords(other.getIncludeAdultKeywords());
}
if (!other.geoTargetConstants_.isEmpty()) {
if (geoTargetConstants_.isEmpty()) {
geoTargetConstants_ = other.geoTargetConstants_;
bitField0_ |= 0x00000010;
} else {
ensureGeoTargetConstantsIsMutable();
geoTargetConstants_.addAll(other.geoTargetConstants_);
}
onChanged();
}
if (other.keywordPlanNetwork_ != 0) {
setKeywordPlanNetworkValue(other.getKeywordPlanNetworkValue());
}
if (other.hasAggregateMetrics()) {
mergeAggregateMetrics(other.getAggregateMetrics());
}
if (other.hasHistoricalMetricsOptions()) {
mergeHistoricalMetricsOptions(other.getHistoricalMetricsOptions());
}
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: {
customerId_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
java.lang.String s = input.readStringRequireUtf8();
ensureKeywordsIsMutable();
keywords_.add(s);
break;
} // case 18
case 26: {
input.readMessage(
getHistoricalMetricsOptionsFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000080;
break;
} // case 26
case 34: {
language_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 34
case 40: {
includeAdultKeywords_ = input.readBool();
bitField0_ |= 0x00000008;
break;
} // case 40
case 50: {
java.lang.String s = input.readStringRequireUtf8();
ensureGeoTargetConstantsIsMutable();
geoTargetConstants_.add(s);
break;
} // case 50
case 56: {
keywordPlanNetwork_ = input.readEnum();
bitField0_ |= 0x00000020;
break;
} // case 56
case 66: {
input.readMessage(
getAggregateMetricsFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000040;
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 customerId_ = "";
/**
*
* The ID of the customer with the recommendation.
*
*
* string customer_id = 1;
* @return The customerId.
*/
public java.lang.String getCustomerId() {
java.lang.Object ref = customerId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
customerId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The ID of the customer with the recommendation.
*
*
* string customer_id = 1;
* @return The bytes for customerId.
*/
public com.google.protobuf.ByteString
getCustomerIdBytes() {
java.lang.Object ref = customerId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
customerId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The ID of the customer with the recommendation.
*
*
* string customer_id = 1;
* @param value The customerId to set.
* @return This builder for chaining.
*/
public Builder setCustomerId(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
customerId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* The ID of the customer with the recommendation.
*
*
* string customer_id = 1;
* @return This builder for chaining.
*/
public Builder clearCustomerId() {
customerId_ = getDefaultInstance().getCustomerId();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* The ID of the customer with the recommendation.
*
*
* string customer_id = 1;
* @param value The bytes for customerId to set.
* @return This builder for chaining.
*/
public Builder setCustomerIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
customerId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList keywords_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureKeywordsIsMutable() {
if (!keywords_.isModifiable()) {
keywords_ = new com.google.protobuf.LazyStringArrayList(keywords_);
}
bitField0_ |= 0x00000002;
}
/**
*
* A list of keywords to get historical metrics.
* Not all inputs will be returned as a result of near-exact deduplication.
* For example, if stats for "car" and "cars" are requested, only "car" will
* be returned.
* A maximum of 10,000 keywords can be used.
*
*
* repeated string keywords = 2;
* @return A list containing the keywords.
*/
public com.google.protobuf.ProtocolStringList
getKeywordsList() {
keywords_.makeImmutable();
return keywords_;
}
/**
*
* A list of keywords to get historical metrics.
* Not all inputs will be returned as a result of near-exact deduplication.
* For example, if stats for "car" and "cars" are requested, only "car" will
* be returned.
* A maximum of 10,000 keywords can be used.
*
*
* repeated string keywords = 2;
* @return The count of keywords.
*/
public int getKeywordsCount() {
return keywords_.size();
}
/**
*
* A list of keywords to get historical metrics.
* Not all inputs will be returned as a result of near-exact deduplication.
* For example, if stats for "car" and "cars" are requested, only "car" will
* be returned.
* A maximum of 10,000 keywords can be used.
*
*
* repeated string keywords = 2;
* @param index The index of the element to return.
* @return The keywords at the given index.
*/
public java.lang.String getKeywords(int index) {
return keywords_.get(index);
}
/**
*
* A list of keywords to get historical metrics.
* Not all inputs will be returned as a result of near-exact deduplication.
* For example, if stats for "car" and "cars" are requested, only "car" will
* be returned.
* A maximum of 10,000 keywords can be used.
*
*
* repeated string keywords = 2;
* @param index The index of the value to return.
* @return The bytes of the keywords at the given index.
*/
public com.google.protobuf.ByteString
getKeywordsBytes(int index) {
return keywords_.getByteString(index);
}
/**
*
* A list of keywords to get historical metrics.
* Not all inputs will be returned as a result of near-exact deduplication.
* For example, if stats for "car" and "cars" are requested, only "car" will
* be returned.
* A maximum of 10,000 keywords can be used.
*
*
* repeated string keywords = 2;
* @param index The index to set the value at.
* @param value The keywords to set.
* @return This builder for chaining.
*/
public Builder setKeywords(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureKeywordsIsMutable();
keywords_.set(index, value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* A list of keywords to get historical metrics.
* Not all inputs will be returned as a result of near-exact deduplication.
* For example, if stats for "car" and "cars" are requested, only "car" will
* be returned.
* A maximum of 10,000 keywords can be used.
*
*
* repeated string keywords = 2;
* @param value The keywords to add.
* @return This builder for chaining.
*/
public Builder addKeywords(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureKeywordsIsMutable();
keywords_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* A list of keywords to get historical metrics.
* Not all inputs will be returned as a result of near-exact deduplication.
* For example, if stats for "car" and "cars" are requested, only "car" will
* be returned.
* A maximum of 10,000 keywords can be used.
*
*
* repeated string keywords = 2;
* @param values The keywords to add.
* @return This builder for chaining.
*/
public Builder addAllKeywords(
java.lang.Iterable values) {
ensureKeywordsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, keywords_);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* A list of keywords to get historical metrics.
* Not all inputs will be returned as a result of near-exact deduplication.
* For example, if stats for "car" and "cars" are requested, only "car" will
* be returned.
* A maximum of 10,000 keywords can be used.
*
*
* repeated string keywords = 2;
* @return This builder for chaining.
*/
public Builder clearKeywords() {
keywords_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);;
onChanged();
return this;
}
/**
*
* A list of keywords to get historical metrics.
* Not all inputs will be returned as a result of near-exact deduplication.
* For example, if stats for "car" and "cars" are requested, only "car" will
* be returned.
* A maximum of 10,000 keywords can be used.
*
*
* repeated string keywords = 2;
* @param value The bytes of the keywords to add.
* @return This builder for chaining.
*/
public Builder addKeywordsBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
ensureKeywordsIsMutable();
keywords_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object language_ = "";
/**
*
* The resource name of the language to target.
* Each keyword belongs to some set of languages; a keyword is included if
* language is one of its languages.
* If not set, all keywords will be included.
*
*
* optional string language = 4;
* @return Whether the language field is set.
*/
public boolean hasLanguage() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* The resource name of the language to target.
* Each keyword belongs to some set of languages; a keyword is included if
* language is one of its languages.
* If not set, all keywords will be included.
*
*
* optional string language = 4;
* @return The language.
*/
public java.lang.String getLanguage() {
java.lang.Object ref = language_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
language_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The resource name of the language to target.
* Each keyword belongs to some set of languages; a keyword is included if
* language is one of its languages.
* If not set, all keywords will be included.
*
*
* optional string language = 4;
* @return The bytes for language.
*/
public com.google.protobuf.ByteString
getLanguageBytes() {
java.lang.Object ref = language_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
language_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The resource name of the language to target.
* Each keyword belongs to some set of languages; a keyword is included if
* language is one of its languages.
* If not set, all keywords will be included.
*
*
* optional string language = 4;
* @param value The language to set.
* @return This builder for chaining.
*/
public Builder setLanguage(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
language_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* The resource name of the language to target.
* Each keyword belongs to some set of languages; a keyword is included if
* language is one of its languages.
* If not set, all keywords will be included.
*
*
* optional string language = 4;
* @return This builder for chaining.
*/
public Builder clearLanguage() {
language_ = getDefaultInstance().getLanguage();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
* The resource name of the language to target.
* Each keyword belongs to some set of languages; a keyword is included if
* language is one of its languages.
* If not set, all keywords will be included.
*
*
* optional string language = 4;
* @param value The bytes for language to set.
* @return This builder for chaining.
*/
public Builder setLanguageBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
language_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private boolean includeAdultKeywords_ ;
/**
*
* If true, adult keywords will be included in response.
* The default value is false.
*
*
* bool include_adult_keywords = 5;
* @return The includeAdultKeywords.
*/
@java.lang.Override
public boolean getIncludeAdultKeywords() {
return includeAdultKeywords_;
}
/**
*
* If true, adult keywords will be included in response.
* The default value is false.
*
*
* bool include_adult_keywords = 5;
* @param value The includeAdultKeywords to set.
* @return This builder for chaining.
*/
public Builder setIncludeAdultKeywords(boolean value) {
includeAdultKeywords_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* If true, adult keywords will be included in response.
* The default value is false.
*
*
* bool include_adult_keywords = 5;
* @return This builder for chaining.
*/
public Builder clearIncludeAdultKeywords() {
bitField0_ = (bitField0_ & ~0x00000008);
includeAdultKeywords_ = false;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList geoTargetConstants_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureGeoTargetConstantsIsMutable() {
if (!geoTargetConstants_.isModifiable()) {
geoTargetConstants_ = new com.google.protobuf.LazyStringArrayList(geoTargetConstants_);
}
bitField0_ |= 0x00000010;
}
/**
*
* The resource names of the location to target. Maximum is 10.
* An empty list MAY be used to specify all targeting geos.
*
*
* repeated string geo_target_constants = 6;
* @return A list containing the geoTargetConstants.
*/
public com.google.protobuf.ProtocolStringList
getGeoTargetConstantsList() {
geoTargetConstants_.makeImmutable();
return geoTargetConstants_;
}
/**
*
* The resource names of the location to target. Maximum is 10.
* An empty list MAY be used to specify all targeting geos.
*
*
* repeated string geo_target_constants = 6;
* @return The count of geoTargetConstants.
*/
public int getGeoTargetConstantsCount() {
return geoTargetConstants_.size();
}
/**
*
* The resource names of the location to target. Maximum is 10.
* An empty list MAY be used to specify all targeting geos.
*
*
* repeated string geo_target_constants = 6;
* @param index The index of the element to return.
* @return The geoTargetConstants at the given index.
*/
public java.lang.String getGeoTargetConstants(int index) {
return geoTargetConstants_.get(index);
}
/**
*
* The resource names of the location to target. Maximum is 10.
* An empty list MAY be used to specify all targeting geos.
*
*
* repeated string geo_target_constants = 6;
* @param index The index of the value to return.
* @return The bytes of the geoTargetConstants at the given index.
*/
public com.google.protobuf.ByteString
getGeoTargetConstantsBytes(int index) {
return geoTargetConstants_.getByteString(index);
}
/**
*
* The resource names of the location to target. Maximum is 10.
* An empty list MAY be used to specify all targeting geos.
*
*
* repeated string geo_target_constants = 6;
* @param index The index to set the value at.
* @param value The geoTargetConstants to set.
* @return This builder for chaining.
*/
public Builder setGeoTargetConstants(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureGeoTargetConstantsIsMutable();
geoTargetConstants_.set(index, value);
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* The resource names of the location to target. Maximum is 10.
* An empty list MAY be used to specify all targeting geos.
*
*
* repeated string geo_target_constants = 6;
* @param value The geoTargetConstants to add.
* @return This builder for chaining.
*/
public Builder addGeoTargetConstants(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureGeoTargetConstantsIsMutable();
geoTargetConstants_.add(value);
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* The resource names of the location to target. Maximum is 10.
* An empty list MAY be used to specify all targeting geos.
*
*
* repeated string geo_target_constants = 6;
* @param values The geoTargetConstants to add.
* @return This builder for chaining.
*/
public Builder addAllGeoTargetConstants(
java.lang.Iterable values) {
ensureGeoTargetConstantsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, geoTargetConstants_);
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* The resource names of the location to target. Maximum is 10.
* An empty list MAY be used to specify all targeting geos.
*
*
* repeated string geo_target_constants = 6;
* @return This builder for chaining.
*/
public Builder clearGeoTargetConstants() {
geoTargetConstants_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);;
onChanged();
return this;
}
/**
*
* The resource names of the location to target. Maximum is 10.
* An empty list MAY be used to specify all targeting geos.
*
*
* repeated string geo_target_constants = 6;
* @param value The bytes of the geoTargetConstants to add.
* @return This builder for chaining.
*/
public Builder addGeoTargetConstantsBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
ensureGeoTargetConstantsIsMutable();
geoTargetConstants_.add(value);
bitField0_ |= 0x00000010;
onChanged();
return this;
}
private int keywordPlanNetwork_ = 0;
/**
*
* Targeting network.
* If not set, Google Search And Partners Network will be used.
*
*
* .google.ads.googleads.v17.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork keyword_plan_network = 7;
* @return The enum numeric value on the wire for keywordPlanNetwork.
*/
@java.lang.Override public int getKeywordPlanNetworkValue() {
return keywordPlanNetwork_;
}
/**
*
* Targeting network.
* If not set, Google Search And Partners Network will be used.
*
*
* .google.ads.googleads.v17.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork keyword_plan_network = 7;
* @param value The enum numeric value on the wire for keywordPlanNetwork to set.
* @return This builder for chaining.
*/
public Builder setKeywordPlanNetworkValue(int value) {
keywordPlanNetwork_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
* Targeting network.
* If not set, Google Search And Partners Network will be used.
*
*
* .google.ads.googleads.v17.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork keyword_plan_network = 7;
* @return The keywordPlanNetwork.
*/
@java.lang.Override
public com.google.ads.googleads.v17.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork getKeywordPlanNetwork() {
com.google.ads.googleads.v17.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork result = com.google.ads.googleads.v17.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork.forNumber(keywordPlanNetwork_);
return result == null ? com.google.ads.googleads.v17.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork.UNRECOGNIZED : result;
}
/**
*
* Targeting network.
* If not set, Google Search And Partners Network will be used.
*
*
* .google.ads.googleads.v17.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork keyword_plan_network = 7;
* @param value The keywordPlanNetwork to set.
* @return This builder for chaining.
*/
public Builder setKeywordPlanNetwork(com.google.ads.googleads.v17.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000020;
keywordPlanNetwork_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Targeting network.
* If not set, Google Search And Partners Network will be used.
*
*
* .google.ads.googleads.v17.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork keyword_plan_network = 7;
* @return This builder for chaining.
*/
public Builder clearKeywordPlanNetwork() {
bitField0_ = (bitField0_ & ~0x00000020);
keywordPlanNetwork_ = 0;
onChanged();
return this;
}
private com.google.ads.googleads.v17.common.KeywordPlanAggregateMetrics aggregateMetrics_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.common.KeywordPlanAggregateMetrics, com.google.ads.googleads.v17.common.KeywordPlanAggregateMetrics.Builder, com.google.ads.googleads.v17.common.KeywordPlanAggregateMetricsOrBuilder> aggregateMetricsBuilder_;
/**
*
* The aggregate fields to include in response.
*
*
* .google.ads.googleads.v17.common.KeywordPlanAggregateMetrics aggregate_metrics = 8;
* @return Whether the aggregateMetrics field is set.
*/
public boolean hasAggregateMetrics() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
* The aggregate fields to include in response.
*
*
* .google.ads.googleads.v17.common.KeywordPlanAggregateMetrics aggregate_metrics = 8;
* @return The aggregateMetrics.
*/
public com.google.ads.googleads.v17.common.KeywordPlanAggregateMetrics getAggregateMetrics() {
if (aggregateMetricsBuilder_ == null) {
return aggregateMetrics_ == null ? com.google.ads.googleads.v17.common.KeywordPlanAggregateMetrics.getDefaultInstance() : aggregateMetrics_;
} else {
return aggregateMetricsBuilder_.getMessage();
}
}
/**
*
* The aggregate fields to include in response.
*
*
* .google.ads.googleads.v17.common.KeywordPlanAggregateMetrics aggregate_metrics = 8;
*/
public Builder setAggregateMetrics(com.google.ads.googleads.v17.common.KeywordPlanAggregateMetrics value) {
if (aggregateMetricsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
aggregateMetrics_ = value;
} else {
aggregateMetricsBuilder_.setMessage(value);
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
* The aggregate fields to include in response.
*
*
* .google.ads.googleads.v17.common.KeywordPlanAggregateMetrics aggregate_metrics = 8;
*/
public Builder setAggregateMetrics(
com.google.ads.googleads.v17.common.KeywordPlanAggregateMetrics.Builder builderForValue) {
if (aggregateMetricsBuilder_ == null) {
aggregateMetrics_ = builderForValue.build();
} else {
aggregateMetricsBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
* The aggregate fields to include in response.
*
*
* .google.ads.googleads.v17.common.KeywordPlanAggregateMetrics aggregate_metrics = 8;
*/
public Builder mergeAggregateMetrics(com.google.ads.googleads.v17.common.KeywordPlanAggregateMetrics value) {
if (aggregateMetricsBuilder_ == null) {
if (((bitField0_ & 0x00000040) != 0) &&
aggregateMetrics_ != null &&
aggregateMetrics_ != com.google.ads.googleads.v17.common.KeywordPlanAggregateMetrics.getDefaultInstance()) {
getAggregateMetricsBuilder().mergeFrom(value);
} else {
aggregateMetrics_ = value;
}
} else {
aggregateMetricsBuilder_.mergeFrom(value);
}
if (aggregateMetrics_ != null) {
bitField0_ |= 0x00000040;
onChanged();
}
return this;
}
/**
*
* The aggregate fields to include in response.
*
*
* .google.ads.googleads.v17.common.KeywordPlanAggregateMetrics aggregate_metrics = 8;
*/
public Builder clearAggregateMetrics() {
bitField0_ = (bitField0_ & ~0x00000040);
aggregateMetrics_ = null;
if (aggregateMetricsBuilder_ != null) {
aggregateMetricsBuilder_.dispose();
aggregateMetricsBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* The aggregate fields to include in response.
*
*
* .google.ads.googleads.v17.common.KeywordPlanAggregateMetrics aggregate_metrics = 8;
*/
public com.google.ads.googleads.v17.common.KeywordPlanAggregateMetrics.Builder getAggregateMetricsBuilder() {
bitField0_ |= 0x00000040;
onChanged();
return getAggregateMetricsFieldBuilder().getBuilder();
}
/**
*
* The aggregate fields to include in response.
*
*
* .google.ads.googleads.v17.common.KeywordPlanAggregateMetrics aggregate_metrics = 8;
*/
public com.google.ads.googleads.v17.common.KeywordPlanAggregateMetricsOrBuilder getAggregateMetricsOrBuilder() {
if (aggregateMetricsBuilder_ != null) {
return aggregateMetricsBuilder_.getMessageOrBuilder();
} else {
return aggregateMetrics_ == null ?
com.google.ads.googleads.v17.common.KeywordPlanAggregateMetrics.getDefaultInstance() : aggregateMetrics_;
}
}
/**
*
* The aggregate fields to include in response.
*
*
* .google.ads.googleads.v17.common.KeywordPlanAggregateMetrics aggregate_metrics = 8;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.common.KeywordPlanAggregateMetrics, com.google.ads.googleads.v17.common.KeywordPlanAggregateMetrics.Builder, com.google.ads.googleads.v17.common.KeywordPlanAggregateMetricsOrBuilder>
getAggregateMetricsFieldBuilder() {
if (aggregateMetricsBuilder_ == null) {
aggregateMetricsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.common.KeywordPlanAggregateMetrics, com.google.ads.googleads.v17.common.KeywordPlanAggregateMetrics.Builder, com.google.ads.googleads.v17.common.KeywordPlanAggregateMetricsOrBuilder>(
getAggregateMetrics(),
getParentForChildren(),
isClean());
aggregateMetrics_ = null;
}
return aggregateMetricsBuilder_;
}
private com.google.ads.googleads.v17.common.HistoricalMetricsOptions historicalMetricsOptions_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.common.HistoricalMetricsOptions, com.google.ads.googleads.v17.common.HistoricalMetricsOptions.Builder, com.google.ads.googleads.v17.common.HistoricalMetricsOptionsOrBuilder> historicalMetricsOptionsBuilder_;
/**
*
* The options for historical metrics data.
*
*
* .google.ads.googleads.v17.common.HistoricalMetricsOptions historical_metrics_options = 3;
* @return Whether the historicalMetricsOptions field is set.
*/
public boolean hasHistoricalMetricsOptions() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
*
* The options for historical metrics data.
*
*
* .google.ads.googleads.v17.common.HistoricalMetricsOptions historical_metrics_options = 3;
* @return The historicalMetricsOptions.
*/
public com.google.ads.googleads.v17.common.HistoricalMetricsOptions getHistoricalMetricsOptions() {
if (historicalMetricsOptionsBuilder_ == null) {
return historicalMetricsOptions_ == null ? com.google.ads.googleads.v17.common.HistoricalMetricsOptions.getDefaultInstance() : historicalMetricsOptions_;
} else {
return historicalMetricsOptionsBuilder_.getMessage();
}
}
/**
*
* The options for historical metrics data.
*
*
* .google.ads.googleads.v17.common.HistoricalMetricsOptions historical_metrics_options = 3;
*/
public Builder setHistoricalMetricsOptions(com.google.ads.googleads.v17.common.HistoricalMetricsOptions value) {
if (historicalMetricsOptionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
historicalMetricsOptions_ = value;
} else {
historicalMetricsOptionsBuilder_.setMessage(value);
}
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
* The options for historical metrics data.
*
*
* .google.ads.googleads.v17.common.HistoricalMetricsOptions historical_metrics_options = 3;
*/
public Builder setHistoricalMetricsOptions(
com.google.ads.googleads.v17.common.HistoricalMetricsOptions.Builder builderForValue) {
if (historicalMetricsOptionsBuilder_ == null) {
historicalMetricsOptions_ = builderForValue.build();
} else {
historicalMetricsOptionsBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
* The options for historical metrics data.
*
*
* .google.ads.googleads.v17.common.HistoricalMetricsOptions historical_metrics_options = 3;
*/
public Builder mergeHistoricalMetricsOptions(com.google.ads.googleads.v17.common.HistoricalMetricsOptions value) {
if (historicalMetricsOptionsBuilder_ == null) {
if (((bitField0_ & 0x00000080) != 0) &&
historicalMetricsOptions_ != null &&
historicalMetricsOptions_ != com.google.ads.googleads.v17.common.HistoricalMetricsOptions.getDefaultInstance()) {
getHistoricalMetricsOptionsBuilder().mergeFrom(value);
} else {
historicalMetricsOptions_ = value;
}
} else {
historicalMetricsOptionsBuilder_.mergeFrom(value);
}
if (historicalMetricsOptions_ != null) {
bitField0_ |= 0x00000080;
onChanged();
}
return this;
}
/**
*
* The options for historical metrics data.
*
*
* .google.ads.googleads.v17.common.HistoricalMetricsOptions historical_metrics_options = 3;
*/
public Builder clearHistoricalMetricsOptions() {
bitField0_ = (bitField0_ & ~0x00000080);
historicalMetricsOptions_ = null;
if (historicalMetricsOptionsBuilder_ != null) {
historicalMetricsOptionsBuilder_.dispose();
historicalMetricsOptionsBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* The options for historical metrics data.
*
*
* .google.ads.googleads.v17.common.HistoricalMetricsOptions historical_metrics_options = 3;
*/
public com.google.ads.googleads.v17.common.HistoricalMetricsOptions.Builder getHistoricalMetricsOptionsBuilder() {
bitField0_ |= 0x00000080;
onChanged();
return getHistoricalMetricsOptionsFieldBuilder().getBuilder();
}
/**
*
* The options for historical metrics data.
*
*
* .google.ads.googleads.v17.common.HistoricalMetricsOptions historical_metrics_options = 3;
*/
public com.google.ads.googleads.v17.common.HistoricalMetricsOptionsOrBuilder getHistoricalMetricsOptionsOrBuilder() {
if (historicalMetricsOptionsBuilder_ != null) {
return historicalMetricsOptionsBuilder_.getMessageOrBuilder();
} else {
return historicalMetricsOptions_ == null ?
com.google.ads.googleads.v17.common.HistoricalMetricsOptions.getDefaultInstance() : historicalMetricsOptions_;
}
}
/**
*
* The options for historical metrics data.
*
*
* .google.ads.googleads.v17.common.HistoricalMetricsOptions historical_metrics_options = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.common.HistoricalMetricsOptions, com.google.ads.googleads.v17.common.HistoricalMetricsOptions.Builder, com.google.ads.googleads.v17.common.HistoricalMetricsOptionsOrBuilder>
getHistoricalMetricsOptionsFieldBuilder() {
if (historicalMetricsOptionsBuilder_ == null) {
historicalMetricsOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.common.HistoricalMetricsOptions, com.google.ads.googleads.v17.common.HistoricalMetricsOptions.Builder, com.google.ads.googleads.v17.common.HistoricalMetricsOptionsOrBuilder>(
getHistoricalMetricsOptions(),
getParentForChildren(),
isClean());
historicalMetricsOptions_ = null;
}
return historicalMetricsOptionsBuilder_;
}
@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.GenerateKeywordHistoricalMetricsRequest)
}
// @@protoc_insertion_point(class_scope:google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsRequest)
private static final com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsRequest();
}
public static com.google.ads.googleads.v17.services.GenerateKeywordHistoricalMetricsRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public GenerateKeywordHistoricalMetricsRequest 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.GenerateKeywordHistoricalMetricsRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy