com.google.ads.googleads.v17.services.KeywordForecastMetrics 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;
/**
*
* The forecast metrics for the planless keyword campaign.
*
*
* Protobuf type {@code google.ads.googleads.v17.services.KeywordForecastMetrics}
*/
public final class KeywordForecastMetrics extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.ads.googleads.v17.services.KeywordForecastMetrics)
KeywordForecastMetricsOrBuilder {
private static final long serialVersionUID = 0L;
// Use KeywordForecastMetrics.newBuilder() to construct.
private KeywordForecastMetrics(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private KeywordForecastMetrics() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new KeywordForecastMetrics();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.ads.googleads.v17.services.KeywordPlanIdeaServiceProto.internal_static_google_ads_googleads_v17_services_KeywordForecastMetrics_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_KeywordForecastMetrics_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ads.googleads.v17.services.KeywordForecastMetrics.class, com.google.ads.googleads.v17.services.KeywordForecastMetrics.Builder.class);
}
private int bitField0_;
public static final int IMPRESSIONS_FIELD_NUMBER = 1;
private double impressions_ = 0D;
/**
*
* The total number of impressions.
*
*
* optional double impressions = 1;
* @return Whether the impressions field is set.
*/
@java.lang.Override
public boolean hasImpressions() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* The total number of impressions.
*
*
* optional double impressions = 1;
* @return The impressions.
*/
@java.lang.Override
public double getImpressions() {
return impressions_;
}
public static final int CLICK_THROUGH_RATE_FIELD_NUMBER = 2;
private double clickThroughRate_ = 0D;
/**
*
* The average click through rate. Available only if impressions > 0.
*
*
* optional double click_through_rate = 2;
* @return Whether the clickThroughRate field is set.
*/
@java.lang.Override
public boolean hasClickThroughRate() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* The average click through rate. Available only if impressions > 0.
*
*
* optional double click_through_rate = 2;
* @return The clickThroughRate.
*/
@java.lang.Override
public double getClickThroughRate() {
return clickThroughRate_;
}
public static final int AVERAGE_CPC_MICROS_FIELD_NUMBER = 3;
private long averageCpcMicros_ = 0L;
/**
*
* The average cpc. Available only if clicks > 0.
*
*
* optional int64 average_cpc_micros = 3;
* @return Whether the averageCpcMicros field is set.
*/
@java.lang.Override
public boolean hasAverageCpcMicros() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* The average cpc. Available only if clicks > 0.
*
*
* optional int64 average_cpc_micros = 3;
* @return The averageCpcMicros.
*/
@java.lang.Override
public long getAverageCpcMicros() {
return averageCpcMicros_;
}
public static final int CLICKS_FIELD_NUMBER = 4;
private double clicks_ = 0D;
/**
*
* The total number of clicks.
*
*
* optional double clicks = 4;
* @return Whether the clicks field is set.
*/
@java.lang.Override
public boolean hasClicks() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* The total number of clicks.
*
*
* optional double clicks = 4;
* @return The clicks.
*/
@java.lang.Override
public double getClicks() {
return clicks_;
}
public static final int COST_MICROS_FIELD_NUMBER = 5;
private long costMicros_ = 0L;
/**
*
* The total cost.
*
*
* optional int64 cost_micros = 5;
* @return Whether the costMicros field is set.
*/
@java.lang.Override
public boolean hasCostMicros() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* The total cost.
*
*
* optional int64 cost_micros = 5;
* @return The costMicros.
*/
@java.lang.Override
public long getCostMicros() {
return costMicros_;
}
public static final int CONVERSIONS_FIELD_NUMBER = 6;
private double conversions_ = 0D;
/**
*
* Forecasted number of conversions: clicks * conversion_rate.
*
*
* optional double conversions = 6;
* @return Whether the conversions field is set.
*/
@java.lang.Override
public boolean hasConversions() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
* Forecasted number of conversions: clicks * conversion_rate.
*
*
* optional double conversions = 6;
* @return The conversions.
*/
@java.lang.Override
public double getConversions() {
return conversions_;
}
public static final int CONVERSION_RATE_FIELD_NUMBER = 7;
private double conversionRate_ = 0D;
/**
*
* Forecasted conversion rate.
*
*
* optional double conversion_rate = 7;
* @return Whether the conversionRate field is set.
*/
@java.lang.Override
public boolean hasConversionRate() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
* Forecasted conversion rate.
*
*
* optional double conversion_rate = 7;
* @return The conversionRate.
*/
@java.lang.Override
public double getConversionRate() {
return conversionRate_;
}
public static final int AVERAGE_CPA_MICROS_FIELD_NUMBER = 8;
private long averageCpaMicros_ = 0L;
/**
*
* Average cost per acquisition calculated as cost_micros / conversions.
*
*
* optional int64 average_cpa_micros = 8;
* @return Whether the averageCpaMicros field is set.
*/
@java.lang.Override
public boolean hasAverageCpaMicros() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
*
* Average cost per acquisition calculated as cost_micros / conversions.
*
*
* optional int64 average_cpa_micros = 8;
* @return The averageCpaMicros.
*/
@java.lang.Override
public long getAverageCpaMicros() {
return averageCpaMicros_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (((bitField0_ & 0x00000001) != 0)) {
output.writeDouble(1, impressions_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeDouble(2, clickThroughRate_);
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeInt64(3, averageCpcMicros_);
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeDouble(4, clicks_);
}
if (((bitField0_ & 0x00000010) != 0)) {
output.writeInt64(5, costMicros_);
}
if (((bitField0_ & 0x00000020) != 0)) {
output.writeDouble(6, conversions_);
}
if (((bitField0_ & 0x00000040) != 0)) {
output.writeDouble(7, conversionRate_);
}
if (((bitField0_ & 0x00000080) != 0)) {
output.writeInt64(8, averageCpaMicros_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(1, impressions_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(2, clickThroughRate_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(3, averageCpcMicros_);
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(4, clicks_);
}
if (((bitField0_ & 0x00000010) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(5, costMicros_);
}
if (((bitField0_ & 0x00000020) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(6, conversions_);
}
if (((bitField0_ & 0x00000040) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(7, conversionRate_);
}
if (((bitField0_ & 0x00000080) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(8, averageCpaMicros_);
}
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.KeywordForecastMetrics)) {
return super.equals(obj);
}
com.google.ads.googleads.v17.services.KeywordForecastMetrics other = (com.google.ads.googleads.v17.services.KeywordForecastMetrics) obj;
if (hasImpressions() != other.hasImpressions()) return false;
if (hasImpressions()) {
if (java.lang.Double.doubleToLongBits(getImpressions())
!= java.lang.Double.doubleToLongBits(
other.getImpressions())) return false;
}
if (hasClickThroughRate() != other.hasClickThroughRate()) return false;
if (hasClickThroughRate()) {
if (java.lang.Double.doubleToLongBits(getClickThroughRate())
!= java.lang.Double.doubleToLongBits(
other.getClickThroughRate())) return false;
}
if (hasAverageCpcMicros() != other.hasAverageCpcMicros()) return false;
if (hasAverageCpcMicros()) {
if (getAverageCpcMicros()
!= other.getAverageCpcMicros()) return false;
}
if (hasClicks() != other.hasClicks()) return false;
if (hasClicks()) {
if (java.lang.Double.doubleToLongBits(getClicks())
!= java.lang.Double.doubleToLongBits(
other.getClicks())) return false;
}
if (hasCostMicros() != other.hasCostMicros()) return false;
if (hasCostMicros()) {
if (getCostMicros()
!= other.getCostMicros()) return false;
}
if (hasConversions() != other.hasConversions()) return false;
if (hasConversions()) {
if (java.lang.Double.doubleToLongBits(getConversions())
!= java.lang.Double.doubleToLongBits(
other.getConversions())) 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 (hasAverageCpaMicros() != other.hasAverageCpaMicros()) return false;
if (hasAverageCpaMicros()) {
if (getAverageCpaMicros()
!= other.getAverageCpaMicros()) 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 (hasImpressions()) {
hash = (37 * hash) + IMPRESSIONS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getImpressions()));
}
if (hasClickThroughRate()) {
hash = (37 * hash) + CLICK_THROUGH_RATE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getClickThroughRate()));
}
if (hasAverageCpcMicros()) {
hash = (37 * hash) + AVERAGE_CPC_MICROS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getAverageCpcMicros());
}
if (hasClicks()) {
hash = (37 * hash) + CLICKS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getClicks()));
}
if (hasCostMicros()) {
hash = (37 * hash) + COST_MICROS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getCostMicros());
}
if (hasConversions()) {
hash = (37 * hash) + CONVERSIONS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getConversions()));
}
if (hasConversionRate()) {
hash = (37 * hash) + CONVERSION_RATE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getConversionRate()));
}
if (hasAverageCpaMicros()) {
hash = (37 * hash) + AVERAGE_CPA_MICROS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getAverageCpaMicros());
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.ads.googleads.v17.services.KeywordForecastMetrics parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.services.KeywordForecastMetrics 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.KeywordForecastMetrics parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.services.KeywordForecastMetrics 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.KeywordForecastMetrics parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.services.KeywordForecastMetrics 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.KeywordForecastMetrics 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.KeywordForecastMetrics 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.KeywordForecastMetrics 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.KeywordForecastMetrics 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.KeywordForecastMetrics 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.KeywordForecastMetrics 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.KeywordForecastMetrics prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* The forecast metrics for the planless keyword campaign.
*
*
* Protobuf type {@code google.ads.googleads.v17.services.KeywordForecastMetrics}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.ads.googleads.v17.services.KeywordForecastMetrics)
com.google.ads.googleads.v17.services.KeywordForecastMetricsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.ads.googleads.v17.services.KeywordPlanIdeaServiceProto.internal_static_google_ads_googleads_v17_services_KeywordForecastMetrics_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_KeywordForecastMetrics_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ads.googleads.v17.services.KeywordForecastMetrics.class, com.google.ads.googleads.v17.services.KeywordForecastMetrics.Builder.class);
}
// Construct using com.google.ads.googleads.v17.services.KeywordForecastMetrics.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
impressions_ = 0D;
clickThroughRate_ = 0D;
averageCpcMicros_ = 0L;
clicks_ = 0D;
costMicros_ = 0L;
conversions_ = 0D;
conversionRate_ = 0D;
averageCpaMicros_ = 0L;
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_KeywordForecastMetrics_descriptor;
}
@java.lang.Override
public com.google.ads.googleads.v17.services.KeywordForecastMetrics getDefaultInstanceForType() {
return com.google.ads.googleads.v17.services.KeywordForecastMetrics.getDefaultInstance();
}
@java.lang.Override
public com.google.ads.googleads.v17.services.KeywordForecastMetrics build() {
com.google.ads.googleads.v17.services.KeywordForecastMetrics result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.ads.googleads.v17.services.KeywordForecastMetrics buildPartial() {
com.google.ads.googleads.v17.services.KeywordForecastMetrics result = new com.google.ads.googleads.v17.services.KeywordForecastMetrics(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.google.ads.googleads.v17.services.KeywordForecastMetrics result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.impressions_ = impressions_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.clickThroughRate_ = clickThroughRate_;
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.averageCpcMicros_ = averageCpcMicros_;
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.clicks_ = clicks_;
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.costMicros_ = costMicros_;
to_bitField0_ |= 0x00000010;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.conversions_ = conversions_;
to_bitField0_ |= 0x00000020;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.conversionRate_ = conversionRate_;
to_bitField0_ |= 0x00000040;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.averageCpaMicros_ = averageCpaMicros_;
to_bitField0_ |= 0x00000080;
}
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.KeywordForecastMetrics) {
return mergeFrom((com.google.ads.googleads.v17.services.KeywordForecastMetrics)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.ads.googleads.v17.services.KeywordForecastMetrics other) {
if (other == com.google.ads.googleads.v17.services.KeywordForecastMetrics.getDefaultInstance()) return this;
if (other.hasImpressions()) {
setImpressions(other.getImpressions());
}
if (other.hasClickThroughRate()) {
setClickThroughRate(other.getClickThroughRate());
}
if (other.hasAverageCpcMicros()) {
setAverageCpcMicros(other.getAverageCpcMicros());
}
if (other.hasClicks()) {
setClicks(other.getClicks());
}
if (other.hasCostMicros()) {
setCostMicros(other.getCostMicros());
}
if (other.hasConversions()) {
setConversions(other.getConversions());
}
if (other.hasConversionRate()) {
setConversionRate(other.getConversionRate());
}
if (other.hasAverageCpaMicros()) {
setAverageCpaMicros(other.getAverageCpaMicros());
}
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 9: {
impressions_ = input.readDouble();
bitField0_ |= 0x00000001;
break;
} // case 9
case 17: {
clickThroughRate_ = input.readDouble();
bitField0_ |= 0x00000002;
break;
} // case 17
case 24: {
averageCpcMicros_ = input.readInt64();
bitField0_ |= 0x00000004;
break;
} // case 24
case 33: {
clicks_ = input.readDouble();
bitField0_ |= 0x00000008;
break;
} // case 33
case 40: {
costMicros_ = input.readInt64();
bitField0_ |= 0x00000010;
break;
} // case 40
case 49: {
conversions_ = input.readDouble();
bitField0_ |= 0x00000020;
break;
} // case 49
case 57: {
conversionRate_ = input.readDouble();
bitField0_ |= 0x00000040;
break;
} // case 57
case 64: {
averageCpaMicros_ = input.readInt64();
bitField0_ |= 0x00000080;
break;
} // case 64
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 double impressions_ ;
/**
*
* The total number of impressions.
*
*
* optional double impressions = 1;
* @return Whether the impressions field is set.
*/
@java.lang.Override
public boolean hasImpressions() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* The total number of impressions.
*
*
* optional double impressions = 1;
* @return The impressions.
*/
@java.lang.Override
public double getImpressions() {
return impressions_;
}
/**
*
* The total number of impressions.
*
*
* optional double impressions = 1;
* @param value The impressions to set.
* @return This builder for chaining.
*/
public Builder setImpressions(double value) {
impressions_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* The total number of impressions.
*
*
* optional double impressions = 1;
* @return This builder for chaining.
*/
public Builder clearImpressions() {
bitField0_ = (bitField0_ & ~0x00000001);
impressions_ = 0D;
onChanged();
return this;
}
private double clickThroughRate_ ;
/**
*
* The average click through rate. Available only if impressions > 0.
*
*
* optional double click_through_rate = 2;
* @return Whether the clickThroughRate field is set.
*/
@java.lang.Override
public boolean hasClickThroughRate() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* The average click through rate. Available only if impressions > 0.
*
*
* optional double click_through_rate = 2;
* @return The clickThroughRate.
*/
@java.lang.Override
public double getClickThroughRate() {
return clickThroughRate_;
}
/**
*
* The average click through rate. Available only if impressions > 0.
*
*
* optional double click_through_rate = 2;
* @param value The clickThroughRate to set.
* @return This builder for chaining.
*/
public Builder setClickThroughRate(double value) {
clickThroughRate_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* The average click through rate. Available only if impressions > 0.
*
*
* optional double click_through_rate = 2;
* @return This builder for chaining.
*/
public Builder clearClickThroughRate() {
bitField0_ = (bitField0_ & ~0x00000002);
clickThroughRate_ = 0D;
onChanged();
return this;
}
private long averageCpcMicros_ ;
/**
*
* The average cpc. Available only if clicks > 0.
*
*
* optional int64 average_cpc_micros = 3;
* @return Whether the averageCpcMicros field is set.
*/
@java.lang.Override
public boolean hasAverageCpcMicros() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* The average cpc. Available only if clicks > 0.
*
*
* optional int64 average_cpc_micros = 3;
* @return The averageCpcMicros.
*/
@java.lang.Override
public long getAverageCpcMicros() {
return averageCpcMicros_;
}
/**
*
* The average cpc. Available only if clicks > 0.
*
*
* optional int64 average_cpc_micros = 3;
* @param value The averageCpcMicros to set.
* @return This builder for chaining.
*/
public Builder setAverageCpcMicros(long value) {
averageCpcMicros_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* The average cpc. Available only if clicks > 0.
*
*
* optional int64 average_cpc_micros = 3;
* @return This builder for chaining.
*/
public Builder clearAverageCpcMicros() {
bitField0_ = (bitField0_ & ~0x00000004);
averageCpcMicros_ = 0L;
onChanged();
return this;
}
private double clicks_ ;
/**
*
* The total number of clicks.
*
*
* optional double clicks = 4;
* @return Whether the clicks field is set.
*/
@java.lang.Override
public boolean hasClicks() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* The total number of clicks.
*
*
* optional double clicks = 4;
* @return The clicks.
*/
@java.lang.Override
public double getClicks() {
return clicks_;
}
/**
*
* The total number of clicks.
*
*
* optional double clicks = 4;
* @param value The clicks to set.
* @return This builder for chaining.
*/
public Builder setClicks(double value) {
clicks_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* The total number of clicks.
*
*
* optional double clicks = 4;
* @return This builder for chaining.
*/
public Builder clearClicks() {
bitField0_ = (bitField0_ & ~0x00000008);
clicks_ = 0D;
onChanged();
return this;
}
private long costMicros_ ;
/**
*
* The total cost.
*
*
* optional int64 cost_micros = 5;
* @return Whether the costMicros field is set.
*/
@java.lang.Override
public boolean hasCostMicros() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* The total cost.
*
*
* optional int64 cost_micros = 5;
* @return The costMicros.
*/
@java.lang.Override
public long getCostMicros() {
return costMicros_;
}
/**
*
* The total cost.
*
*
* optional int64 cost_micros = 5;
* @param value The costMicros to set.
* @return This builder for chaining.
*/
public Builder setCostMicros(long value) {
costMicros_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* The total cost.
*
*
* optional int64 cost_micros = 5;
* @return This builder for chaining.
*/
public Builder clearCostMicros() {
bitField0_ = (bitField0_ & ~0x00000010);
costMicros_ = 0L;
onChanged();
return this;
}
private double conversions_ ;
/**
*
* Forecasted number of conversions: clicks * conversion_rate.
*
*
* optional double conversions = 6;
* @return Whether the conversions field is set.
*/
@java.lang.Override
public boolean hasConversions() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
* Forecasted number of conversions: clicks * conversion_rate.
*
*
* optional double conversions = 6;
* @return The conversions.
*/
@java.lang.Override
public double getConversions() {
return conversions_;
}
/**
*
* Forecasted number of conversions: clicks * conversion_rate.
*
*
* optional double conversions = 6;
* @param value The conversions to set.
* @return This builder for chaining.
*/
public Builder setConversions(double value) {
conversions_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
* Forecasted number of conversions: clicks * conversion_rate.
*
*
* optional double conversions = 6;
* @return This builder for chaining.
*/
public Builder clearConversions() {
bitField0_ = (bitField0_ & ~0x00000020);
conversions_ = 0D;
onChanged();
return this;
}
private double conversionRate_ ;
/**
*
* Forecasted conversion rate.
*
*
* optional double conversion_rate = 7;
* @return Whether the conversionRate field is set.
*/
@java.lang.Override
public boolean hasConversionRate() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
* Forecasted conversion rate.
*
*
* optional double conversion_rate = 7;
* @return The conversionRate.
*/
@java.lang.Override
public double getConversionRate() {
return conversionRate_;
}
/**
*
* Forecasted conversion rate.
*
*
* optional double conversion_rate = 7;
* @param value The conversionRate to set.
* @return This builder for chaining.
*/
public Builder setConversionRate(double value) {
conversionRate_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
* Forecasted conversion rate.
*
*
* optional double conversion_rate = 7;
* @return This builder for chaining.
*/
public Builder clearConversionRate() {
bitField0_ = (bitField0_ & ~0x00000040);
conversionRate_ = 0D;
onChanged();
return this;
}
private long averageCpaMicros_ ;
/**
*
* Average cost per acquisition calculated as cost_micros / conversions.
*
*
* optional int64 average_cpa_micros = 8;
* @return Whether the averageCpaMicros field is set.
*/
@java.lang.Override
public boolean hasAverageCpaMicros() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
*
* Average cost per acquisition calculated as cost_micros / conversions.
*
*
* optional int64 average_cpa_micros = 8;
* @return The averageCpaMicros.
*/
@java.lang.Override
public long getAverageCpaMicros() {
return averageCpaMicros_;
}
/**
*
* Average cost per acquisition calculated as cost_micros / conversions.
*
*
* optional int64 average_cpa_micros = 8;
* @param value The averageCpaMicros to set.
* @return This builder for chaining.
*/
public Builder setAverageCpaMicros(long value) {
averageCpaMicros_ = value;
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
* Average cost per acquisition calculated as cost_micros / conversions.
*
*
* optional int64 average_cpa_micros = 8;
* @return This builder for chaining.
*/
public Builder clearAverageCpaMicros() {
bitField0_ = (bitField0_ & ~0x00000080);
averageCpaMicros_ = 0L;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.ads.googleads.v17.services.KeywordForecastMetrics)
}
// @@protoc_insertion_point(class_scope:google.ads.googleads.v17.services.KeywordForecastMetrics)
private static final com.google.ads.googleads.v17.services.KeywordForecastMetrics DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.ads.googleads.v17.services.KeywordForecastMetrics();
}
public static com.google.ads.googleads.v17.services.KeywordForecastMetrics getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public KeywordForecastMetrics 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.KeywordForecastMetrics getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy