com.google.ads.googleads.v17.common.PriceOffering 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/common/asset_types.proto
// Protobuf Java Version: 3.25.3
package com.google.ads.googleads.v17.common;
/**
*
* A single price offering within a PriceAsset.
*
*
* Protobuf type {@code google.ads.googleads.v17.common.PriceOffering}
*/
public final class PriceOffering extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.ads.googleads.v17.common.PriceOffering)
PriceOfferingOrBuilder {
private static final long serialVersionUID = 0L;
// Use PriceOffering.newBuilder() to construct.
private PriceOffering(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private PriceOffering() {
header_ = "";
description_ = "";
unit_ = 0;
finalUrl_ = "";
finalMobileUrl_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new PriceOffering();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.ads.googleads.v17.common.AssetTypesProto.internal_static_google_ads_googleads_v17_common_PriceOffering_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.ads.googleads.v17.common.AssetTypesProto.internal_static_google_ads_googleads_v17_common_PriceOffering_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ads.googleads.v17.common.PriceOffering.class, com.google.ads.googleads.v17.common.PriceOffering.Builder.class);
}
private int bitField0_;
public static final int HEADER_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object header_ = "";
/**
*
* Required. The header of the price offering.
* The length of this string should be between 1 and 25, inclusive.
*
*
* string header = 1 [(.google.api.field_behavior) = REQUIRED];
* @return The header.
*/
@java.lang.Override
public java.lang.String getHeader() {
java.lang.Object ref = header_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
header_ = s;
return s;
}
}
/**
*
* Required. The header of the price offering.
* The length of this string should be between 1 and 25, inclusive.
*
*
* string header = 1 [(.google.api.field_behavior) = REQUIRED];
* @return The bytes for header.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getHeaderBytes() {
java.lang.Object ref = header_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
header_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DESCRIPTION_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object description_ = "";
/**
*
* Required. The description of the price offering.
* The length of this string should be between 1 and 25, inclusive.
*
*
* string description = 2 [(.google.api.field_behavior) = REQUIRED];
* @return The description.
*/
@java.lang.Override
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
}
}
/**
*
* Required. The description of the price offering.
* The length of this string should be between 1 and 25, inclusive.
*
*
* string description = 2 [(.google.api.field_behavior) = REQUIRED];
* @return The bytes for description.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PRICE_FIELD_NUMBER = 3;
private com.google.ads.googleads.v17.common.Money price_;
/**
*
* Required. The price value of the price offering.
*
*
* .google.ads.googleads.v17.common.Money price = 3 [(.google.api.field_behavior) = REQUIRED];
* @return Whether the price field is set.
*/
@java.lang.Override
public boolean hasPrice() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Required. The price value of the price offering.
*
*
* .google.ads.googleads.v17.common.Money price = 3 [(.google.api.field_behavior) = REQUIRED];
* @return The price.
*/
@java.lang.Override
public com.google.ads.googleads.v17.common.Money getPrice() {
return price_ == null ? com.google.ads.googleads.v17.common.Money.getDefaultInstance() : price_;
}
/**
*
* Required. The price value of the price offering.
*
*
* .google.ads.googleads.v17.common.Money price = 3 [(.google.api.field_behavior) = REQUIRED];
*/
@java.lang.Override
public com.google.ads.googleads.v17.common.MoneyOrBuilder getPriceOrBuilder() {
return price_ == null ? com.google.ads.googleads.v17.common.Money.getDefaultInstance() : price_;
}
public static final int UNIT_FIELD_NUMBER = 4;
private int unit_ = 0;
/**
*
* The price unit of the price offering.
*
*
* .google.ads.googleads.v17.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit unit = 4;
* @return The enum numeric value on the wire for unit.
*/
@java.lang.Override public int getUnitValue() {
return unit_;
}
/**
*
* The price unit of the price offering.
*
*
* .google.ads.googleads.v17.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit unit = 4;
* @return The unit.
*/
@java.lang.Override public com.google.ads.googleads.v17.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit getUnit() {
com.google.ads.googleads.v17.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit result = com.google.ads.googleads.v17.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit.forNumber(unit_);
return result == null ? com.google.ads.googleads.v17.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit.UNRECOGNIZED : result;
}
public static final int FINAL_URL_FIELD_NUMBER = 5;
@SuppressWarnings("serial")
private volatile java.lang.Object finalUrl_ = "";
/**
*
* Required. The final URL after all cross domain redirects.
*
*
* string final_url = 5 [(.google.api.field_behavior) = REQUIRED];
* @return The finalUrl.
*/
@java.lang.Override
public java.lang.String getFinalUrl() {
java.lang.Object ref = finalUrl_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
finalUrl_ = s;
return s;
}
}
/**
*
* Required. The final URL after all cross domain redirects.
*
*
* string final_url = 5 [(.google.api.field_behavior) = REQUIRED];
* @return The bytes for finalUrl.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getFinalUrlBytes() {
java.lang.Object ref = finalUrl_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
finalUrl_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int FINAL_MOBILE_URL_FIELD_NUMBER = 6;
@SuppressWarnings("serial")
private volatile java.lang.Object finalMobileUrl_ = "";
/**
*
* The final mobile URL after all cross domain redirects.
*
*
* string final_mobile_url = 6;
* @return The finalMobileUrl.
*/
@java.lang.Override
public java.lang.String getFinalMobileUrl() {
java.lang.Object ref = finalMobileUrl_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
finalMobileUrl_ = s;
return s;
}
}
/**
*
* The final mobile URL after all cross domain redirects.
*
*
* string final_mobile_url = 6;
* @return The bytes for finalMobileUrl.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getFinalMobileUrlBytes() {
java.lang.Object ref = finalMobileUrl_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
finalMobileUrl_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(header_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, header_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(3, getPrice());
}
if (unit_ != com.google.ads.googleads.v17.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit.UNSPECIFIED.getNumber()) {
output.writeEnum(4, unit_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(finalUrl_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, finalUrl_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(finalMobileUrl_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, finalMobileUrl_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(header_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, header_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getPrice());
}
if (unit_ != com.google.ads.googleads.v17.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit.UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(4, unit_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(finalUrl_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, finalUrl_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(finalMobileUrl_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, finalMobileUrl_);
}
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.common.PriceOffering)) {
return super.equals(obj);
}
com.google.ads.googleads.v17.common.PriceOffering other = (com.google.ads.googleads.v17.common.PriceOffering) obj;
if (!getHeader()
.equals(other.getHeader())) return false;
if (!getDescription()
.equals(other.getDescription())) return false;
if (hasPrice() != other.hasPrice()) return false;
if (hasPrice()) {
if (!getPrice()
.equals(other.getPrice())) return false;
}
if (unit_ != other.unit_) return false;
if (!getFinalUrl()
.equals(other.getFinalUrl())) return false;
if (!getFinalMobileUrl()
.equals(other.getFinalMobileUrl())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + HEADER_FIELD_NUMBER;
hash = (53 * hash) + getHeader().hashCode();
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
if (hasPrice()) {
hash = (37 * hash) + PRICE_FIELD_NUMBER;
hash = (53 * hash) + getPrice().hashCode();
}
hash = (37 * hash) + UNIT_FIELD_NUMBER;
hash = (53 * hash) + unit_;
hash = (37 * hash) + FINAL_URL_FIELD_NUMBER;
hash = (53 * hash) + getFinalUrl().hashCode();
hash = (37 * hash) + FINAL_MOBILE_URL_FIELD_NUMBER;
hash = (53 * hash) + getFinalMobileUrl().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.ads.googleads.v17.common.PriceOffering parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.common.PriceOffering 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.common.PriceOffering parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.common.PriceOffering 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.common.PriceOffering parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.common.PriceOffering 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.common.PriceOffering parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.ads.googleads.v17.common.PriceOffering 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.common.PriceOffering parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.ads.googleads.v17.common.PriceOffering 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.common.PriceOffering 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.common.PriceOffering 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.common.PriceOffering 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 single price offering within a PriceAsset.
*
*
* Protobuf type {@code google.ads.googleads.v17.common.PriceOffering}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.ads.googleads.v17.common.PriceOffering)
com.google.ads.googleads.v17.common.PriceOfferingOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.ads.googleads.v17.common.AssetTypesProto.internal_static_google_ads_googleads_v17_common_PriceOffering_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.ads.googleads.v17.common.AssetTypesProto.internal_static_google_ads_googleads_v17_common_PriceOffering_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ads.googleads.v17.common.PriceOffering.class, com.google.ads.googleads.v17.common.PriceOffering.Builder.class);
}
// Construct using com.google.ads.googleads.v17.common.PriceOffering.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getPriceFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
header_ = "";
description_ = "";
price_ = null;
if (priceBuilder_ != null) {
priceBuilder_.dispose();
priceBuilder_ = null;
}
unit_ = 0;
finalUrl_ = "";
finalMobileUrl_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.ads.googleads.v17.common.AssetTypesProto.internal_static_google_ads_googleads_v17_common_PriceOffering_descriptor;
}
@java.lang.Override
public com.google.ads.googleads.v17.common.PriceOffering getDefaultInstanceForType() {
return com.google.ads.googleads.v17.common.PriceOffering.getDefaultInstance();
}
@java.lang.Override
public com.google.ads.googleads.v17.common.PriceOffering build() {
com.google.ads.googleads.v17.common.PriceOffering result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.ads.googleads.v17.common.PriceOffering buildPartial() {
com.google.ads.googleads.v17.common.PriceOffering result = new com.google.ads.googleads.v17.common.PriceOffering(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.google.ads.googleads.v17.common.PriceOffering result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.header_ = header_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.description_ = description_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000004) != 0)) {
result.price_ = priceBuilder_ == null
? price_
: priceBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.unit_ = unit_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.finalUrl_ = finalUrl_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.finalMobileUrl_ = finalMobileUrl_;
}
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.common.PriceOffering) {
return mergeFrom((com.google.ads.googleads.v17.common.PriceOffering)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.ads.googleads.v17.common.PriceOffering other) {
if (other == com.google.ads.googleads.v17.common.PriceOffering.getDefaultInstance()) return this;
if (!other.getHeader().isEmpty()) {
header_ = other.header_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.hasPrice()) {
mergePrice(other.getPrice());
}
if (other.unit_ != 0) {
setUnitValue(other.getUnitValue());
}
if (!other.getFinalUrl().isEmpty()) {
finalUrl_ = other.finalUrl_;
bitField0_ |= 0x00000010;
onChanged();
}
if (!other.getFinalMobileUrl().isEmpty()) {
finalMobileUrl_ = other.finalMobileUrl_;
bitField0_ |= 0x00000020;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
header_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
description_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
input.readMessage(
getPriceFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 26
case 32: {
unit_ = input.readEnum();
bitField0_ |= 0x00000008;
break;
} // case 32
case 42: {
finalUrl_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000010;
break;
} // case 42
case 50: {
finalMobileUrl_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000020;
break;
} // case 50
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object header_ = "";
/**
*
* Required. The header of the price offering.
* The length of this string should be between 1 and 25, inclusive.
*
*
* string header = 1 [(.google.api.field_behavior) = REQUIRED];
* @return The header.
*/
public java.lang.String getHeader() {
java.lang.Object ref = header_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
header_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Required. The header of the price offering.
* The length of this string should be between 1 and 25, inclusive.
*
*
* string header = 1 [(.google.api.field_behavior) = REQUIRED];
* @return The bytes for header.
*/
public com.google.protobuf.ByteString
getHeaderBytes() {
java.lang.Object ref = header_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
header_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Required. The header of the price offering.
* The length of this string should be between 1 and 25, inclusive.
*
*
* string header = 1 [(.google.api.field_behavior) = REQUIRED];
* @param value The header to set.
* @return This builder for chaining.
*/
public Builder setHeader(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
header_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Required. The header of the price offering.
* The length of this string should be between 1 and 25, inclusive.
*
*
* string header = 1 [(.google.api.field_behavior) = REQUIRED];
* @return This builder for chaining.
*/
public Builder clearHeader() {
header_ = getDefaultInstance().getHeader();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* Required. The header of the price offering.
* The length of this string should be between 1 and 25, inclusive.
*
*
* string header = 1 [(.google.api.field_behavior) = REQUIRED];
* @param value The bytes for header to set.
* @return This builder for chaining.
*/
public Builder setHeaderBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
header_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object description_ = "";
/**
*
* Required. The description of the price offering.
* The length of this string should be between 1 and 25, inclusive.
*
*
* string description = 2 [(.google.api.field_behavior) = REQUIRED];
* @return The description.
*/
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Required. The description of the price offering.
* The length of this string should be between 1 and 25, inclusive.
*
*
* string description = 2 [(.google.api.field_behavior) = REQUIRED];
* @return The bytes for description.
*/
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Required. The description of the price offering.
* The length of this string should be between 1 and 25, inclusive.
*
*
* string description = 2 [(.google.api.field_behavior) = REQUIRED];
* @param value The description to set.
* @return This builder for chaining.
*/
public Builder setDescription(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
description_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Required. The description of the price offering.
* The length of this string should be between 1 and 25, inclusive.
*
*
* string description = 2 [(.google.api.field_behavior) = REQUIRED];
* @return This builder for chaining.
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
* Required. The description of the price offering.
* The length of this string should be between 1 and 25, inclusive.
*
*
* string description = 2 [(.google.api.field_behavior) = REQUIRED];
* @param value The bytes for description to set.
* @return This builder for chaining.
*/
public Builder setDescriptionBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
description_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private com.google.ads.googleads.v17.common.Money price_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.common.Money, com.google.ads.googleads.v17.common.Money.Builder, com.google.ads.googleads.v17.common.MoneyOrBuilder> priceBuilder_;
/**
*
* Required. The price value of the price offering.
*
*
* .google.ads.googleads.v17.common.Money price = 3 [(.google.api.field_behavior) = REQUIRED];
* @return Whether the price field is set.
*/
public boolean hasPrice() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Required. The price value of the price offering.
*
*
* .google.ads.googleads.v17.common.Money price = 3 [(.google.api.field_behavior) = REQUIRED];
* @return The price.
*/
public com.google.ads.googleads.v17.common.Money getPrice() {
if (priceBuilder_ == null) {
return price_ == null ? com.google.ads.googleads.v17.common.Money.getDefaultInstance() : price_;
} else {
return priceBuilder_.getMessage();
}
}
/**
*
* Required. The price value of the price offering.
*
*
* .google.ads.googleads.v17.common.Money price = 3 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder setPrice(com.google.ads.googleads.v17.common.Money value) {
if (priceBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
price_ = value;
} else {
priceBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Required. The price value of the price offering.
*
*
* .google.ads.googleads.v17.common.Money price = 3 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder setPrice(
com.google.ads.googleads.v17.common.Money.Builder builderForValue) {
if (priceBuilder_ == null) {
price_ = builderForValue.build();
} else {
priceBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Required. The price value of the price offering.
*
*
* .google.ads.googleads.v17.common.Money price = 3 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder mergePrice(com.google.ads.googleads.v17.common.Money value) {
if (priceBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0) &&
price_ != null &&
price_ != com.google.ads.googleads.v17.common.Money.getDefaultInstance()) {
getPriceBuilder().mergeFrom(value);
} else {
price_ = value;
}
} else {
priceBuilder_.mergeFrom(value);
}
if (price_ != null) {
bitField0_ |= 0x00000004;
onChanged();
}
return this;
}
/**
*
* Required. The price value of the price offering.
*
*
* .google.ads.googleads.v17.common.Money price = 3 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder clearPrice() {
bitField0_ = (bitField0_ & ~0x00000004);
price_ = null;
if (priceBuilder_ != null) {
priceBuilder_.dispose();
priceBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Required. The price value of the price offering.
*
*
* .google.ads.googleads.v17.common.Money price = 3 [(.google.api.field_behavior) = REQUIRED];
*/
public com.google.ads.googleads.v17.common.Money.Builder getPriceBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getPriceFieldBuilder().getBuilder();
}
/**
*
* Required. The price value of the price offering.
*
*
* .google.ads.googleads.v17.common.Money price = 3 [(.google.api.field_behavior) = REQUIRED];
*/
public com.google.ads.googleads.v17.common.MoneyOrBuilder getPriceOrBuilder() {
if (priceBuilder_ != null) {
return priceBuilder_.getMessageOrBuilder();
} else {
return price_ == null ?
com.google.ads.googleads.v17.common.Money.getDefaultInstance() : price_;
}
}
/**
*
* Required. The price value of the price offering.
*
*
* .google.ads.googleads.v17.common.Money price = 3 [(.google.api.field_behavior) = REQUIRED];
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.common.Money, com.google.ads.googleads.v17.common.Money.Builder, com.google.ads.googleads.v17.common.MoneyOrBuilder>
getPriceFieldBuilder() {
if (priceBuilder_ == null) {
priceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.common.Money, com.google.ads.googleads.v17.common.Money.Builder, com.google.ads.googleads.v17.common.MoneyOrBuilder>(
getPrice(),
getParentForChildren(),
isClean());
price_ = null;
}
return priceBuilder_;
}
private int unit_ = 0;
/**
*
* The price unit of the price offering.
*
*
* .google.ads.googleads.v17.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit unit = 4;
* @return The enum numeric value on the wire for unit.
*/
@java.lang.Override public int getUnitValue() {
return unit_;
}
/**
*
* The price unit of the price offering.
*
*
* .google.ads.googleads.v17.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit unit = 4;
* @param value The enum numeric value on the wire for unit to set.
* @return This builder for chaining.
*/
public Builder setUnitValue(int value) {
unit_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* The price unit of the price offering.
*
*
* .google.ads.googleads.v17.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit unit = 4;
* @return The unit.
*/
@java.lang.Override
public com.google.ads.googleads.v17.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit getUnit() {
com.google.ads.googleads.v17.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit result = com.google.ads.googleads.v17.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit.forNumber(unit_);
return result == null ? com.google.ads.googleads.v17.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit.UNRECOGNIZED : result;
}
/**
*
* The price unit of the price offering.
*
*
* .google.ads.googleads.v17.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit unit = 4;
* @param value The unit to set.
* @return This builder for chaining.
*/
public Builder setUnit(com.google.ads.googleads.v17.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000008;
unit_ = value.getNumber();
onChanged();
return this;
}
/**
*
* The price unit of the price offering.
*
*
* .google.ads.googleads.v17.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit unit = 4;
* @return This builder for chaining.
*/
public Builder clearUnit() {
bitField0_ = (bitField0_ & ~0x00000008);
unit_ = 0;
onChanged();
return this;
}
private java.lang.Object finalUrl_ = "";
/**
*
* Required. The final URL after all cross domain redirects.
*
*
* string final_url = 5 [(.google.api.field_behavior) = REQUIRED];
* @return The finalUrl.
*/
public java.lang.String getFinalUrl() {
java.lang.Object ref = finalUrl_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
finalUrl_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Required. The final URL after all cross domain redirects.
*
*
* string final_url = 5 [(.google.api.field_behavior) = REQUIRED];
* @return The bytes for finalUrl.
*/
public com.google.protobuf.ByteString
getFinalUrlBytes() {
java.lang.Object ref = finalUrl_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
finalUrl_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Required. The final URL after all cross domain redirects.
*
*
* string final_url = 5 [(.google.api.field_behavior) = REQUIRED];
* @param value The finalUrl to set.
* @return This builder for chaining.
*/
public Builder setFinalUrl(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
finalUrl_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* Required. The final URL after all cross domain redirects.
*
*
* string final_url = 5 [(.google.api.field_behavior) = REQUIRED];
* @return This builder for chaining.
*/
public Builder clearFinalUrl() {
finalUrl_ = getDefaultInstance().getFinalUrl();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
/**
*
* Required. The final URL after all cross domain redirects.
*
*
* string final_url = 5 [(.google.api.field_behavior) = REQUIRED];
* @param value The bytes for finalUrl to set.
* @return This builder for chaining.
*/
public Builder setFinalUrlBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
finalUrl_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
private java.lang.Object finalMobileUrl_ = "";
/**
*
* The final mobile URL after all cross domain redirects.
*
*
* string final_mobile_url = 6;
* @return The finalMobileUrl.
*/
public java.lang.String getFinalMobileUrl() {
java.lang.Object ref = finalMobileUrl_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
finalMobileUrl_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The final mobile URL after all cross domain redirects.
*
*
* string final_mobile_url = 6;
* @return The bytes for finalMobileUrl.
*/
public com.google.protobuf.ByteString
getFinalMobileUrlBytes() {
java.lang.Object ref = finalMobileUrl_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
finalMobileUrl_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The final mobile URL after all cross domain redirects.
*
*
* string final_mobile_url = 6;
* @param value The finalMobileUrl to set.
* @return This builder for chaining.
*/
public Builder setFinalMobileUrl(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
finalMobileUrl_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
* The final mobile URL after all cross domain redirects.
*
*
* string final_mobile_url = 6;
* @return This builder for chaining.
*/
public Builder clearFinalMobileUrl() {
finalMobileUrl_ = getDefaultInstance().getFinalMobileUrl();
bitField0_ = (bitField0_ & ~0x00000020);
onChanged();
return this;
}
/**
*
* The final mobile URL after all cross domain redirects.
*
*
* string final_mobile_url = 6;
* @param value The bytes for finalMobileUrl to set.
* @return This builder for chaining.
*/
public Builder setFinalMobileUrlBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
finalMobileUrl_ = value;
bitField0_ |= 0x00000020;
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.common.PriceOffering)
}
// @@protoc_insertion_point(class_scope:google.ads.googleads.v17.common.PriceOffering)
private static final com.google.ads.googleads.v17.common.PriceOffering DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.ads.googleads.v17.common.PriceOffering();
}
public static com.google.ads.googleads.v17.common.PriceOffering getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public PriceOffering 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.common.PriceOffering getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy