com.google.ads.googleads.v17.services.CampaignToForecast 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;
/**
*
* A campaign to do a keyword campaign forecast.
*
*
* Protobuf type {@code google.ads.googleads.v17.services.CampaignToForecast}
*/
public final class CampaignToForecast extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.ads.googleads.v17.services.CampaignToForecast)
CampaignToForecastOrBuilder {
private static final long serialVersionUID = 0L;
// Use CampaignToForecast.newBuilder() to construct.
private CampaignToForecast(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CampaignToForecast() {
languageConstants_ =
com.google.protobuf.LazyStringArrayList.emptyList();
geoModifiers_ = java.util.Collections.emptyList();
keywordPlanNetwork_ = 0;
negativeKeywords_ = java.util.Collections.emptyList();
adGroups_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new CampaignToForecast();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.ads.googleads.v17.services.KeywordPlanIdeaServiceProto.internal_static_google_ads_googleads_v17_services_CampaignToForecast_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_CampaignToForecast_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ads.googleads.v17.services.CampaignToForecast.class, com.google.ads.googleads.v17.services.CampaignToForecast.Builder.class);
}
public interface CampaignBiddingStrategyOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy)
com.google.protobuf.MessageOrBuilder {
/**
*
* Use manual CPC bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.ManualCpcBiddingStrategy manual_cpc_bidding_strategy = 1;
* @return Whether the manualCpcBiddingStrategy field is set.
*/
boolean hasManualCpcBiddingStrategy();
/**
*
* Use manual CPC bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.ManualCpcBiddingStrategy manual_cpc_bidding_strategy = 1;
* @return The manualCpcBiddingStrategy.
*/
com.google.ads.googleads.v17.services.ManualCpcBiddingStrategy getManualCpcBiddingStrategy();
/**
*
* Use manual CPC bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.ManualCpcBiddingStrategy manual_cpc_bidding_strategy = 1;
*/
com.google.ads.googleads.v17.services.ManualCpcBiddingStrategyOrBuilder getManualCpcBiddingStrategyOrBuilder();
/**
*
* Use maximize clicks bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy maximize_clicks_bidding_strategy = 2;
* @return Whether the maximizeClicksBiddingStrategy field is set.
*/
boolean hasMaximizeClicksBiddingStrategy();
/**
*
* Use maximize clicks bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy maximize_clicks_bidding_strategy = 2;
* @return The maximizeClicksBiddingStrategy.
*/
com.google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy getMaximizeClicksBiddingStrategy();
/**
*
* Use maximize clicks bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy maximize_clicks_bidding_strategy = 2;
*/
com.google.ads.googleads.v17.services.MaximizeClicksBiddingStrategyOrBuilder getMaximizeClicksBiddingStrategyOrBuilder();
/**
*
* Use maximize conversions bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy maximize_conversions_bidding_strategy = 3;
* @return Whether the maximizeConversionsBiddingStrategy field is set.
*/
boolean hasMaximizeConversionsBiddingStrategy();
/**
*
* Use maximize conversions bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy maximize_conversions_bidding_strategy = 3;
* @return The maximizeConversionsBiddingStrategy.
*/
com.google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy getMaximizeConversionsBiddingStrategy();
/**
*
* Use maximize conversions bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy maximize_conversions_bidding_strategy = 3;
*/
com.google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategyOrBuilder getMaximizeConversionsBiddingStrategyOrBuilder();
com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy.BiddingStrategyCase getBiddingStrategyCase();
}
/**
*
* Supported bidding strategies for new campaign forecasts.
*
*
* Protobuf type {@code google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy}
*/
public static final class CampaignBiddingStrategy extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy)
CampaignBiddingStrategyOrBuilder {
private static final long serialVersionUID = 0L;
// Use CampaignBiddingStrategy.newBuilder() to construct.
private CampaignBiddingStrategy(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CampaignBiddingStrategy() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new CampaignBiddingStrategy();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.ads.googleads.v17.services.KeywordPlanIdeaServiceProto.internal_static_google_ads_googleads_v17_services_CampaignToForecast_CampaignBiddingStrategy_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_CampaignToForecast_CampaignBiddingStrategy_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy.class, com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy.Builder.class);
}
private int biddingStrategyCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object biddingStrategy_;
public enum BiddingStrategyCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
MANUAL_CPC_BIDDING_STRATEGY(1),
MAXIMIZE_CLICKS_BIDDING_STRATEGY(2),
MAXIMIZE_CONVERSIONS_BIDDING_STRATEGY(3),
BIDDINGSTRATEGY_NOT_SET(0);
private final int value;
private BiddingStrategyCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static BiddingStrategyCase valueOf(int value) {
return forNumber(value);
}
public static BiddingStrategyCase forNumber(int value) {
switch (value) {
case 1: return MANUAL_CPC_BIDDING_STRATEGY;
case 2: return MAXIMIZE_CLICKS_BIDDING_STRATEGY;
case 3: return MAXIMIZE_CONVERSIONS_BIDDING_STRATEGY;
case 0: return BIDDINGSTRATEGY_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public BiddingStrategyCase
getBiddingStrategyCase() {
return BiddingStrategyCase.forNumber(
biddingStrategyCase_);
}
public static final int MANUAL_CPC_BIDDING_STRATEGY_FIELD_NUMBER = 1;
/**
*
* Use manual CPC bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.ManualCpcBiddingStrategy manual_cpc_bidding_strategy = 1;
* @return Whether the manualCpcBiddingStrategy field is set.
*/
@java.lang.Override
public boolean hasManualCpcBiddingStrategy() {
return biddingStrategyCase_ == 1;
}
/**
*
* Use manual CPC bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.ManualCpcBiddingStrategy manual_cpc_bidding_strategy = 1;
* @return The manualCpcBiddingStrategy.
*/
@java.lang.Override
public com.google.ads.googleads.v17.services.ManualCpcBiddingStrategy getManualCpcBiddingStrategy() {
if (biddingStrategyCase_ == 1) {
return (com.google.ads.googleads.v17.services.ManualCpcBiddingStrategy) biddingStrategy_;
}
return com.google.ads.googleads.v17.services.ManualCpcBiddingStrategy.getDefaultInstance();
}
/**
*
* Use manual CPC bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.ManualCpcBiddingStrategy manual_cpc_bidding_strategy = 1;
*/
@java.lang.Override
public com.google.ads.googleads.v17.services.ManualCpcBiddingStrategyOrBuilder getManualCpcBiddingStrategyOrBuilder() {
if (biddingStrategyCase_ == 1) {
return (com.google.ads.googleads.v17.services.ManualCpcBiddingStrategy) biddingStrategy_;
}
return com.google.ads.googleads.v17.services.ManualCpcBiddingStrategy.getDefaultInstance();
}
public static final int MAXIMIZE_CLICKS_BIDDING_STRATEGY_FIELD_NUMBER = 2;
/**
*
* Use maximize clicks bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy maximize_clicks_bidding_strategy = 2;
* @return Whether the maximizeClicksBiddingStrategy field is set.
*/
@java.lang.Override
public boolean hasMaximizeClicksBiddingStrategy() {
return biddingStrategyCase_ == 2;
}
/**
*
* Use maximize clicks bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy maximize_clicks_bidding_strategy = 2;
* @return The maximizeClicksBiddingStrategy.
*/
@java.lang.Override
public com.google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy getMaximizeClicksBiddingStrategy() {
if (biddingStrategyCase_ == 2) {
return (com.google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy) biddingStrategy_;
}
return com.google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy.getDefaultInstance();
}
/**
*
* Use maximize clicks bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy maximize_clicks_bidding_strategy = 2;
*/
@java.lang.Override
public com.google.ads.googleads.v17.services.MaximizeClicksBiddingStrategyOrBuilder getMaximizeClicksBiddingStrategyOrBuilder() {
if (biddingStrategyCase_ == 2) {
return (com.google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy) biddingStrategy_;
}
return com.google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy.getDefaultInstance();
}
public static final int MAXIMIZE_CONVERSIONS_BIDDING_STRATEGY_FIELD_NUMBER = 3;
/**
*
* Use maximize conversions bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy maximize_conversions_bidding_strategy = 3;
* @return Whether the maximizeConversionsBiddingStrategy field is set.
*/
@java.lang.Override
public boolean hasMaximizeConversionsBiddingStrategy() {
return biddingStrategyCase_ == 3;
}
/**
*
* Use maximize conversions bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy maximize_conversions_bidding_strategy = 3;
* @return The maximizeConversionsBiddingStrategy.
*/
@java.lang.Override
public com.google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy getMaximizeConversionsBiddingStrategy() {
if (biddingStrategyCase_ == 3) {
return (com.google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy) biddingStrategy_;
}
return com.google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy.getDefaultInstance();
}
/**
*
* Use maximize conversions bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy maximize_conversions_bidding_strategy = 3;
*/
@java.lang.Override
public com.google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategyOrBuilder getMaximizeConversionsBiddingStrategyOrBuilder() {
if (biddingStrategyCase_ == 3) {
return (com.google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy) biddingStrategy_;
}
return com.google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy.getDefaultInstance();
}
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 (biddingStrategyCase_ == 1) {
output.writeMessage(1, (com.google.ads.googleads.v17.services.ManualCpcBiddingStrategy) biddingStrategy_);
}
if (biddingStrategyCase_ == 2) {
output.writeMessage(2, (com.google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy) biddingStrategy_);
}
if (biddingStrategyCase_ == 3) {
output.writeMessage(3, (com.google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy) biddingStrategy_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (biddingStrategyCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, (com.google.ads.googleads.v17.services.ManualCpcBiddingStrategy) biddingStrategy_);
}
if (biddingStrategyCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, (com.google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy) biddingStrategy_);
}
if (biddingStrategyCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, (com.google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy) biddingStrategy_);
}
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.CampaignToForecast.CampaignBiddingStrategy)) {
return super.equals(obj);
}
com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy other = (com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy) obj;
if (!getBiddingStrategyCase().equals(other.getBiddingStrategyCase())) return false;
switch (biddingStrategyCase_) {
case 1:
if (!getManualCpcBiddingStrategy()
.equals(other.getManualCpcBiddingStrategy())) return false;
break;
case 2:
if (!getMaximizeClicksBiddingStrategy()
.equals(other.getMaximizeClicksBiddingStrategy())) return false;
break;
case 3:
if (!getMaximizeConversionsBiddingStrategy()
.equals(other.getMaximizeConversionsBiddingStrategy())) return false;
break;
case 0:
default:
}
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();
switch (biddingStrategyCase_) {
case 1:
hash = (37 * hash) + MANUAL_CPC_BIDDING_STRATEGY_FIELD_NUMBER;
hash = (53 * hash) + getManualCpcBiddingStrategy().hashCode();
break;
case 2:
hash = (37 * hash) + MAXIMIZE_CLICKS_BIDDING_STRATEGY_FIELD_NUMBER;
hash = (53 * hash) + getMaximizeClicksBiddingStrategy().hashCode();
break;
case 3:
hash = (37 * hash) + MAXIMIZE_CONVERSIONS_BIDDING_STRATEGY_FIELD_NUMBER;
hash = (53 * hash) + getMaximizeConversionsBiddingStrategy().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy 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.CampaignToForecast.CampaignBiddingStrategy parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy 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.CampaignToForecast.CampaignBiddingStrategy parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy 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.CampaignToForecast.CampaignBiddingStrategy 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.CampaignToForecast.CampaignBiddingStrategy 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.CampaignToForecast.CampaignBiddingStrategy 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.CampaignToForecast.CampaignBiddingStrategy 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.CampaignToForecast.CampaignBiddingStrategy 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.CampaignToForecast.CampaignBiddingStrategy 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.CampaignToForecast.CampaignBiddingStrategy 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;
}
/**
*
* Supported bidding strategies for new campaign forecasts.
*
*
* Protobuf type {@code google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy)
com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategyOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.ads.googleads.v17.services.KeywordPlanIdeaServiceProto.internal_static_google_ads_googleads_v17_services_CampaignToForecast_CampaignBiddingStrategy_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_CampaignToForecast_CampaignBiddingStrategy_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy.class, com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy.Builder.class);
}
// Construct using com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (manualCpcBiddingStrategyBuilder_ != null) {
manualCpcBiddingStrategyBuilder_.clear();
}
if (maximizeClicksBiddingStrategyBuilder_ != null) {
maximizeClicksBiddingStrategyBuilder_.clear();
}
if (maximizeConversionsBiddingStrategyBuilder_ != null) {
maximizeConversionsBiddingStrategyBuilder_.clear();
}
biddingStrategyCase_ = 0;
biddingStrategy_ = 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_CampaignToForecast_CampaignBiddingStrategy_descriptor;
}
@java.lang.Override
public com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy getDefaultInstanceForType() {
return com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy.getDefaultInstance();
}
@java.lang.Override
public com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy build() {
com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy buildPartial() {
com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy result = new com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy(this);
if (bitField0_ != 0) { buildPartial0(result); }
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy result) {
int from_bitField0_ = bitField0_;
}
private void buildPartialOneofs(com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy result) {
result.biddingStrategyCase_ = biddingStrategyCase_;
result.biddingStrategy_ = this.biddingStrategy_;
if (biddingStrategyCase_ == 1 &&
manualCpcBiddingStrategyBuilder_ != null) {
result.biddingStrategy_ = manualCpcBiddingStrategyBuilder_.build();
}
if (biddingStrategyCase_ == 2 &&
maximizeClicksBiddingStrategyBuilder_ != null) {
result.biddingStrategy_ = maximizeClicksBiddingStrategyBuilder_.build();
}
if (biddingStrategyCase_ == 3 &&
maximizeConversionsBiddingStrategyBuilder_ != null) {
result.biddingStrategy_ = maximizeConversionsBiddingStrategyBuilder_.build();
}
}
@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.CampaignToForecast.CampaignBiddingStrategy) {
return mergeFrom((com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy other) {
if (other == com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy.getDefaultInstance()) return this;
switch (other.getBiddingStrategyCase()) {
case MANUAL_CPC_BIDDING_STRATEGY: {
mergeManualCpcBiddingStrategy(other.getManualCpcBiddingStrategy());
break;
}
case MAXIMIZE_CLICKS_BIDDING_STRATEGY: {
mergeMaximizeClicksBiddingStrategy(other.getMaximizeClicksBiddingStrategy());
break;
}
case MAXIMIZE_CONVERSIONS_BIDDING_STRATEGY: {
mergeMaximizeConversionsBiddingStrategy(other.getMaximizeConversionsBiddingStrategy());
break;
}
case BIDDINGSTRATEGY_NOT_SET: {
break;
}
}
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: {
input.readMessage(
getManualCpcBiddingStrategyFieldBuilder().getBuilder(),
extensionRegistry);
biddingStrategyCase_ = 1;
break;
} // case 10
case 18: {
input.readMessage(
getMaximizeClicksBiddingStrategyFieldBuilder().getBuilder(),
extensionRegistry);
biddingStrategyCase_ = 2;
break;
} // case 18
case 26: {
input.readMessage(
getMaximizeConversionsBiddingStrategyFieldBuilder().getBuilder(),
extensionRegistry);
biddingStrategyCase_ = 3;
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 biddingStrategyCase_ = 0;
private java.lang.Object biddingStrategy_;
public BiddingStrategyCase
getBiddingStrategyCase() {
return BiddingStrategyCase.forNumber(
biddingStrategyCase_);
}
public Builder clearBiddingStrategy() {
biddingStrategyCase_ = 0;
biddingStrategy_ = null;
onChanged();
return this;
}
private int bitField0_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.services.ManualCpcBiddingStrategy, com.google.ads.googleads.v17.services.ManualCpcBiddingStrategy.Builder, com.google.ads.googleads.v17.services.ManualCpcBiddingStrategyOrBuilder> manualCpcBiddingStrategyBuilder_;
/**
*
* Use manual CPC bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.ManualCpcBiddingStrategy manual_cpc_bidding_strategy = 1;
* @return Whether the manualCpcBiddingStrategy field is set.
*/
@java.lang.Override
public boolean hasManualCpcBiddingStrategy() {
return biddingStrategyCase_ == 1;
}
/**
*
* Use manual CPC bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.ManualCpcBiddingStrategy manual_cpc_bidding_strategy = 1;
* @return The manualCpcBiddingStrategy.
*/
@java.lang.Override
public com.google.ads.googleads.v17.services.ManualCpcBiddingStrategy getManualCpcBiddingStrategy() {
if (manualCpcBiddingStrategyBuilder_ == null) {
if (biddingStrategyCase_ == 1) {
return (com.google.ads.googleads.v17.services.ManualCpcBiddingStrategy) biddingStrategy_;
}
return com.google.ads.googleads.v17.services.ManualCpcBiddingStrategy.getDefaultInstance();
} else {
if (biddingStrategyCase_ == 1) {
return manualCpcBiddingStrategyBuilder_.getMessage();
}
return com.google.ads.googleads.v17.services.ManualCpcBiddingStrategy.getDefaultInstance();
}
}
/**
*
* Use manual CPC bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.ManualCpcBiddingStrategy manual_cpc_bidding_strategy = 1;
*/
public Builder setManualCpcBiddingStrategy(com.google.ads.googleads.v17.services.ManualCpcBiddingStrategy value) {
if (manualCpcBiddingStrategyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
biddingStrategy_ = value;
onChanged();
} else {
manualCpcBiddingStrategyBuilder_.setMessage(value);
}
biddingStrategyCase_ = 1;
return this;
}
/**
*
* Use manual CPC bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.ManualCpcBiddingStrategy manual_cpc_bidding_strategy = 1;
*/
public Builder setManualCpcBiddingStrategy(
com.google.ads.googleads.v17.services.ManualCpcBiddingStrategy.Builder builderForValue) {
if (manualCpcBiddingStrategyBuilder_ == null) {
biddingStrategy_ = builderForValue.build();
onChanged();
} else {
manualCpcBiddingStrategyBuilder_.setMessage(builderForValue.build());
}
biddingStrategyCase_ = 1;
return this;
}
/**
*
* Use manual CPC bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.ManualCpcBiddingStrategy manual_cpc_bidding_strategy = 1;
*/
public Builder mergeManualCpcBiddingStrategy(com.google.ads.googleads.v17.services.ManualCpcBiddingStrategy value) {
if (manualCpcBiddingStrategyBuilder_ == null) {
if (biddingStrategyCase_ == 1 &&
biddingStrategy_ != com.google.ads.googleads.v17.services.ManualCpcBiddingStrategy.getDefaultInstance()) {
biddingStrategy_ = com.google.ads.googleads.v17.services.ManualCpcBiddingStrategy.newBuilder((com.google.ads.googleads.v17.services.ManualCpcBiddingStrategy) biddingStrategy_)
.mergeFrom(value).buildPartial();
} else {
biddingStrategy_ = value;
}
onChanged();
} else {
if (biddingStrategyCase_ == 1) {
manualCpcBiddingStrategyBuilder_.mergeFrom(value);
} else {
manualCpcBiddingStrategyBuilder_.setMessage(value);
}
}
biddingStrategyCase_ = 1;
return this;
}
/**
*
* Use manual CPC bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.ManualCpcBiddingStrategy manual_cpc_bidding_strategy = 1;
*/
public Builder clearManualCpcBiddingStrategy() {
if (manualCpcBiddingStrategyBuilder_ == null) {
if (biddingStrategyCase_ == 1) {
biddingStrategyCase_ = 0;
biddingStrategy_ = null;
onChanged();
}
} else {
if (biddingStrategyCase_ == 1) {
biddingStrategyCase_ = 0;
biddingStrategy_ = null;
}
manualCpcBiddingStrategyBuilder_.clear();
}
return this;
}
/**
*
* Use manual CPC bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.ManualCpcBiddingStrategy manual_cpc_bidding_strategy = 1;
*/
public com.google.ads.googleads.v17.services.ManualCpcBiddingStrategy.Builder getManualCpcBiddingStrategyBuilder() {
return getManualCpcBiddingStrategyFieldBuilder().getBuilder();
}
/**
*
* Use manual CPC bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.ManualCpcBiddingStrategy manual_cpc_bidding_strategy = 1;
*/
@java.lang.Override
public com.google.ads.googleads.v17.services.ManualCpcBiddingStrategyOrBuilder getManualCpcBiddingStrategyOrBuilder() {
if ((biddingStrategyCase_ == 1) && (manualCpcBiddingStrategyBuilder_ != null)) {
return manualCpcBiddingStrategyBuilder_.getMessageOrBuilder();
} else {
if (biddingStrategyCase_ == 1) {
return (com.google.ads.googleads.v17.services.ManualCpcBiddingStrategy) biddingStrategy_;
}
return com.google.ads.googleads.v17.services.ManualCpcBiddingStrategy.getDefaultInstance();
}
}
/**
*
* Use manual CPC bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.ManualCpcBiddingStrategy manual_cpc_bidding_strategy = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.services.ManualCpcBiddingStrategy, com.google.ads.googleads.v17.services.ManualCpcBiddingStrategy.Builder, com.google.ads.googleads.v17.services.ManualCpcBiddingStrategyOrBuilder>
getManualCpcBiddingStrategyFieldBuilder() {
if (manualCpcBiddingStrategyBuilder_ == null) {
if (!(biddingStrategyCase_ == 1)) {
biddingStrategy_ = com.google.ads.googleads.v17.services.ManualCpcBiddingStrategy.getDefaultInstance();
}
manualCpcBiddingStrategyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.services.ManualCpcBiddingStrategy, com.google.ads.googleads.v17.services.ManualCpcBiddingStrategy.Builder, com.google.ads.googleads.v17.services.ManualCpcBiddingStrategyOrBuilder>(
(com.google.ads.googleads.v17.services.ManualCpcBiddingStrategy) biddingStrategy_,
getParentForChildren(),
isClean());
biddingStrategy_ = null;
}
biddingStrategyCase_ = 1;
onChanged();
return manualCpcBiddingStrategyBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy, com.google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy.Builder, com.google.ads.googleads.v17.services.MaximizeClicksBiddingStrategyOrBuilder> maximizeClicksBiddingStrategyBuilder_;
/**
*
* Use maximize clicks bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy maximize_clicks_bidding_strategy = 2;
* @return Whether the maximizeClicksBiddingStrategy field is set.
*/
@java.lang.Override
public boolean hasMaximizeClicksBiddingStrategy() {
return biddingStrategyCase_ == 2;
}
/**
*
* Use maximize clicks bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy maximize_clicks_bidding_strategy = 2;
* @return The maximizeClicksBiddingStrategy.
*/
@java.lang.Override
public com.google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy getMaximizeClicksBiddingStrategy() {
if (maximizeClicksBiddingStrategyBuilder_ == null) {
if (biddingStrategyCase_ == 2) {
return (com.google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy) biddingStrategy_;
}
return com.google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy.getDefaultInstance();
} else {
if (biddingStrategyCase_ == 2) {
return maximizeClicksBiddingStrategyBuilder_.getMessage();
}
return com.google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy.getDefaultInstance();
}
}
/**
*
* Use maximize clicks bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy maximize_clicks_bidding_strategy = 2;
*/
public Builder setMaximizeClicksBiddingStrategy(com.google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy value) {
if (maximizeClicksBiddingStrategyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
biddingStrategy_ = value;
onChanged();
} else {
maximizeClicksBiddingStrategyBuilder_.setMessage(value);
}
biddingStrategyCase_ = 2;
return this;
}
/**
*
* Use maximize clicks bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy maximize_clicks_bidding_strategy = 2;
*/
public Builder setMaximizeClicksBiddingStrategy(
com.google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy.Builder builderForValue) {
if (maximizeClicksBiddingStrategyBuilder_ == null) {
biddingStrategy_ = builderForValue.build();
onChanged();
} else {
maximizeClicksBiddingStrategyBuilder_.setMessage(builderForValue.build());
}
biddingStrategyCase_ = 2;
return this;
}
/**
*
* Use maximize clicks bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy maximize_clicks_bidding_strategy = 2;
*/
public Builder mergeMaximizeClicksBiddingStrategy(com.google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy value) {
if (maximizeClicksBiddingStrategyBuilder_ == null) {
if (biddingStrategyCase_ == 2 &&
biddingStrategy_ != com.google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy.getDefaultInstance()) {
biddingStrategy_ = com.google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy.newBuilder((com.google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy) biddingStrategy_)
.mergeFrom(value).buildPartial();
} else {
biddingStrategy_ = value;
}
onChanged();
} else {
if (biddingStrategyCase_ == 2) {
maximizeClicksBiddingStrategyBuilder_.mergeFrom(value);
} else {
maximizeClicksBiddingStrategyBuilder_.setMessage(value);
}
}
biddingStrategyCase_ = 2;
return this;
}
/**
*
* Use maximize clicks bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy maximize_clicks_bidding_strategy = 2;
*/
public Builder clearMaximizeClicksBiddingStrategy() {
if (maximizeClicksBiddingStrategyBuilder_ == null) {
if (biddingStrategyCase_ == 2) {
biddingStrategyCase_ = 0;
biddingStrategy_ = null;
onChanged();
}
} else {
if (biddingStrategyCase_ == 2) {
biddingStrategyCase_ = 0;
biddingStrategy_ = null;
}
maximizeClicksBiddingStrategyBuilder_.clear();
}
return this;
}
/**
*
* Use maximize clicks bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy maximize_clicks_bidding_strategy = 2;
*/
public com.google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy.Builder getMaximizeClicksBiddingStrategyBuilder() {
return getMaximizeClicksBiddingStrategyFieldBuilder().getBuilder();
}
/**
*
* Use maximize clicks bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy maximize_clicks_bidding_strategy = 2;
*/
@java.lang.Override
public com.google.ads.googleads.v17.services.MaximizeClicksBiddingStrategyOrBuilder getMaximizeClicksBiddingStrategyOrBuilder() {
if ((biddingStrategyCase_ == 2) && (maximizeClicksBiddingStrategyBuilder_ != null)) {
return maximizeClicksBiddingStrategyBuilder_.getMessageOrBuilder();
} else {
if (biddingStrategyCase_ == 2) {
return (com.google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy) biddingStrategy_;
}
return com.google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy.getDefaultInstance();
}
}
/**
*
* Use maximize clicks bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy maximize_clicks_bidding_strategy = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy, com.google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy.Builder, com.google.ads.googleads.v17.services.MaximizeClicksBiddingStrategyOrBuilder>
getMaximizeClicksBiddingStrategyFieldBuilder() {
if (maximizeClicksBiddingStrategyBuilder_ == null) {
if (!(biddingStrategyCase_ == 2)) {
biddingStrategy_ = com.google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy.getDefaultInstance();
}
maximizeClicksBiddingStrategyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy, com.google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy.Builder, com.google.ads.googleads.v17.services.MaximizeClicksBiddingStrategyOrBuilder>(
(com.google.ads.googleads.v17.services.MaximizeClicksBiddingStrategy) biddingStrategy_,
getParentForChildren(),
isClean());
biddingStrategy_ = null;
}
biddingStrategyCase_ = 2;
onChanged();
return maximizeClicksBiddingStrategyBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy, com.google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy.Builder, com.google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategyOrBuilder> maximizeConversionsBiddingStrategyBuilder_;
/**
*
* Use maximize conversions bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy maximize_conversions_bidding_strategy = 3;
* @return Whether the maximizeConversionsBiddingStrategy field is set.
*/
@java.lang.Override
public boolean hasMaximizeConversionsBiddingStrategy() {
return biddingStrategyCase_ == 3;
}
/**
*
* Use maximize conversions bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy maximize_conversions_bidding_strategy = 3;
* @return The maximizeConversionsBiddingStrategy.
*/
@java.lang.Override
public com.google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy getMaximizeConversionsBiddingStrategy() {
if (maximizeConversionsBiddingStrategyBuilder_ == null) {
if (biddingStrategyCase_ == 3) {
return (com.google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy) biddingStrategy_;
}
return com.google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy.getDefaultInstance();
} else {
if (biddingStrategyCase_ == 3) {
return maximizeConversionsBiddingStrategyBuilder_.getMessage();
}
return com.google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy.getDefaultInstance();
}
}
/**
*
* Use maximize conversions bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy maximize_conversions_bidding_strategy = 3;
*/
public Builder setMaximizeConversionsBiddingStrategy(com.google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy value) {
if (maximizeConversionsBiddingStrategyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
biddingStrategy_ = value;
onChanged();
} else {
maximizeConversionsBiddingStrategyBuilder_.setMessage(value);
}
biddingStrategyCase_ = 3;
return this;
}
/**
*
* Use maximize conversions bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy maximize_conversions_bidding_strategy = 3;
*/
public Builder setMaximizeConversionsBiddingStrategy(
com.google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy.Builder builderForValue) {
if (maximizeConversionsBiddingStrategyBuilder_ == null) {
biddingStrategy_ = builderForValue.build();
onChanged();
} else {
maximizeConversionsBiddingStrategyBuilder_.setMessage(builderForValue.build());
}
biddingStrategyCase_ = 3;
return this;
}
/**
*
* Use maximize conversions bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy maximize_conversions_bidding_strategy = 3;
*/
public Builder mergeMaximizeConversionsBiddingStrategy(com.google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy value) {
if (maximizeConversionsBiddingStrategyBuilder_ == null) {
if (biddingStrategyCase_ == 3 &&
biddingStrategy_ != com.google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy.getDefaultInstance()) {
biddingStrategy_ = com.google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy.newBuilder((com.google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy) biddingStrategy_)
.mergeFrom(value).buildPartial();
} else {
biddingStrategy_ = value;
}
onChanged();
} else {
if (biddingStrategyCase_ == 3) {
maximizeConversionsBiddingStrategyBuilder_.mergeFrom(value);
} else {
maximizeConversionsBiddingStrategyBuilder_.setMessage(value);
}
}
biddingStrategyCase_ = 3;
return this;
}
/**
*
* Use maximize conversions bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy maximize_conversions_bidding_strategy = 3;
*/
public Builder clearMaximizeConversionsBiddingStrategy() {
if (maximizeConversionsBiddingStrategyBuilder_ == null) {
if (biddingStrategyCase_ == 3) {
biddingStrategyCase_ = 0;
biddingStrategy_ = null;
onChanged();
}
} else {
if (biddingStrategyCase_ == 3) {
biddingStrategyCase_ = 0;
biddingStrategy_ = null;
}
maximizeConversionsBiddingStrategyBuilder_.clear();
}
return this;
}
/**
*
* Use maximize conversions bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy maximize_conversions_bidding_strategy = 3;
*/
public com.google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy.Builder getMaximizeConversionsBiddingStrategyBuilder() {
return getMaximizeConversionsBiddingStrategyFieldBuilder().getBuilder();
}
/**
*
* Use maximize conversions bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy maximize_conversions_bidding_strategy = 3;
*/
@java.lang.Override
public com.google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategyOrBuilder getMaximizeConversionsBiddingStrategyOrBuilder() {
if ((biddingStrategyCase_ == 3) && (maximizeConversionsBiddingStrategyBuilder_ != null)) {
return maximizeConversionsBiddingStrategyBuilder_.getMessageOrBuilder();
} else {
if (biddingStrategyCase_ == 3) {
return (com.google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy) biddingStrategy_;
}
return com.google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy.getDefaultInstance();
}
}
/**
*
* Use maximize conversions bidding strategy for forecasting.
*
*
* .google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy maximize_conversions_bidding_strategy = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy, com.google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy.Builder, com.google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategyOrBuilder>
getMaximizeConversionsBiddingStrategyFieldBuilder() {
if (maximizeConversionsBiddingStrategyBuilder_ == null) {
if (!(biddingStrategyCase_ == 3)) {
biddingStrategy_ = com.google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy.getDefaultInstance();
}
maximizeConversionsBiddingStrategyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy, com.google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy.Builder, com.google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategyOrBuilder>(
(com.google.ads.googleads.v17.services.MaximizeConversionsBiddingStrategy) biddingStrategy_,
getParentForChildren(),
isClean());
biddingStrategy_ = null;
}
biddingStrategyCase_ = 3;
onChanged();
return maximizeConversionsBiddingStrategyBuilder_;
}
@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.CampaignToForecast.CampaignBiddingStrategy)
}
// @@protoc_insertion_point(class_scope:google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy)
private static final com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy();
}
public static com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CampaignBiddingStrategy 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.CampaignToForecast.CampaignBiddingStrategy getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int LANGUAGE_CONSTANTS_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList languageConstants_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* The list of resource names of languages to be targeted. The resource name
* is of the format "languageConstants/{criterion_id}". See
* https://developers.google.com/google-ads/api/data/codes-formats#languages
* for the list of language criterion codes.
*
*
* repeated string language_constants = 1;
* @return A list containing the languageConstants.
*/
public com.google.protobuf.ProtocolStringList
getLanguageConstantsList() {
return languageConstants_;
}
/**
*
* The list of resource names of languages to be targeted. The resource name
* is of the format "languageConstants/{criterion_id}". See
* https://developers.google.com/google-ads/api/data/codes-formats#languages
* for the list of language criterion codes.
*
*
* repeated string language_constants = 1;
* @return The count of languageConstants.
*/
public int getLanguageConstantsCount() {
return languageConstants_.size();
}
/**
*
* The list of resource names of languages to be targeted. The resource name
* is of the format "languageConstants/{criterion_id}". See
* https://developers.google.com/google-ads/api/data/codes-formats#languages
* for the list of language criterion codes.
*
*
* repeated string language_constants = 1;
* @param index The index of the element to return.
* @return The languageConstants at the given index.
*/
public java.lang.String getLanguageConstants(int index) {
return languageConstants_.get(index);
}
/**
*
* The list of resource names of languages to be targeted. The resource name
* is of the format "languageConstants/{criterion_id}". See
* https://developers.google.com/google-ads/api/data/codes-formats#languages
* for the list of language criterion codes.
*
*
* repeated string language_constants = 1;
* @param index The index of the value to return.
* @return The bytes of the languageConstants at the given index.
*/
public com.google.protobuf.ByteString
getLanguageConstantsBytes(int index) {
return languageConstants_.getByteString(index);
}
public static final int GEO_MODIFIERS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private java.util.List geoModifiers_;
/**
*
* Locations to be targeted. Locations must be unique.
*
*
* repeated .google.ads.googleads.v17.services.CriterionBidModifier geo_modifiers = 2;
*/
@java.lang.Override
public java.util.List getGeoModifiersList() {
return geoModifiers_;
}
/**
*
* Locations to be targeted. Locations must be unique.
*
*
* repeated .google.ads.googleads.v17.services.CriterionBidModifier geo_modifiers = 2;
*/
@java.lang.Override
public java.util.List extends com.google.ads.googleads.v17.services.CriterionBidModifierOrBuilder>
getGeoModifiersOrBuilderList() {
return geoModifiers_;
}
/**
*
* Locations to be targeted. Locations must be unique.
*
*
* repeated .google.ads.googleads.v17.services.CriterionBidModifier geo_modifiers = 2;
*/
@java.lang.Override
public int getGeoModifiersCount() {
return geoModifiers_.size();
}
/**
*
* Locations to be targeted. Locations must be unique.
*
*
* repeated .google.ads.googleads.v17.services.CriterionBidModifier geo_modifiers = 2;
*/
@java.lang.Override
public com.google.ads.googleads.v17.services.CriterionBidModifier getGeoModifiers(int index) {
return geoModifiers_.get(index);
}
/**
*
* Locations to be targeted. Locations must be unique.
*
*
* repeated .google.ads.googleads.v17.services.CriterionBidModifier geo_modifiers = 2;
*/
@java.lang.Override
public com.google.ads.googleads.v17.services.CriterionBidModifierOrBuilder getGeoModifiersOrBuilder(
int index) {
return geoModifiers_.get(index);
}
public static final int KEYWORD_PLAN_NETWORK_FIELD_NUMBER = 3;
private int keywordPlanNetwork_ = 0;
/**
*
* Required. The network used for targeting.
*
*
* .google.ads.googleads.v17.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork keyword_plan_network = 3 [(.google.api.field_behavior) = REQUIRED];
* @return The enum numeric value on the wire for keywordPlanNetwork.
*/
@java.lang.Override public int getKeywordPlanNetworkValue() {
return keywordPlanNetwork_;
}
/**
*
* Required. The network used for targeting.
*
*
* .google.ads.googleads.v17.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork keyword_plan_network = 3 [(.google.api.field_behavior) = REQUIRED];
* @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 NEGATIVE_KEYWORDS_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private java.util.List negativeKeywords_;
/**
*
* The list of negative keywords to be used in the campaign when doing the
* forecast.
*
*
* repeated .google.ads.googleads.v17.common.KeywordInfo negative_keywords = 4;
*/
@java.lang.Override
public java.util.List getNegativeKeywordsList() {
return negativeKeywords_;
}
/**
*
* The list of negative keywords to be used in the campaign when doing the
* forecast.
*
*
* repeated .google.ads.googleads.v17.common.KeywordInfo negative_keywords = 4;
*/
@java.lang.Override
public java.util.List extends com.google.ads.googleads.v17.common.KeywordInfoOrBuilder>
getNegativeKeywordsOrBuilderList() {
return negativeKeywords_;
}
/**
*
* The list of negative keywords to be used in the campaign when doing the
* forecast.
*
*
* repeated .google.ads.googleads.v17.common.KeywordInfo negative_keywords = 4;
*/
@java.lang.Override
public int getNegativeKeywordsCount() {
return negativeKeywords_.size();
}
/**
*
* The list of negative keywords to be used in the campaign when doing the
* forecast.
*
*
* repeated .google.ads.googleads.v17.common.KeywordInfo negative_keywords = 4;
*/
@java.lang.Override
public com.google.ads.googleads.v17.common.KeywordInfo getNegativeKeywords(int index) {
return negativeKeywords_.get(index);
}
/**
*
* The list of negative keywords to be used in the campaign when doing the
* forecast.
*
*
* repeated .google.ads.googleads.v17.common.KeywordInfo negative_keywords = 4;
*/
@java.lang.Override
public com.google.ads.googleads.v17.common.KeywordInfoOrBuilder getNegativeKeywordsOrBuilder(
int index) {
return negativeKeywords_.get(index);
}
public static final int BIDDING_STRATEGY_FIELD_NUMBER = 5;
private com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy biddingStrategy_;
/**
*
* Required. The bidding strategy for the campaign.
*
*
* .google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy bidding_strategy = 5 [(.google.api.field_behavior) = REQUIRED];
* @return Whether the biddingStrategy field is set.
*/
@java.lang.Override
public boolean hasBiddingStrategy() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Required. The bidding strategy for the campaign.
*
*
* .google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy bidding_strategy = 5 [(.google.api.field_behavior) = REQUIRED];
* @return The biddingStrategy.
*/
@java.lang.Override
public com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy getBiddingStrategy() {
return biddingStrategy_ == null ? com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy.getDefaultInstance() : biddingStrategy_;
}
/**
*
* Required. The bidding strategy for the campaign.
*
*
* .google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy bidding_strategy = 5 [(.google.api.field_behavior) = REQUIRED];
*/
@java.lang.Override
public com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategyOrBuilder getBiddingStrategyOrBuilder() {
return biddingStrategy_ == null ? com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy.getDefaultInstance() : biddingStrategy_;
}
public static final int CONVERSION_RATE_FIELD_NUMBER = 6;
private double conversionRate_ = 0D;
/**
*
* The expected conversion rate (number of conversions divided by number of
* total clicks) as defined by the user. This value is expressed as a decimal
* value, so an expected conversion rate of 2% should be entered as 0.02. If
* left empty, an estimated conversion rate will be used.
*
*
* optional double conversion_rate = 6;
* @return Whether the conversionRate field is set.
*/
@java.lang.Override
public boolean hasConversionRate() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* The expected conversion rate (number of conversions divided by number of
* total clicks) as defined by the user. This value is expressed as a decimal
* value, so an expected conversion rate of 2% should be entered as 0.02. If
* left empty, an estimated conversion rate will be used.
*
*
* optional double conversion_rate = 6;
* @return The conversionRate.
*/
@java.lang.Override
public double getConversionRate() {
return conversionRate_;
}
public static final int AD_GROUPS_FIELD_NUMBER = 7;
@SuppressWarnings("serial")
private java.util.List adGroups_;
/**
*
* The ad groups in the new campaign to forecast.
*
*
* repeated .google.ads.googleads.v17.services.ForecastAdGroup ad_groups = 7;
*/
@java.lang.Override
public java.util.List getAdGroupsList() {
return adGroups_;
}
/**
*
* The ad groups in the new campaign to forecast.
*
*
* repeated .google.ads.googleads.v17.services.ForecastAdGroup ad_groups = 7;
*/
@java.lang.Override
public java.util.List extends com.google.ads.googleads.v17.services.ForecastAdGroupOrBuilder>
getAdGroupsOrBuilderList() {
return adGroups_;
}
/**
*
* The ad groups in the new campaign to forecast.
*
*
* repeated .google.ads.googleads.v17.services.ForecastAdGroup ad_groups = 7;
*/
@java.lang.Override
public int getAdGroupsCount() {
return adGroups_.size();
}
/**
*
* The ad groups in the new campaign to forecast.
*
*
* repeated .google.ads.googleads.v17.services.ForecastAdGroup ad_groups = 7;
*/
@java.lang.Override
public com.google.ads.googleads.v17.services.ForecastAdGroup getAdGroups(int index) {
return adGroups_.get(index);
}
/**
*
* The ad groups in the new campaign to forecast.
*
*
* repeated .google.ads.googleads.v17.services.ForecastAdGroup ad_groups = 7;
*/
@java.lang.Override
public com.google.ads.googleads.v17.services.ForecastAdGroupOrBuilder getAdGroupsOrBuilder(
int index) {
return adGroups_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < languageConstants_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, languageConstants_.getRaw(i));
}
for (int i = 0; i < geoModifiers_.size(); i++) {
output.writeMessage(2, geoModifiers_.get(i));
}
if (keywordPlanNetwork_ != com.google.ads.googleads.v17.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork.UNSPECIFIED.getNumber()) {
output.writeEnum(3, keywordPlanNetwork_);
}
for (int i = 0; i < negativeKeywords_.size(); i++) {
output.writeMessage(4, negativeKeywords_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(5, getBiddingStrategy());
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeDouble(6, conversionRate_);
}
for (int i = 0; i < adGroups_.size(); i++) {
output.writeMessage(7, adGroups_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
for (int i = 0; i < languageConstants_.size(); i++) {
dataSize += computeStringSizeNoTag(languageConstants_.getRaw(i));
}
size += dataSize;
size += 1 * getLanguageConstantsList().size();
}
for (int i = 0; i < geoModifiers_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, geoModifiers_.get(i));
}
if (keywordPlanNetwork_ != com.google.ads.googleads.v17.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork.UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(3, keywordPlanNetwork_);
}
for (int i = 0; i < negativeKeywords_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, negativeKeywords_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getBiddingStrategy());
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(6, conversionRate_);
}
for (int i = 0; i < adGroups_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, adGroups_.get(i));
}
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.CampaignToForecast)) {
return super.equals(obj);
}
com.google.ads.googleads.v17.services.CampaignToForecast other = (com.google.ads.googleads.v17.services.CampaignToForecast) obj;
if (!getLanguageConstantsList()
.equals(other.getLanguageConstantsList())) return false;
if (!getGeoModifiersList()
.equals(other.getGeoModifiersList())) return false;
if (keywordPlanNetwork_ != other.keywordPlanNetwork_) return false;
if (!getNegativeKeywordsList()
.equals(other.getNegativeKeywordsList())) return false;
if (hasBiddingStrategy() != other.hasBiddingStrategy()) return false;
if (hasBiddingStrategy()) {
if (!getBiddingStrategy()
.equals(other.getBiddingStrategy())) return false;
}
if (hasConversionRate() != other.hasConversionRate()) return false;
if (hasConversionRate()) {
if (java.lang.Double.doubleToLongBits(getConversionRate())
!= java.lang.Double.doubleToLongBits(
other.getConversionRate())) return false;
}
if (!getAdGroupsList()
.equals(other.getAdGroupsList())) 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 (getLanguageConstantsCount() > 0) {
hash = (37 * hash) + LANGUAGE_CONSTANTS_FIELD_NUMBER;
hash = (53 * hash) + getLanguageConstantsList().hashCode();
}
if (getGeoModifiersCount() > 0) {
hash = (37 * hash) + GEO_MODIFIERS_FIELD_NUMBER;
hash = (53 * hash) + getGeoModifiersList().hashCode();
}
hash = (37 * hash) + KEYWORD_PLAN_NETWORK_FIELD_NUMBER;
hash = (53 * hash) + keywordPlanNetwork_;
if (getNegativeKeywordsCount() > 0) {
hash = (37 * hash) + NEGATIVE_KEYWORDS_FIELD_NUMBER;
hash = (53 * hash) + getNegativeKeywordsList().hashCode();
}
if (hasBiddingStrategy()) {
hash = (37 * hash) + BIDDING_STRATEGY_FIELD_NUMBER;
hash = (53 * hash) + getBiddingStrategy().hashCode();
}
if (hasConversionRate()) {
hash = (37 * hash) + CONVERSION_RATE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getConversionRate()));
}
if (getAdGroupsCount() > 0) {
hash = (37 * hash) + AD_GROUPS_FIELD_NUMBER;
hash = (53 * hash) + getAdGroupsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.ads.googleads.v17.services.CampaignToForecast parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.services.CampaignToForecast 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.CampaignToForecast parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.services.CampaignToForecast 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.CampaignToForecast parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.services.CampaignToForecast 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.CampaignToForecast 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.CampaignToForecast 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.CampaignToForecast 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.CampaignToForecast 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.CampaignToForecast 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.CampaignToForecast 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.CampaignToForecast prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* A campaign to do a keyword campaign forecast.
*
*
* Protobuf type {@code google.ads.googleads.v17.services.CampaignToForecast}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.ads.googleads.v17.services.CampaignToForecast)
com.google.ads.googleads.v17.services.CampaignToForecastOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.ads.googleads.v17.services.KeywordPlanIdeaServiceProto.internal_static_google_ads_googleads_v17_services_CampaignToForecast_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_CampaignToForecast_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ads.googleads.v17.services.CampaignToForecast.class, com.google.ads.googleads.v17.services.CampaignToForecast.Builder.class);
}
// Construct using com.google.ads.googleads.v17.services.CampaignToForecast.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getGeoModifiersFieldBuilder();
getNegativeKeywordsFieldBuilder();
getBiddingStrategyFieldBuilder();
getAdGroupsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
languageConstants_ =
com.google.protobuf.LazyStringArrayList.emptyList();
if (geoModifiersBuilder_ == null) {
geoModifiers_ = java.util.Collections.emptyList();
} else {
geoModifiers_ = null;
geoModifiersBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
keywordPlanNetwork_ = 0;
if (negativeKeywordsBuilder_ == null) {
negativeKeywords_ = java.util.Collections.emptyList();
} else {
negativeKeywords_ = null;
negativeKeywordsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
biddingStrategy_ = null;
if (biddingStrategyBuilder_ != null) {
biddingStrategyBuilder_.dispose();
biddingStrategyBuilder_ = null;
}
conversionRate_ = 0D;
if (adGroupsBuilder_ == null) {
adGroups_ = java.util.Collections.emptyList();
} else {
adGroups_ = null;
adGroupsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000040);
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_CampaignToForecast_descriptor;
}
@java.lang.Override
public com.google.ads.googleads.v17.services.CampaignToForecast getDefaultInstanceForType() {
return com.google.ads.googleads.v17.services.CampaignToForecast.getDefaultInstance();
}
@java.lang.Override
public com.google.ads.googleads.v17.services.CampaignToForecast build() {
com.google.ads.googleads.v17.services.CampaignToForecast result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.ads.googleads.v17.services.CampaignToForecast buildPartial() {
com.google.ads.googleads.v17.services.CampaignToForecast result = new com.google.ads.googleads.v17.services.CampaignToForecast(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.google.ads.googleads.v17.services.CampaignToForecast result) {
if (geoModifiersBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
geoModifiers_ = java.util.Collections.unmodifiableList(geoModifiers_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.geoModifiers_ = geoModifiers_;
} else {
result.geoModifiers_ = geoModifiersBuilder_.build();
}
if (negativeKeywordsBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0)) {
negativeKeywords_ = java.util.Collections.unmodifiableList(negativeKeywords_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.negativeKeywords_ = negativeKeywords_;
} else {
result.negativeKeywords_ = negativeKeywordsBuilder_.build();
}
if (adGroupsBuilder_ == null) {
if (((bitField0_ & 0x00000040) != 0)) {
adGroups_ = java.util.Collections.unmodifiableList(adGroups_);
bitField0_ = (bitField0_ & ~0x00000040);
}
result.adGroups_ = adGroups_;
} else {
result.adGroups_ = adGroupsBuilder_.build();
}
}
private void buildPartial0(com.google.ads.googleads.v17.services.CampaignToForecast result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
languageConstants_.makeImmutable();
result.languageConstants_ = languageConstants_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.keywordPlanNetwork_ = keywordPlanNetwork_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000010) != 0)) {
result.biddingStrategy_ = biddingStrategyBuilder_ == null
? biddingStrategy_
: biddingStrategyBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.conversionRate_ = conversionRate_;
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.CampaignToForecast) {
return mergeFrom((com.google.ads.googleads.v17.services.CampaignToForecast)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.ads.googleads.v17.services.CampaignToForecast other) {
if (other == com.google.ads.googleads.v17.services.CampaignToForecast.getDefaultInstance()) return this;
if (!other.languageConstants_.isEmpty()) {
if (languageConstants_.isEmpty()) {
languageConstants_ = other.languageConstants_;
bitField0_ |= 0x00000001;
} else {
ensureLanguageConstantsIsMutable();
languageConstants_.addAll(other.languageConstants_);
}
onChanged();
}
if (geoModifiersBuilder_ == null) {
if (!other.geoModifiers_.isEmpty()) {
if (geoModifiers_.isEmpty()) {
geoModifiers_ = other.geoModifiers_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureGeoModifiersIsMutable();
geoModifiers_.addAll(other.geoModifiers_);
}
onChanged();
}
} else {
if (!other.geoModifiers_.isEmpty()) {
if (geoModifiersBuilder_.isEmpty()) {
geoModifiersBuilder_.dispose();
geoModifiersBuilder_ = null;
geoModifiers_ = other.geoModifiers_;
bitField0_ = (bitField0_ & ~0x00000002);
geoModifiersBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getGeoModifiersFieldBuilder() : null;
} else {
geoModifiersBuilder_.addAllMessages(other.geoModifiers_);
}
}
}
if (other.keywordPlanNetwork_ != 0) {
setKeywordPlanNetworkValue(other.getKeywordPlanNetworkValue());
}
if (negativeKeywordsBuilder_ == null) {
if (!other.negativeKeywords_.isEmpty()) {
if (negativeKeywords_.isEmpty()) {
negativeKeywords_ = other.negativeKeywords_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureNegativeKeywordsIsMutable();
negativeKeywords_.addAll(other.negativeKeywords_);
}
onChanged();
}
} else {
if (!other.negativeKeywords_.isEmpty()) {
if (negativeKeywordsBuilder_.isEmpty()) {
negativeKeywordsBuilder_.dispose();
negativeKeywordsBuilder_ = null;
negativeKeywords_ = other.negativeKeywords_;
bitField0_ = (bitField0_ & ~0x00000008);
negativeKeywordsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getNegativeKeywordsFieldBuilder() : null;
} else {
negativeKeywordsBuilder_.addAllMessages(other.negativeKeywords_);
}
}
}
if (other.hasBiddingStrategy()) {
mergeBiddingStrategy(other.getBiddingStrategy());
}
if (other.hasConversionRate()) {
setConversionRate(other.getConversionRate());
}
if (adGroupsBuilder_ == null) {
if (!other.adGroups_.isEmpty()) {
if (adGroups_.isEmpty()) {
adGroups_ = other.adGroups_;
bitField0_ = (bitField0_ & ~0x00000040);
} else {
ensureAdGroupsIsMutable();
adGroups_.addAll(other.adGroups_);
}
onChanged();
}
} else {
if (!other.adGroups_.isEmpty()) {
if (adGroupsBuilder_.isEmpty()) {
adGroupsBuilder_.dispose();
adGroupsBuilder_ = null;
adGroups_ = other.adGroups_;
bitField0_ = (bitField0_ & ~0x00000040);
adGroupsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getAdGroupsFieldBuilder() : null;
} else {
adGroupsBuilder_.addAllMessages(other.adGroups_);
}
}
}
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: {
java.lang.String s = input.readStringRequireUtf8();
ensureLanguageConstantsIsMutable();
languageConstants_.add(s);
break;
} // case 10
case 18: {
com.google.ads.googleads.v17.services.CriterionBidModifier m =
input.readMessage(
com.google.ads.googleads.v17.services.CriterionBidModifier.parser(),
extensionRegistry);
if (geoModifiersBuilder_ == null) {
ensureGeoModifiersIsMutable();
geoModifiers_.add(m);
} else {
geoModifiersBuilder_.addMessage(m);
}
break;
} // case 18
case 24: {
keywordPlanNetwork_ = input.readEnum();
bitField0_ |= 0x00000004;
break;
} // case 24
case 34: {
com.google.ads.googleads.v17.common.KeywordInfo m =
input.readMessage(
com.google.ads.googleads.v17.common.KeywordInfo.parser(),
extensionRegistry);
if (negativeKeywordsBuilder_ == null) {
ensureNegativeKeywordsIsMutable();
negativeKeywords_.add(m);
} else {
negativeKeywordsBuilder_.addMessage(m);
}
break;
} // case 34
case 42: {
input.readMessage(
getBiddingStrategyFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000010;
break;
} // case 42
case 49: {
conversionRate_ = input.readDouble();
bitField0_ |= 0x00000020;
break;
} // case 49
case 58: {
com.google.ads.googleads.v17.services.ForecastAdGroup m =
input.readMessage(
com.google.ads.googleads.v17.services.ForecastAdGroup.parser(),
extensionRegistry);
if (adGroupsBuilder_ == null) {
ensureAdGroupsIsMutable();
adGroups_.add(m);
} else {
adGroupsBuilder_.addMessage(m);
}
break;
} // case 58
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 com.google.protobuf.LazyStringArrayList languageConstants_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureLanguageConstantsIsMutable() {
if (!languageConstants_.isModifiable()) {
languageConstants_ = new com.google.protobuf.LazyStringArrayList(languageConstants_);
}
bitField0_ |= 0x00000001;
}
/**
*
* The list of resource names of languages to be targeted. The resource name
* is of the format "languageConstants/{criterion_id}". See
* https://developers.google.com/google-ads/api/data/codes-formats#languages
* for the list of language criterion codes.
*
*
* repeated string language_constants = 1;
* @return A list containing the languageConstants.
*/
public com.google.protobuf.ProtocolStringList
getLanguageConstantsList() {
languageConstants_.makeImmutable();
return languageConstants_;
}
/**
*
* The list of resource names of languages to be targeted. The resource name
* is of the format "languageConstants/{criterion_id}". See
* https://developers.google.com/google-ads/api/data/codes-formats#languages
* for the list of language criterion codes.
*
*
* repeated string language_constants = 1;
* @return The count of languageConstants.
*/
public int getLanguageConstantsCount() {
return languageConstants_.size();
}
/**
*
* The list of resource names of languages to be targeted. The resource name
* is of the format "languageConstants/{criterion_id}". See
* https://developers.google.com/google-ads/api/data/codes-formats#languages
* for the list of language criterion codes.
*
*
* repeated string language_constants = 1;
* @param index The index of the element to return.
* @return The languageConstants at the given index.
*/
public java.lang.String getLanguageConstants(int index) {
return languageConstants_.get(index);
}
/**
*
* The list of resource names of languages to be targeted. The resource name
* is of the format "languageConstants/{criterion_id}". See
* https://developers.google.com/google-ads/api/data/codes-formats#languages
* for the list of language criterion codes.
*
*
* repeated string language_constants = 1;
* @param index The index of the value to return.
* @return The bytes of the languageConstants at the given index.
*/
public com.google.protobuf.ByteString
getLanguageConstantsBytes(int index) {
return languageConstants_.getByteString(index);
}
/**
*
* The list of resource names of languages to be targeted. The resource name
* is of the format "languageConstants/{criterion_id}". See
* https://developers.google.com/google-ads/api/data/codes-formats#languages
* for the list of language criterion codes.
*
*
* repeated string language_constants = 1;
* @param index The index to set the value at.
* @param value The languageConstants to set.
* @return This builder for chaining.
*/
public Builder setLanguageConstants(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureLanguageConstantsIsMutable();
languageConstants_.set(index, value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* The list of resource names of languages to be targeted. The resource name
* is of the format "languageConstants/{criterion_id}". See
* https://developers.google.com/google-ads/api/data/codes-formats#languages
* for the list of language criterion codes.
*
*
* repeated string language_constants = 1;
* @param value The languageConstants to add.
* @return This builder for chaining.
*/
public Builder addLanguageConstants(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureLanguageConstantsIsMutable();
languageConstants_.add(value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* The list of resource names of languages to be targeted. The resource name
* is of the format "languageConstants/{criterion_id}". See
* https://developers.google.com/google-ads/api/data/codes-formats#languages
* for the list of language criterion codes.
*
*
* repeated string language_constants = 1;
* @param values The languageConstants to add.
* @return This builder for chaining.
*/
public Builder addAllLanguageConstants(
java.lang.Iterable values) {
ensureLanguageConstantsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, languageConstants_);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* The list of resource names of languages to be targeted. The resource name
* is of the format "languageConstants/{criterion_id}". See
* https://developers.google.com/google-ads/api/data/codes-formats#languages
* for the list of language criterion codes.
*
*
* repeated string language_constants = 1;
* @return This builder for chaining.
*/
public Builder clearLanguageConstants() {
languageConstants_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);;
onChanged();
return this;
}
/**
*
* The list of resource names of languages to be targeted. The resource name
* is of the format "languageConstants/{criterion_id}". See
* https://developers.google.com/google-ads/api/data/codes-formats#languages
* for the list of language criterion codes.
*
*
* repeated string language_constants = 1;
* @param value The bytes of the languageConstants to add.
* @return This builder for chaining.
*/
public Builder addLanguageConstantsBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
ensureLanguageConstantsIsMutable();
languageConstants_.add(value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.util.List geoModifiers_ =
java.util.Collections.emptyList();
private void ensureGeoModifiersIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
geoModifiers_ = new java.util.ArrayList(geoModifiers_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.ads.googleads.v17.services.CriterionBidModifier, com.google.ads.googleads.v17.services.CriterionBidModifier.Builder, com.google.ads.googleads.v17.services.CriterionBidModifierOrBuilder> geoModifiersBuilder_;
/**
*
* Locations to be targeted. Locations must be unique.
*
*
* repeated .google.ads.googleads.v17.services.CriterionBidModifier geo_modifiers = 2;
*/
public java.util.List getGeoModifiersList() {
if (geoModifiersBuilder_ == null) {
return java.util.Collections.unmodifiableList(geoModifiers_);
} else {
return geoModifiersBuilder_.getMessageList();
}
}
/**
*
* Locations to be targeted. Locations must be unique.
*
*
* repeated .google.ads.googleads.v17.services.CriterionBidModifier geo_modifiers = 2;
*/
public int getGeoModifiersCount() {
if (geoModifiersBuilder_ == null) {
return geoModifiers_.size();
} else {
return geoModifiersBuilder_.getCount();
}
}
/**
*
* Locations to be targeted. Locations must be unique.
*
*
* repeated .google.ads.googleads.v17.services.CriterionBidModifier geo_modifiers = 2;
*/
public com.google.ads.googleads.v17.services.CriterionBidModifier getGeoModifiers(int index) {
if (geoModifiersBuilder_ == null) {
return geoModifiers_.get(index);
} else {
return geoModifiersBuilder_.getMessage(index);
}
}
/**
*
* Locations to be targeted. Locations must be unique.
*
*
* repeated .google.ads.googleads.v17.services.CriterionBidModifier geo_modifiers = 2;
*/
public Builder setGeoModifiers(
int index, com.google.ads.googleads.v17.services.CriterionBidModifier value) {
if (geoModifiersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureGeoModifiersIsMutable();
geoModifiers_.set(index, value);
onChanged();
} else {
geoModifiersBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Locations to be targeted. Locations must be unique.
*
*
* repeated .google.ads.googleads.v17.services.CriterionBidModifier geo_modifiers = 2;
*/
public Builder setGeoModifiers(
int index, com.google.ads.googleads.v17.services.CriterionBidModifier.Builder builderForValue) {
if (geoModifiersBuilder_ == null) {
ensureGeoModifiersIsMutable();
geoModifiers_.set(index, builderForValue.build());
onChanged();
} else {
geoModifiersBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Locations to be targeted. Locations must be unique.
*
*
* repeated .google.ads.googleads.v17.services.CriterionBidModifier geo_modifiers = 2;
*/
public Builder addGeoModifiers(com.google.ads.googleads.v17.services.CriterionBidModifier value) {
if (geoModifiersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureGeoModifiersIsMutable();
geoModifiers_.add(value);
onChanged();
} else {
geoModifiersBuilder_.addMessage(value);
}
return this;
}
/**
*
* Locations to be targeted. Locations must be unique.
*
*
* repeated .google.ads.googleads.v17.services.CriterionBidModifier geo_modifiers = 2;
*/
public Builder addGeoModifiers(
int index, com.google.ads.googleads.v17.services.CriterionBidModifier value) {
if (geoModifiersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureGeoModifiersIsMutable();
geoModifiers_.add(index, value);
onChanged();
} else {
geoModifiersBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Locations to be targeted. Locations must be unique.
*
*
* repeated .google.ads.googleads.v17.services.CriterionBidModifier geo_modifiers = 2;
*/
public Builder addGeoModifiers(
com.google.ads.googleads.v17.services.CriterionBidModifier.Builder builderForValue) {
if (geoModifiersBuilder_ == null) {
ensureGeoModifiersIsMutable();
geoModifiers_.add(builderForValue.build());
onChanged();
} else {
geoModifiersBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Locations to be targeted. Locations must be unique.
*
*
* repeated .google.ads.googleads.v17.services.CriterionBidModifier geo_modifiers = 2;
*/
public Builder addGeoModifiers(
int index, com.google.ads.googleads.v17.services.CriterionBidModifier.Builder builderForValue) {
if (geoModifiersBuilder_ == null) {
ensureGeoModifiersIsMutable();
geoModifiers_.add(index, builderForValue.build());
onChanged();
} else {
geoModifiersBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Locations to be targeted. Locations must be unique.
*
*
* repeated .google.ads.googleads.v17.services.CriterionBidModifier geo_modifiers = 2;
*/
public Builder addAllGeoModifiers(
java.lang.Iterable extends com.google.ads.googleads.v17.services.CriterionBidModifier> values) {
if (geoModifiersBuilder_ == null) {
ensureGeoModifiersIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, geoModifiers_);
onChanged();
} else {
geoModifiersBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Locations to be targeted. Locations must be unique.
*
*
* repeated .google.ads.googleads.v17.services.CriterionBidModifier geo_modifiers = 2;
*/
public Builder clearGeoModifiers() {
if (geoModifiersBuilder_ == null) {
geoModifiers_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
geoModifiersBuilder_.clear();
}
return this;
}
/**
*
* Locations to be targeted. Locations must be unique.
*
*
* repeated .google.ads.googleads.v17.services.CriterionBidModifier geo_modifiers = 2;
*/
public Builder removeGeoModifiers(int index) {
if (geoModifiersBuilder_ == null) {
ensureGeoModifiersIsMutable();
geoModifiers_.remove(index);
onChanged();
} else {
geoModifiersBuilder_.remove(index);
}
return this;
}
/**
*
* Locations to be targeted. Locations must be unique.
*
*
* repeated .google.ads.googleads.v17.services.CriterionBidModifier geo_modifiers = 2;
*/
public com.google.ads.googleads.v17.services.CriterionBidModifier.Builder getGeoModifiersBuilder(
int index) {
return getGeoModifiersFieldBuilder().getBuilder(index);
}
/**
*
* Locations to be targeted. Locations must be unique.
*
*
* repeated .google.ads.googleads.v17.services.CriterionBidModifier geo_modifiers = 2;
*/
public com.google.ads.googleads.v17.services.CriterionBidModifierOrBuilder getGeoModifiersOrBuilder(
int index) {
if (geoModifiersBuilder_ == null) {
return geoModifiers_.get(index); } else {
return geoModifiersBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Locations to be targeted. Locations must be unique.
*
*
* repeated .google.ads.googleads.v17.services.CriterionBidModifier geo_modifiers = 2;
*/
public java.util.List extends com.google.ads.googleads.v17.services.CriterionBidModifierOrBuilder>
getGeoModifiersOrBuilderList() {
if (geoModifiersBuilder_ != null) {
return geoModifiersBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(geoModifiers_);
}
}
/**
*
* Locations to be targeted. Locations must be unique.
*
*
* repeated .google.ads.googleads.v17.services.CriterionBidModifier geo_modifiers = 2;
*/
public com.google.ads.googleads.v17.services.CriterionBidModifier.Builder addGeoModifiersBuilder() {
return getGeoModifiersFieldBuilder().addBuilder(
com.google.ads.googleads.v17.services.CriterionBidModifier.getDefaultInstance());
}
/**
*
* Locations to be targeted. Locations must be unique.
*
*
* repeated .google.ads.googleads.v17.services.CriterionBidModifier geo_modifiers = 2;
*/
public com.google.ads.googleads.v17.services.CriterionBidModifier.Builder addGeoModifiersBuilder(
int index) {
return getGeoModifiersFieldBuilder().addBuilder(
index, com.google.ads.googleads.v17.services.CriterionBidModifier.getDefaultInstance());
}
/**
*
* Locations to be targeted. Locations must be unique.
*
*
* repeated .google.ads.googleads.v17.services.CriterionBidModifier geo_modifiers = 2;
*/
public java.util.List
getGeoModifiersBuilderList() {
return getGeoModifiersFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.ads.googleads.v17.services.CriterionBidModifier, com.google.ads.googleads.v17.services.CriterionBidModifier.Builder, com.google.ads.googleads.v17.services.CriterionBidModifierOrBuilder>
getGeoModifiersFieldBuilder() {
if (geoModifiersBuilder_ == null) {
geoModifiersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.ads.googleads.v17.services.CriterionBidModifier, com.google.ads.googleads.v17.services.CriterionBidModifier.Builder, com.google.ads.googleads.v17.services.CriterionBidModifierOrBuilder>(
geoModifiers_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
geoModifiers_ = null;
}
return geoModifiersBuilder_;
}
private int keywordPlanNetwork_ = 0;
/**
*
* Required. The network used for targeting.
*
*
* .google.ads.googleads.v17.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork keyword_plan_network = 3 [(.google.api.field_behavior) = REQUIRED];
* @return The enum numeric value on the wire for keywordPlanNetwork.
*/
@java.lang.Override public int getKeywordPlanNetworkValue() {
return keywordPlanNetwork_;
}
/**
*
* Required. The network used for targeting.
*
*
* .google.ads.googleads.v17.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork keyword_plan_network = 3 [(.google.api.field_behavior) = REQUIRED];
* @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_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Required. The network used for targeting.
*
*
* .google.ads.googleads.v17.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork keyword_plan_network = 3 [(.google.api.field_behavior) = REQUIRED];
* @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;
}
/**
*
* Required. The network used for targeting.
*
*
* .google.ads.googleads.v17.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork keyword_plan_network = 3 [(.google.api.field_behavior) = REQUIRED];
* @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_ |= 0x00000004;
keywordPlanNetwork_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Required. The network used for targeting.
*
*
* .google.ads.googleads.v17.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork keyword_plan_network = 3 [(.google.api.field_behavior) = REQUIRED];
* @return This builder for chaining.
*/
public Builder clearKeywordPlanNetwork() {
bitField0_ = (bitField0_ & ~0x00000004);
keywordPlanNetwork_ = 0;
onChanged();
return this;
}
private java.util.List negativeKeywords_ =
java.util.Collections.emptyList();
private void ensureNegativeKeywordsIsMutable() {
if (!((bitField0_ & 0x00000008) != 0)) {
negativeKeywords_ = new java.util.ArrayList(negativeKeywords_);
bitField0_ |= 0x00000008;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.ads.googleads.v17.common.KeywordInfo, com.google.ads.googleads.v17.common.KeywordInfo.Builder, com.google.ads.googleads.v17.common.KeywordInfoOrBuilder> negativeKeywordsBuilder_;
/**
*
* The list of negative keywords to be used in the campaign when doing the
* forecast.
*
*
* repeated .google.ads.googleads.v17.common.KeywordInfo negative_keywords = 4;
*/
public java.util.List getNegativeKeywordsList() {
if (negativeKeywordsBuilder_ == null) {
return java.util.Collections.unmodifiableList(negativeKeywords_);
} else {
return negativeKeywordsBuilder_.getMessageList();
}
}
/**
*
* The list of negative keywords to be used in the campaign when doing the
* forecast.
*
*
* repeated .google.ads.googleads.v17.common.KeywordInfo negative_keywords = 4;
*/
public int getNegativeKeywordsCount() {
if (negativeKeywordsBuilder_ == null) {
return negativeKeywords_.size();
} else {
return negativeKeywordsBuilder_.getCount();
}
}
/**
*
* The list of negative keywords to be used in the campaign when doing the
* forecast.
*
*
* repeated .google.ads.googleads.v17.common.KeywordInfo negative_keywords = 4;
*/
public com.google.ads.googleads.v17.common.KeywordInfo getNegativeKeywords(int index) {
if (negativeKeywordsBuilder_ == null) {
return negativeKeywords_.get(index);
} else {
return negativeKeywordsBuilder_.getMessage(index);
}
}
/**
*
* The list of negative keywords to be used in the campaign when doing the
* forecast.
*
*
* repeated .google.ads.googleads.v17.common.KeywordInfo negative_keywords = 4;
*/
public Builder setNegativeKeywords(
int index, com.google.ads.googleads.v17.common.KeywordInfo value) {
if (negativeKeywordsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureNegativeKeywordsIsMutable();
negativeKeywords_.set(index, value);
onChanged();
} else {
negativeKeywordsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* The list of negative keywords to be used in the campaign when doing the
* forecast.
*
*
* repeated .google.ads.googleads.v17.common.KeywordInfo negative_keywords = 4;
*/
public Builder setNegativeKeywords(
int index, com.google.ads.googleads.v17.common.KeywordInfo.Builder builderForValue) {
if (negativeKeywordsBuilder_ == null) {
ensureNegativeKeywordsIsMutable();
negativeKeywords_.set(index, builderForValue.build());
onChanged();
} else {
negativeKeywordsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The list of negative keywords to be used in the campaign when doing the
* forecast.
*
*
* repeated .google.ads.googleads.v17.common.KeywordInfo negative_keywords = 4;
*/
public Builder addNegativeKeywords(com.google.ads.googleads.v17.common.KeywordInfo value) {
if (negativeKeywordsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureNegativeKeywordsIsMutable();
negativeKeywords_.add(value);
onChanged();
} else {
negativeKeywordsBuilder_.addMessage(value);
}
return this;
}
/**
*
* The list of negative keywords to be used in the campaign when doing the
* forecast.
*
*
* repeated .google.ads.googleads.v17.common.KeywordInfo negative_keywords = 4;
*/
public Builder addNegativeKeywords(
int index, com.google.ads.googleads.v17.common.KeywordInfo value) {
if (negativeKeywordsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureNegativeKeywordsIsMutable();
negativeKeywords_.add(index, value);
onChanged();
} else {
negativeKeywordsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* The list of negative keywords to be used in the campaign when doing the
* forecast.
*
*
* repeated .google.ads.googleads.v17.common.KeywordInfo negative_keywords = 4;
*/
public Builder addNegativeKeywords(
com.google.ads.googleads.v17.common.KeywordInfo.Builder builderForValue) {
if (negativeKeywordsBuilder_ == null) {
ensureNegativeKeywordsIsMutable();
negativeKeywords_.add(builderForValue.build());
onChanged();
} else {
negativeKeywordsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* The list of negative keywords to be used in the campaign when doing the
* forecast.
*
*
* repeated .google.ads.googleads.v17.common.KeywordInfo negative_keywords = 4;
*/
public Builder addNegativeKeywords(
int index, com.google.ads.googleads.v17.common.KeywordInfo.Builder builderForValue) {
if (negativeKeywordsBuilder_ == null) {
ensureNegativeKeywordsIsMutable();
negativeKeywords_.add(index, builderForValue.build());
onChanged();
} else {
negativeKeywordsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The list of negative keywords to be used in the campaign when doing the
* forecast.
*
*
* repeated .google.ads.googleads.v17.common.KeywordInfo negative_keywords = 4;
*/
public Builder addAllNegativeKeywords(
java.lang.Iterable extends com.google.ads.googleads.v17.common.KeywordInfo> values) {
if (negativeKeywordsBuilder_ == null) {
ensureNegativeKeywordsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, negativeKeywords_);
onChanged();
} else {
negativeKeywordsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* The list of negative keywords to be used in the campaign when doing the
* forecast.
*
*
* repeated .google.ads.googleads.v17.common.KeywordInfo negative_keywords = 4;
*/
public Builder clearNegativeKeywords() {
if (negativeKeywordsBuilder_ == null) {
negativeKeywords_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
} else {
negativeKeywordsBuilder_.clear();
}
return this;
}
/**
*
* The list of negative keywords to be used in the campaign when doing the
* forecast.
*
*
* repeated .google.ads.googleads.v17.common.KeywordInfo negative_keywords = 4;
*/
public Builder removeNegativeKeywords(int index) {
if (negativeKeywordsBuilder_ == null) {
ensureNegativeKeywordsIsMutable();
negativeKeywords_.remove(index);
onChanged();
} else {
negativeKeywordsBuilder_.remove(index);
}
return this;
}
/**
*
* The list of negative keywords to be used in the campaign when doing the
* forecast.
*
*
* repeated .google.ads.googleads.v17.common.KeywordInfo negative_keywords = 4;
*/
public com.google.ads.googleads.v17.common.KeywordInfo.Builder getNegativeKeywordsBuilder(
int index) {
return getNegativeKeywordsFieldBuilder().getBuilder(index);
}
/**
*
* The list of negative keywords to be used in the campaign when doing the
* forecast.
*
*
* repeated .google.ads.googleads.v17.common.KeywordInfo negative_keywords = 4;
*/
public com.google.ads.googleads.v17.common.KeywordInfoOrBuilder getNegativeKeywordsOrBuilder(
int index) {
if (negativeKeywordsBuilder_ == null) {
return negativeKeywords_.get(index); } else {
return negativeKeywordsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* The list of negative keywords to be used in the campaign when doing the
* forecast.
*
*
* repeated .google.ads.googleads.v17.common.KeywordInfo negative_keywords = 4;
*/
public java.util.List extends com.google.ads.googleads.v17.common.KeywordInfoOrBuilder>
getNegativeKeywordsOrBuilderList() {
if (negativeKeywordsBuilder_ != null) {
return negativeKeywordsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(negativeKeywords_);
}
}
/**
*
* The list of negative keywords to be used in the campaign when doing the
* forecast.
*
*
* repeated .google.ads.googleads.v17.common.KeywordInfo negative_keywords = 4;
*/
public com.google.ads.googleads.v17.common.KeywordInfo.Builder addNegativeKeywordsBuilder() {
return getNegativeKeywordsFieldBuilder().addBuilder(
com.google.ads.googleads.v17.common.KeywordInfo.getDefaultInstance());
}
/**
*
* The list of negative keywords to be used in the campaign when doing the
* forecast.
*
*
* repeated .google.ads.googleads.v17.common.KeywordInfo negative_keywords = 4;
*/
public com.google.ads.googleads.v17.common.KeywordInfo.Builder addNegativeKeywordsBuilder(
int index) {
return getNegativeKeywordsFieldBuilder().addBuilder(
index, com.google.ads.googleads.v17.common.KeywordInfo.getDefaultInstance());
}
/**
*
* The list of negative keywords to be used in the campaign when doing the
* forecast.
*
*
* repeated .google.ads.googleads.v17.common.KeywordInfo negative_keywords = 4;
*/
public java.util.List
getNegativeKeywordsBuilderList() {
return getNegativeKeywordsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.ads.googleads.v17.common.KeywordInfo, com.google.ads.googleads.v17.common.KeywordInfo.Builder, com.google.ads.googleads.v17.common.KeywordInfoOrBuilder>
getNegativeKeywordsFieldBuilder() {
if (negativeKeywordsBuilder_ == null) {
negativeKeywordsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.ads.googleads.v17.common.KeywordInfo, com.google.ads.googleads.v17.common.KeywordInfo.Builder, com.google.ads.googleads.v17.common.KeywordInfoOrBuilder>(
negativeKeywords_,
((bitField0_ & 0x00000008) != 0),
getParentForChildren(),
isClean());
negativeKeywords_ = null;
}
return negativeKeywordsBuilder_;
}
private com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy biddingStrategy_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy, com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy.Builder, com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategyOrBuilder> biddingStrategyBuilder_;
/**
*
* Required. The bidding strategy for the campaign.
*
*
* .google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy bidding_strategy = 5 [(.google.api.field_behavior) = REQUIRED];
* @return Whether the biddingStrategy field is set.
*/
public boolean hasBiddingStrategy() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* Required. The bidding strategy for the campaign.
*
*
* .google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy bidding_strategy = 5 [(.google.api.field_behavior) = REQUIRED];
* @return The biddingStrategy.
*/
public com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy getBiddingStrategy() {
if (biddingStrategyBuilder_ == null) {
return biddingStrategy_ == null ? com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy.getDefaultInstance() : biddingStrategy_;
} else {
return biddingStrategyBuilder_.getMessage();
}
}
/**
*
* Required. The bidding strategy for the campaign.
*
*
* .google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy bidding_strategy = 5 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder setBiddingStrategy(com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy value) {
if (biddingStrategyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
biddingStrategy_ = value;
} else {
biddingStrategyBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* Required. The bidding strategy for the campaign.
*
*
* .google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy bidding_strategy = 5 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder setBiddingStrategy(
com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy.Builder builderForValue) {
if (biddingStrategyBuilder_ == null) {
biddingStrategy_ = builderForValue.build();
} else {
biddingStrategyBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* Required. The bidding strategy for the campaign.
*
*
* .google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy bidding_strategy = 5 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder mergeBiddingStrategy(com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy value) {
if (biddingStrategyBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0) &&
biddingStrategy_ != null &&
biddingStrategy_ != com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy.getDefaultInstance()) {
getBiddingStrategyBuilder().mergeFrom(value);
} else {
biddingStrategy_ = value;
}
} else {
biddingStrategyBuilder_.mergeFrom(value);
}
if (biddingStrategy_ != null) {
bitField0_ |= 0x00000010;
onChanged();
}
return this;
}
/**
*
* Required. The bidding strategy for the campaign.
*
*
* .google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy bidding_strategy = 5 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder clearBiddingStrategy() {
bitField0_ = (bitField0_ & ~0x00000010);
biddingStrategy_ = null;
if (biddingStrategyBuilder_ != null) {
biddingStrategyBuilder_.dispose();
biddingStrategyBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Required. The bidding strategy for the campaign.
*
*
* .google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy bidding_strategy = 5 [(.google.api.field_behavior) = REQUIRED];
*/
public com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy.Builder getBiddingStrategyBuilder() {
bitField0_ |= 0x00000010;
onChanged();
return getBiddingStrategyFieldBuilder().getBuilder();
}
/**
*
* Required. The bidding strategy for the campaign.
*
*
* .google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy bidding_strategy = 5 [(.google.api.field_behavior) = REQUIRED];
*/
public com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategyOrBuilder getBiddingStrategyOrBuilder() {
if (biddingStrategyBuilder_ != null) {
return biddingStrategyBuilder_.getMessageOrBuilder();
} else {
return biddingStrategy_ == null ?
com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy.getDefaultInstance() : biddingStrategy_;
}
}
/**
*
* Required. The bidding strategy for the campaign.
*
*
* .google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy bidding_strategy = 5 [(.google.api.field_behavior) = REQUIRED];
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy, com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy.Builder, com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategyOrBuilder>
getBiddingStrategyFieldBuilder() {
if (biddingStrategyBuilder_ == null) {
biddingStrategyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy, com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategy.Builder, com.google.ads.googleads.v17.services.CampaignToForecast.CampaignBiddingStrategyOrBuilder>(
getBiddingStrategy(),
getParentForChildren(),
isClean());
biddingStrategy_ = null;
}
return biddingStrategyBuilder_;
}
private double conversionRate_ ;
/**
*
* The expected conversion rate (number of conversions divided by number of
* total clicks) as defined by the user. This value is expressed as a decimal
* value, so an expected conversion rate of 2% should be entered as 0.02. If
* left empty, an estimated conversion rate will be used.
*
*
* optional double conversion_rate = 6;
* @return Whether the conversionRate field is set.
*/
@java.lang.Override
public boolean hasConversionRate() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
* The expected conversion rate (number of conversions divided by number of
* total clicks) as defined by the user. This value is expressed as a decimal
* value, so an expected conversion rate of 2% should be entered as 0.02. If
* left empty, an estimated conversion rate will be used.
*
*
* optional double conversion_rate = 6;
* @return The conversionRate.
*/
@java.lang.Override
public double getConversionRate() {
return conversionRate_;
}
/**
*
* The expected conversion rate (number of conversions divided by number of
* total clicks) as defined by the user. This value is expressed as a decimal
* value, so an expected conversion rate of 2% should be entered as 0.02. If
* left empty, an estimated conversion rate will be used.
*
*
* optional double conversion_rate = 6;
* @param value The conversionRate to set.
* @return This builder for chaining.
*/
public Builder setConversionRate(double value) {
conversionRate_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
* The expected conversion rate (number of conversions divided by number of
* total clicks) as defined by the user. This value is expressed as a decimal
* value, so an expected conversion rate of 2% should be entered as 0.02. If
* left empty, an estimated conversion rate will be used.
*
*
* optional double conversion_rate = 6;
* @return This builder for chaining.
*/
public Builder clearConversionRate() {
bitField0_ = (bitField0_ & ~0x00000020);
conversionRate_ = 0D;
onChanged();
return this;
}
private java.util.List adGroups_ =
java.util.Collections.emptyList();
private void ensureAdGroupsIsMutable() {
if (!((bitField0_ & 0x00000040) != 0)) {
adGroups_ = new java.util.ArrayList(adGroups_);
bitField0_ |= 0x00000040;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.ads.googleads.v17.services.ForecastAdGroup, com.google.ads.googleads.v17.services.ForecastAdGroup.Builder, com.google.ads.googleads.v17.services.ForecastAdGroupOrBuilder> adGroupsBuilder_;
/**
*
* The ad groups in the new campaign to forecast.
*
*
* repeated .google.ads.googleads.v17.services.ForecastAdGroup ad_groups = 7;
*/
public java.util.List getAdGroupsList() {
if (adGroupsBuilder_ == null) {
return java.util.Collections.unmodifiableList(adGroups_);
} else {
return adGroupsBuilder_.getMessageList();
}
}
/**
*
* The ad groups in the new campaign to forecast.
*
*
* repeated .google.ads.googleads.v17.services.ForecastAdGroup ad_groups = 7;
*/
public int getAdGroupsCount() {
if (adGroupsBuilder_ == null) {
return adGroups_.size();
} else {
return adGroupsBuilder_.getCount();
}
}
/**
*
* The ad groups in the new campaign to forecast.
*
*
* repeated .google.ads.googleads.v17.services.ForecastAdGroup ad_groups = 7;
*/
public com.google.ads.googleads.v17.services.ForecastAdGroup getAdGroups(int index) {
if (adGroupsBuilder_ == null) {
return adGroups_.get(index);
} else {
return adGroupsBuilder_.getMessage(index);
}
}
/**
*
* The ad groups in the new campaign to forecast.
*
*
* repeated .google.ads.googleads.v17.services.ForecastAdGroup ad_groups = 7;
*/
public Builder setAdGroups(
int index, com.google.ads.googleads.v17.services.ForecastAdGroup value) {
if (adGroupsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAdGroupsIsMutable();
adGroups_.set(index, value);
onChanged();
} else {
adGroupsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* The ad groups in the new campaign to forecast.
*
*
* repeated .google.ads.googleads.v17.services.ForecastAdGroup ad_groups = 7;
*/
public Builder setAdGroups(
int index, com.google.ads.googleads.v17.services.ForecastAdGroup.Builder builderForValue) {
if (adGroupsBuilder_ == null) {
ensureAdGroupsIsMutable();
adGroups_.set(index, builderForValue.build());
onChanged();
} else {
adGroupsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The ad groups in the new campaign to forecast.
*
*
* repeated .google.ads.googleads.v17.services.ForecastAdGroup ad_groups = 7;
*/
public Builder addAdGroups(com.google.ads.googleads.v17.services.ForecastAdGroup value) {
if (adGroupsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAdGroupsIsMutable();
adGroups_.add(value);
onChanged();
} else {
adGroupsBuilder_.addMessage(value);
}
return this;
}
/**
*
* The ad groups in the new campaign to forecast.
*
*
* repeated .google.ads.googleads.v17.services.ForecastAdGroup ad_groups = 7;
*/
public Builder addAdGroups(
int index, com.google.ads.googleads.v17.services.ForecastAdGroup value) {
if (adGroupsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAdGroupsIsMutable();
adGroups_.add(index, value);
onChanged();
} else {
adGroupsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* The ad groups in the new campaign to forecast.
*
*
* repeated .google.ads.googleads.v17.services.ForecastAdGroup ad_groups = 7;
*/
public Builder addAdGroups(
com.google.ads.googleads.v17.services.ForecastAdGroup.Builder builderForValue) {
if (adGroupsBuilder_ == null) {
ensureAdGroupsIsMutable();
adGroups_.add(builderForValue.build());
onChanged();
} else {
adGroupsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* The ad groups in the new campaign to forecast.
*
*
* repeated .google.ads.googleads.v17.services.ForecastAdGroup ad_groups = 7;
*/
public Builder addAdGroups(
int index, com.google.ads.googleads.v17.services.ForecastAdGroup.Builder builderForValue) {
if (adGroupsBuilder_ == null) {
ensureAdGroupsIsMutable();
adGroups_.add(index, builderForValue.build());
onChanged();
} else {
adGroupsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The ad groups in the new campaign to forecast.
*
*
* repeated .google.ads.googleads.v17.services.ForecastAdGroup ad_groups = 7;
*/
public Builder addAllAdGroups(
java.lang.Iterable extends com.google.ads.googleads.v17.services.ForecastAdGroup> values) {
if (adGroupsBuilder_ == null) {
ensureAdGroupsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, adGroups_);
onChanged();
} else {
adGroupsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* The ad groups in the new campaign to forecast.
*
*
* repeated .google.ads.googleads.v17.services.ForecastAdGroup ad_groups = 7;
*/
public Builder clearAdGroups() {
if (adGroupsBuilder_ == null) {
adGroups_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000040);
onChanged();
} else {
adGroupsBuilder_.clear();
}
return this;
}
/**
*
* The ad groups in the new campaign to forecast.
*
*
* repeated .google.ads.googleads.v17.services.ForecastAdGroup ad_groups = 7;
*/
public Builder removeAdGroups(int index) {
if (adGroupsBuilder_ == null) {
ensureAdGroupsIsMutable();
adGroups_.remove(index);
onChanged();
} else {
adGroupsBuilder_.remove(index);
}
return this;
}
/**
*
* The ad groups in the new campaign to forecast.
*
*
* repeated .google.ads.googleads.v17.services.ForecastAdGroup ad_groups = 7;
*/
public com.google.ads.googleads.v17.services.ForecastAdGroup.Builder getAdGroupsBuilder(
int index) {
return getAdGroupsFieldBuilder().getBuilder(index);
}
/**
*
* The ad groups in the new campaign to forecast.
*
*
* repeated .google.ads.googleads.v17.services.ForecastAdGroup ad_groups = 7;
*/
public com.google.ads.googleads.v17.services.ForecastAdGroupOrBuilder getAdGroupsOrBuilder(
int index) {
if (adGroupsBuilder_ == null) {
return adGroups_.get(index); } else {
return adGroupsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* The ad groups in the new campaign to forecast.
*
*
* repeated .google.ads.googleads.v17.services.ForecastAdGroup ad_groups = 7;
*/
public java.util.List extends com.google.ads.googleads.v17.services.ForecastAdGroupOrBuilder>
getAdGroupsOrBuilderList() {
if (adGroupsBuilder_ != null) {
return adGroupsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(adGroups_);
}
}
/**
*
* The ad groups in the new campaign to forecast.
*
*
* repeated .google.ads.googleads.v17.services.ForecastAdGroup ad_groups = 7;
*/
public com.google.ads.googleads.v17.services.ForecastAdGroup.Builder addAdGroupsBuilder() {
return getAdGroupsFieldBuilder().addBuilder(
com.google.ads.googleads.v17.services.ForecastAdGroup.getDefaultInstance());
}
/**
*
* The ad groups in the new campaign to forecast.
*
*
* repeated .google.ads.googleads.v17.services.ForecastAdGroup ad_groups = 7;
*/
public com.google.ads.googleads.v17.services.ForecastAdGroup.Builder addAdGroupsBuilder(
int index) {
return getAdGroupsFieldBuilder().addBuilder(
index, com.google.ads.googleads.v17.services.ForecastAdGroup.getDefaultInstance());
}
/**
*
* The ad groups in the new campaign to forecast.
*
*
* repeated .google.ads.googleads.v17.services.ForecastAdGroup ad_groups = 7;
*/
public java.util.List
getAdGroupsBuilderList() {
return getAdGroupsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.ads.googleads.v17.services.ForecastAdGroup, com.google.ads.googleads.v17.services.ForecastAdGroup.Builder, com.google.ads.googleads.v17.services.ForecastAdGroupOrBuilder>
getAdGroupsFieldBuilder() {
if (adGroupsBuilder_ == null) {
adGroupsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.ads.googleads.v17.services.ForecastAdGroup, com.google.ads.googleads.v17.services.ForecastAdGroup.Builder, com.google.ads.googleads.v17.services.ForecastAdGroupOrBuilder>(
adGroups_,
((bitField0_ & 0x00000040) != 0),
getParentForChildren(),
isClean());
adGroups_ = null;
}
return adGroupsBuilder_;
}
@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.CampaignToForecast)
}
// @@protoc_insertion_point(class_scope:google.ads.googleads.v17.services.CampaignToForecast)
private static final com.google.ads.googleads.v17.services.CampaignToForecast DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.ads.googleads.v17.services.CampaignToForecast();
}
public static com.google.ads.googleads.v17.services.CampaignToForecast getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CampaignToForecast 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.CampaignToForecast getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy