com.google.ads.googleads.v17.common.PriceAsset 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;
/**
*
* An asset representing a list of price offers.
*
*
* Protobuf type {@code google.ads.googleads.v17.common.PriceAsset}
*/
public final class PriceAsset extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.ads.googleads.v17.common.PriceAsset)
PriceAssetOrBuilder {
private static final long serialVersionUID = 0L;
// Use PriceAsset.newBuilder() to construct.
private PriceAsset(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private PriceAsset() {
type_ = 0;
priceQualifier_ = 0;
languageCode_ = "";
priceOfferings_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new PriceAsset();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.ads.googleads.v17.common.AssetTypesProto.internal_static_google_ads_googleads_v17_common_PriceAsset_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_PriceAsset_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ads.googleads.v17.common.PriceAsset.class, com.google.ads.googleads.v17.common.PriceAsset.Builder.class);
}
public static final int TYPE_FIELD_NUMBER = 1;
private int type_ = 0;
/**
*
* Required. The type of the price asset.
*
*
* .google.ads.googleads.v17.enums.PriceExtensionTypeEnum.PriceExtensionType type = 1 [(.google.api.field_behavior) = REQUIRED];
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override public int getTypeValue() {
return type_;
}
/**
*
* Required. The type of the price asset.
*
*
* .google.ads.googleads.v17.enums.PriceExtensionTypeEnum.PriceExtensionType type = 1 [(.google.api.field_behavior) = REQUIRED];
* @return The type.
*/
@java.lang.Override public com.google.ads.googleads.v17.enums.PriceExtensionTypeEnum.PriceExtensionType getType() {
com.google.ads.googleads.v17.enums.PriceExtensionTypeEnum.PriceExtensionType result = com.google.ads.googleads.v17.enums.PriceExtensionTypeEnum.PriceExtensionType.forNumber(type_);
return result == null ? com.google.ads.googleads.v17.enums.PriceExtensionTypeEnum.PriceExtensionType.UNRECOGNIZED : result;
}
public static final int PRICE_QUALIFIER_FIELD_NUMBER = 2;
private int priceQualifier_ = 0;
/**
*
* The price qualifier of the price asset.
*
*
* .google.ads.googleads.v17.enums.PriceExtensionPriceQualifierEnum.PriceExtensionPriceQualifier price_qualifier = 2;
* @return The enum numeric value on the wire for priceQualifier.
*/
@java.lang.Override public int getPriceQualifierValue() {
return priceQualifier_;
}
/**
*
* The price qualifier of the price asset.
*
*
* .google.ads.googleads.v17.enums.PriceExtensionPriceQualifierEnum.PriceExtensionPriceQualifier price_qualifier = 2;
* @return The priceQualifier.
*/
@java.lang.Override public com.google.ads.googleads.v17.enums.PriceExtensionPriceQualifierEnum.PriceExtensionPriceQualifier getPriceQualifier() {
com.google.ads.googleads.v17.enums.PriceExtensionPriceQualifierEnum.PriceExtensionPriceQualifier result = com.google.ads.googleads.v17.enums.PriceExtensionPriceQualifierEnum.PriceExtensionPriceQualifier.forNumber(priceQualifier_);
return result == null ? com.google.ads.googleads.v17.enums.PriceExtensionPriceQualifierEnum.PriceExtensionPriceQualifier.UNRECOGNIZED : result;
}
public static final int LANGUAGE_CODE_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object languageCode_ = "";
/**
*
* Required. The language of the price asset.
* Represented as BCP 47 language tag.
*
*
* string language_code = 3 [(.google.api.field_behavior) = REQUIRED];
* @return The languageCode.
*/
@java.lang.Override
public java.lang.String getLanguageCode() {
java.lang.Object ref = languageCode_;
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();
languageCode_ = s;
return s;
}
}
/**
*
* Required. The language of the price asset.
* Represented as BCP 47 language tag.
*
*
* string language_code = 3 [(.google.api.field_behavior) = REQUIRED];
* @return The bytes for languageCode.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getLanguageCodeBytes() {
java.lang.Object ref = languageCode_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
languageCode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PRICE_OFFERINGS_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private java.util.List priceOfferings_;
/**
*
* The price offerings of the price asset.
* The size of this collection should be between 3 and 8, inclusive.
*
*
* repeated .google.ads.googleads.v17.common.PriceOffering price_offerings = 4;
*/
@java.lang.Override
public java.util.List getPriceOfferingsList() {
return priceOfferings_;
}
/**
*
* The price offerings of the price asset.
* The size of this collection should be between 3 and 8, inclusive.
*
*
* repeated .google.ads.googleads.v17.common.PriceOffering price_offerings = 4;
*/
@java.lang.Override
public java.util.List extends com.google.ads.googleads.v17.common.PriceOfferingOrBuilder>
getPriceOfferingsOrBuilderList() {
return priceOfferings_;
}
/**
*
* The price offerings of the price asset.
* The size of this collection should be between 3 and 8, inclusive.
*
*
* repeated .google.ads.googleads.v17.common.PriceOffering price_offerings = 4;
*/
@java.lang.Override
public int getPriceOfferingsCount() {
return priceOfferings_.size();
}
/**
*
* The price offerings of the price asset.
* The size of this collection should be between 3 and 8, inclusive.
*
*
* repeated .google.ads.googleads.v17.common.PriceOffering price_offerings = 4;
*/
@java.lang.Override
public com.google.ads.googleads.v17.common.PriceOffering getPriceOfferings(int index) {
return priceOfferings_.get(index);
}
/**
*
* The price offerings of the price asset.
* The size of this collection should be between 3 and 8, inclusive.
*
*
* repeated .google.ads.googleads.v17.common.PriceOffering price_offerings = 4;
*/
@java.lang.Override
public com.google.ads.googleads.v17.common.PriceOfferingOrBuilder getPriceOfferingsOrBuilder(
int index) {
return priceOfferings_.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 {
if (type_ != com.google.ads.googleads.v17.enums.PriceExtensionTypeEnum.PriceExtensionType.UNSPECIFIED.getNumber()) {
output.writeEnum(1, type_);
}
if (priceQualifier_ != com.google.ads.googleads.v17.enums.PriceExtensionPriceQualifierEnum.PriceExtensionPriceQualifier.UNSPECIFIED.getNumber()) {
output.writeEnum(2, priceQualifier_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, languageCode_);
}
for (int i = 0; i < priceOfferings_.size(); i++) {
output.writeMessage(4, priceOfferings_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (type_ != com.google.ads.googleads.v17.enums.PriceExtensionTypeEnum.PriceExtensionType.UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, type_);
}
if (priceQualifier_ != com.google.ads.googleads.v17.enums.PriceExtensionPriceQualifierEnum.PriceExtensionPriceQualifier.UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(2, priceQualifier_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, languageCode_);
}
for (int i = 0; i < priceOfferings_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, priceOfferings_.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.common.PriceAsset)) {
return super.equals(obj);
}
com.google.ads.googleads.v17.common.PriceAsset other = (com.google.ads.googleads.v17.common.PriceAsset) obj;
if (type_ != other.type_) return false;
if (priceQualifier_ != other.priceQualifier_) return false;
if (!getLanguageCode()
.equals(other.getLanguageCode())) return false;
if (!getPriceOfferingsList()
.equals(other.getPriceOfferingsList())) 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) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + type_;
hash = (37 * hash) + PRICE_QUALIFIER_FIELD_NUMBER;
hash = (53 * hash) + priceQualifier_;
hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER;
hash = (53 * hash) + getLanguageCode().hashCode();
if (getPriceOfferingsCount() > 0) {
hash = (37 * hash) + PRICE_OFFERINGS_FIELD_NUMBER;
hash = (53 * hash) + getPriceOfferingsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.ads.googleads.v17.common.PriceAsset parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.common.PriceAsset 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.PriceAsset parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.common.PriceAsset 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.PriceAsset parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.common.PriceAsset 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.PriceAsset 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.PriceAsset 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.PriceAsset 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.PriceAsset 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.PriceAsset 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.PriceAsset 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.PriceAsset 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;
}
/**
*
* An asset representing a list of price offers.
*
*
* Protobuf type {@code google.ads.googleads.v17.common.PriceAsset}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.ads.googleads.v17.common.PriceAsset)
com.google.ads.googleads.v17.common.PriceAssetOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.ads.googleads.v17.common.AssetTypesProto.internal_static_google_ads_googleads_v17_common_PriceAsset_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_PriceAsset_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ads.googleads.v17.common.PriceAsset.class, com.google.ads.googleads.v17.common.PriceAsset.Builder.class);
}
// Construct using com.google.ads.googleads.v17.common.PriceAsset.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
type_ = 0;
priceQualifier_ = 0;
languageCode_ = "";
if (priceOfferingsBuilder_ == null) {
priceOfferings_ = java.util.Collections.emptyList();
} else {
priceOfferings_ = null;
priceOfferingsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
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_PriceAsset_descriptor;
}
@java.lang.Override
public com.google.ads.googleads.v17.common.PriceAsset getDefaultInstanceForType() {
return com.google.ads.googleads.v17.common.PriceAsset.getDefaultInstance();
}
@java.lang.Override
public com.google.ads.googleads.v17.common.PriceAsset build() {
com.google.ads.googleads.v17.common.PriceAsset result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.ads.googleads.v17.common.PriceAsset buildPartial() {
com.google.ads.googleads.v17.common.PriceAsset result = new com.google.ads.googleads.v17.common.PriceAsset(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.google.ads.googleads.v17.common.PriceAsset result) {
if (priceOfferingsBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0)) {
priceOfferings_ = java.util.Collections.unmodifiableList(priceOfferings_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.priceOfferings_ = priceOfferings_;
} else {
result.priceOfferings_ = priceOfferingsBuilder_.build();
}
}
private void buildPartial0(com.google.ads.googleads.v17.common.PriceAsset result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.type_ = type_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.priceQualifier_ = priceQualifier_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.languageCode_ = languageCode_;
}
}
@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.PriceAsset) {
return mergeFrom((com.google.ads.googleads.v17.common.PriceAsset)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.ads.googleads.v17.common.PriceAsset other) {
if (other == com.google.ads.googleads.v17.common.PriceAsset.getDefaultInstance()) return this;
if (other.type_ != 0) {
setTypeValue(other.getTypeValue());
}
if (other.priceQualifier_ != 0) {
setPriceQualifierValue(other.getPriceQualifierValue());
}
if (!other.getLanguageCode().isEmpty()) {
languageCode_ = other.languageCode_;
bitField0_ |= 0x00000004;
onChanged();
}
if (priceOfferingsBuilder_ == null) {
if (!other.priceOfferings_.isEmpty()) {
if (priceOfferings_.isEmpty()) {
priceOfferings_ = other.priceOfferings_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensurePriceOfferingsIsMutable();
priceOfferings_.addAll(other.priceOfferings_);
}
onChanged();
}
} else {
if (!other.priceOfferings_.isEmpty()) {
if (priceOfferingsBuilder_.isEmpty()) {
priceOfferingsBuilder_.dispose();
priceOfferingsBuilder_ = null;
priceOfferings_ = other.priceOfferings_;
bitField0_ = (bitField0_ & ~0x00000008);
priceOfferingsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getPriceOfferingsFieldBuilder() : null;
} else {
priceOfferingsBuilder_.addAllMessages(other.priceOfferings_);
}
}
}
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 8: {
type_ = input.readEnum();
bitField0_ |= 0x00000001;
break;
} // case 8
case 16: {
priceQualifier_ = input.readEnum();
bitField0_ |= 0x00000002;
break;
} // case 16
case 26: {
languageCode_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 34: {
com.google.ads.googleads.v17.common.PriceOffering m =
input.readMessage(
com.google.ads.googleads.v17.common.PriceOffering.parser(),
extensionRegistry);
if (priceOfferingsBuilder_ == null) {
ensurePriceOfferingsIsMutable();
priceOfferings_.add(m);
} else {
priceOfferingsBuilder_.addMessage(m);
}
break;
} // case 34
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 int type_ = 0;
/**
*
* Required. The type of the price asset.
*
*
* .google.ads.googleads.v17.enums.PriceExtensionTypeEnum.PriceExtensionType type = 1 [(.google.api.field_behavior) = REQUIRED];
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override public int getTypeValue() {
return type_;
}
/**
*
* Required. The type of the price asset.
*
*
* .google.ads.googleads.v17.enums.PriceExtensionTypeEnum.PriceExtensionType type = 1 [(.google.api.field_behavior) = REQUIRED];
* @param value The enum numeric value on the wire for type to set.
* @return This builder for chaining.
*/
public Builder setTypeValue(int value) {
type_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Required. The type of the price asset.
*
*
* .google.ads.googleads.v17.enums.PriceExtensionTypeEnum.PriceExtensionType type = 1 [(.google.api.field_behavior) = REQUIRED];
* @return The type.
*/
@java.lang.Override
public com.google.ads.googleads.v17.enums.PriceExtensionTypeEnum.PriceExtensionType getType() {
com.google.ads.googleads.v17.enums.PriceExtensionTypeEnum.PriceExtensionType result = com.google.ads.googleads.v17.enums.PriceExtensionTypeEnum.PriceExtensionType.forNumber(type_);
return result == null ? com.google.ads.googleads.v17.enums.PriceExtensionTypeEnum.PriceExtensionType.UNRECOGNIZED : result;
}
/**
*
* Required. The type of the price asset.
*
*
* .google.ads.googleads.v17.enums.PriceExtensionTypeEnum.PriceExtensionType type = 1 [(.google.api.field_behavior) = REQUIRED];
* @param value The type to set.
* @return This builder for chaining.
*/
public Builder setType(com.google.ads.googleads.v17.enums.PriceExtensionTypeEnum.PriceExtensionType value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
type_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Required. The type of the price asset.
*
*
* .google.ads.googleads.v17.enums.PriceExtensionTypeEnum.PriceExtensionType type = 1 [(.google.api.field_behavior) = REQUIRED];
* @return This builder for chaining.
*/
public Builder clearType() {
bitField0_ = (bitField0_ & ~0x00000001);
type_ = 0;
onChanged();
return this;
}
private int priceQualifier_ = 0;
/**
*
* The price qualifier of the price asset.
*
*
* .google.ads.googleads.v17.enums.PriceExtensionPriceQualifierEnum.PriceExtensionPriceQualifier price_qualifier = 2;
* @return The enum numeric value on the wire for priceQualifier.
*/
@java.lang.Override public int getPriceQualifierValue() {
return priceQualifier_;
}
/**
*
* The price qualifier of the price asset.
*
*
* .google.ads.googleads.v17.enums.PriceExtensionPriceQualifierEnum.PriceExtensionPriceQualifier price_qualifier = 2;
* @param value The enum numeric value on the wire for priceQualifier to set.
* @return This builder for chaining.
*/
public Builder setPriceQualifierValue(int value) {
priceQualifier_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* The price qualifier of the price asset.
*
*
* .google.ads.googleads.v17.enums.PriceExtensionPriceQualifierEnum.PriceExtensionPriceQualifier price_qualifier = 2;
* @return The priceQualifier.
*/
@java.lang.Override
public com.google.ads.googleads.v17.enums.PriceExtensionPriceQualifierEnum.PriceExtensionPriceQualifier getPriceQualifier() {
com.google.ads.googleads.v17.enums.PriceExtensionPriceQualifierEnum.PriceExtensionPriceQualifier result = com.google.ads.googleads.v17.enums.PriceExtensionPriceQualifierEnum.PriceExtensionPriceQualifier.forNumber(priceQualifier_);
return result == null ? com.google.ads.googleads.v17.enums.PriceExtensionPriceQualifierEnum.PriceExtensionPriceQualifier.UNRECOGNIZED : result;
}
/**
*
* The price qualifier of the price asset.
*
*
* .google.ads.googleads.v17.enums.PriceExtensionPriceQualifierEnum.PriceExtensionPriceQualifier price_qualifier = 2;
* @param value The priceQualifier to set.
* @return This builder for chaining.
*/
public Builder setPriceQualifier(com.google.ads.googleads.v17.enums.PriceExtensionPriceQualifierEnum.PriceExtensionPriceQualifier value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
priceQualifier_ = value.getNumber();
onChanged();
return this;
}
/**
*
* The price qualifier of the price asset.
*
*
* .google.ads.googleads.v17.enums.PriceExtensionPriceQualifierEnum.PriceExtensionPriceQualifier price_qualifier = 2;
* @return This builder for chaining.
*/
public Builder clearPriceQualifier() {
bitField0_ = (bitField0_ & ~0x00000002);
priceQualifier_ = 0;
onChanged();
return this;
}
private java.lang.Object languageCode_ = "";
/**
*
* Required. The language of the price asset.
* Represented as BCP 47 language tag.
*
*
* string language_code = 3 [(.google.api.field_behavior) = REQUIRED];
* @return The languageCode.
*/
public java.lang.String getLanguageCode() {
java.lang.Object ref = languageCode_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
languageCode_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Required. The language of the price asset.
* Represented as BCP 47 language tag.
*
*
* string language_code = 3 [(.google.api.field_behavior) = REQUIRED];
* @return The bytes for languageCode.
*/
public com.google.protobuf.ByteString
getLanguageCodeBytes() {
java.lang.Object ref = languageCode_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
languageCode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Required. The language of the price asset.
* Represented as BCP 47 language tag.
*
*
* string language_code = 3 [(.google.api.field_behavior) = REQUIRED];
* @param value The languageCode to set.
* @return This builder for chaining.
*/
public Builder setLanguageCode(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
languageCode_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Required. The language of the price asset.
* Represented as BCP 47 language tag.
*
*
* string language_code = 3 [(.google.api.field_behavior) = REQUIRED];
* @return This builder for chaining.
*/
public Builder clearLanguageCode() {
languageCode_ = getDefaultInstance().getLanguageCode();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
* Required. The language of the price asset.
* Represented as BCP 47 language tag.
*
*
* string language_code = 3 [(.google.api.field_behavior) = REQUIRED];
* @param value The bytes for languageCode to set.
* @return This builder for chaining.
*/
public Builder setLanguageCodeBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
languageCode_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private java.util.List priceOfferings_ =
java.util.Collections.emptyList();
private void ensurePriceOfferingsIsMutable() {
if (!((bitField0_ & 0x00000008) != 0)) {
priceOfferings_ = new java.util.ArrayList(priceOfferings_);
bitField0_ |= 0x00000008;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.ads.googleads.v17.common.PriceOffering, com.google.ads.googleads.v17.common.PriceOffering.Builder, com.google.ads.googleads.v17.common.PriceOfferingOrBuilder> priceOfferingsBuilder_;
/**
*
* The price offerings of the price asset.
* The size of this collection should be between 3 and 8, inclusive.
*
*
* repeated .google.ads.googleads.v17.common.PriceOffering price_offerings = 4;
*/
public java.util.List getPriceOfferingsList() {
if (priceOfferingsBuilder_ == null) {
return java.util.Collections.unmodifiableList(priceOfferings_);
} else {
return priceOfferingsBuilder_.getMessageList();
}
}
/**
*
* The price offerings of the price asset.
* The size of this collection should be between 3 and 8, inclusive.
*
*
* repeated .google.ads.googleads.v17.common.PriceOffering price_offerings = 4;
*/
public int getPriceOfferingsCount() {
if (priceOfferingsBuilder_ == null) {
return priceOfferings_.size();
} else {
return priceOfferingsBuilder_.getCount();
}
}
/**
*
* The price offerings of the price asset.
* The size of this collection should be between 3 and 8, inclusive.
*
*
* repeated .google.ads.googleads.v17.common.PriceOffering price_offerings = 4;
*/
public com.google.ads.googleads.v17.common.PriceOffering getPriceOfferings(int index) {
if (priceOfferingsBuilder_ == null) {
return priceOfferings_.get(index);
} else {
return priceOfferingsBuilder_.getMessage(index);
}
}
/**
*
* The price offerings of the price asset.
* The size of this collection should be between 3 and 8, inclusive.
*
*
* repeated .google.ads.googleads.v17.common.PriceOffering price_offerings = 4;
*/
public Builder setPriceOfferings(
int index, com.google.ads.googleads.v17.common.PriceOffering value) {
if (priceOfferingsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePriceOfferingsIsMutable();
priceOfferings_.set(index, value);
onChanged();
} else {
priceOfferingsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* The price offerings of the price asset.
* The size of this collection should be between 3 and 8, inclusive.
*
*
* repeated .google.ads.googleads.v17.common.PriceOffering price_offerings = 4;
*/
public Builder setPriceOfferings(
int index, com.google.ads.googleads.v17.common.PriceOffering.Builder builderForValue) {
if (priceOfferingsBuilder_ == null) {
ensurePriceOfferingsIsMutable();
priceOfferings_.set(index, builderForValue.build());
onChanged();
} else {
priceOfferingsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The price offerings of the price asset.
* The size of this collection should be between 3 and 8, inclusive.
*
*
* repeated .google.ads.googleads.v17.common.PriceOffering price_offerings = 4;
*/
public Builder addPriceOfferings(com.google.ads.googleads.v17.common.PriceOffering value) {
if (priceOfferingsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePriceOfferingsIsMutable();
priceOfferings_.add(value);
onChanged();
} else {
priceOfferingsBuilder_.addMessage(value);
}
return this;
}
/**
*
* The price offerings of the price asset.
* The size of this collection should be between 3 and 8, inclusive.
*
*
* repeated .google.ads.googleads.v17.common.PriceOffering price_offerings = 4;
*/
public Builder addPriceOfferings(
int index, com.google.ads.googleads.v17.common.PriceOffering value) {
if (priceOfferingsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePriceOfferingsIsMutable();
priceOfferings_.add(index, value);
onChanged();
} else {
priceOfferingsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* The price offerings of the price asset.
* The size of this collection should be between 3 and 8, inclusive.
*
*
* repeated .google.ads.googleads.v17.common.PriceOffering price_offerings = 4;
*/
public Builder addPriceOfferings(
com.google.ads.googleads.v17.common.PriceOffering.Builder builderForValue) {
if (priceOfferingsBuilder_ == null) {
ensurePriceOfferingsIsMutable();
priceOfferings_.add(builderForValue.build());
onChanged();
} else {
priceOfferingsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* The price offerings of the price asset.
* The size of this collection should be between 3 and 8, inclusive.
*
*
* repeated .google.ads.googleads.v17.common.PriceOffering price_offerings = 4;
*/
public Builder addPriceOfferings(
int index, com.google.ads.googleads.v17.common.PriceOffering.Builder builderForValue) {
if (priceOfferingsBuilder_ == null) {
ensurePriceOfferingsIsMutable();
priceOfferings_.add(index, builderForValue.build());
onChanged();
} else {
priceOfferingsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The price offerings of the price asset.
* The size of this collection should be between 3 and 8, inclusive.
*
*
* repeated .google.ads.googleads.v17.common.PriceOffering price_offerings = 4;
*/
public Builder addAllPriceOfferings(
java.lang.Iterable extends com.google.ads.googleads.v17.common.PriceOffering> values) {
if (priceOfferingsBuilder_ == null) {
ensurePriceOfferingsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, priceOfferings_);
onChanged();
} else {
priceOfferingsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* The price offerings of the price asset.
* The size of this collection should be between 3 and 8, inclusive.
*
*
* repeated .google.ads.googleads.v17.common.PriceOffering price_offerings = 4;
*/
public Builder clearPriceOfferings() {
if (priceOfferingsBuilder_ == null) {
priceOfferings_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
} else {
priceOfferingsBuilder_.clear();
}
return this;
}
/**
*
* The price offerings of the price asset.
* The size of this collection should be between 3 and 8, inclusive.
*
*
* repeated .google.ads.googleads.v17.common.PriceOffering price_offerings = 4;
*/
public Builder removePriceOfferings(int index) {
if (priceOfferingsBuilder_ == null) {
ensurePriceOfferingsIsMutable();
priceOfferings_.remove(index);
onChanged();
} else {
priceOfferingsBuilder_.remove(index);
}
return this;
}
/**
*
* The price offerings of the price asset.
* The size of this collection should be between 3 and 8, inclusive.
*
*
* repeated .google.ads.googleads.v17.common.PriceOffering price_offerings = 4;
*/
public com.google.ads.googleads.v17.common.PriceOffering.Builder getPriceOfferingsBuilder(
int index) {
return getPriceOfferingsFieldBuilder().getBuilder(index);
}
/**
*
* The price offerings of the price asset.
* The size of this collection should be between 3 and 8, inclusive.
*
*
* repeated .google.ads.googleads.v17.common.PriceOffering price_offerings = 4;
*/
public com.google.ads.googleads.v17.common.PriceOfferingOrBuilder getPriceOfferingsOrBuilder(
int index) {
if (priceOfferingsBuilder_ == null) {
return priceOfferings_.get(index); } else {
return priceOfferingsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* The price offerings of the price asset.
* The size of this collection should be between 3 and 8, inclusive.
*
*
* repeated .google.ads.googleads.v17.common.PriceOffering price_offerings = 4;
*/
public java.util.List extends com.google.ads.googleads.v17.common.PriceOfferingOrBuilder>
getPriceOfferingsOrBuilderList() {
if (priceOfferingsBuilder_ != null) {
return priceOfferingsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(priceOfferings_);
}
}
/**
*
* The price offerings of the price asset.
* The size of this collection should be between 3 and 8, inclusive.
*
*
* repeated .google.ads.googleads.v17.common.PriceOffering price_offerings = 4;
*/
public com.google.ads.googleads.v17.common.PriceOffering.Builder addPriceOfferingsBuilder() {
return getPriceOfferingsFieldBuilder().addBuilder(
com.google.ads.googleads.v17.common.PriceOffering.getDefaultInstance());
}
/**
*
* The price offerings of the price asset.
* The size of this collection should be between 3 and 8, inclusive.
*
*
* repeated .google.ads.googleads.v17.common.PriceOffering price_offerings = 4;
*/
public com.google.ads.googleads.v17.common.PriceOffering.Builder addPriceOfferingsBuilder(
int index) {
return getPriceOfferingsFieldBuilder().addBuilder(
index, com.google.ads.googleads.v17.common.PriceOffering.getDefaultInstance());
}
/**
*
* The price offerings of the price asset.
* The size of this collection should be between 3 and 8, inclusive.
*
*
* repeated .google.ads.googleads.v17.common.PriceOffering price_offerings = 4;
*/
public java.util.List
getPriceOfferingsBuilderList() {
return getPriceOfferingsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.ads.googleads.v17.common.PriceOffering, com.google.ads.googleads.v17.common.PriceOffering.Builder, com.google.ads.googleads.v17.common.PriceOfferingOrBuilder>
getPriceOfferingsFieldBuilder() {
if (priceOfferingsBuilder_ == null) {
priceOfferingsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.ads.googleads.v17.common.PriceOffering, com.google.ads.googleads.v17.common.PriceOffering.Builder, com.google.ads.googleads.v17.common.PriceOfferingOrBuilder>(
priceOfferings_,
((bitField0_ & 0x00000008) != 0),
getParentForChildren(),
isClean());
priceOfferings_ = null;
}
return priceOfferingsBuilder_;
}
@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.PriceAsset)
}
// @@protoc_insertion_point(class_scope:google.ads.googleads.v17.common.PriceAsset)
private static final com.google.ads.googleads.v17.common.PriceAsset DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.ads.googleads.v17.common.PriceAsset();
}
public static com.google.ads.googleads.v17.common.PriceAsset getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public PriceAsset 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.PriceAsset getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy