com.google.ads.googleads.v17.services.PlannableLocation 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/reach_plan_service.proto
// Protobuf Java Version: 3.25.3
package com.google.ads.googleads.v17.services;
/**
*
* A plannable location: country, metro region, province, etc.
*
*
* Protobuf type {@code google.ads.googleads.v17.services.PlannableLocation}
*/
public final class PlannableLocation extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.ads.googleads.v17.services.PlannableLocation)
PlannableLocationOrBuilder {
private static final long serialVersionUID = 0L;
// Use PlannableLocation.newBuilder() to construct.
private PlannableLocation(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private PlannableLocation() {
id_ = "";
name_ = "";
countryCode_ = "";
locationType_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new PlannableLocation();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.ads.googleads.v17.services.ReachPlanServiceProto.internal_static_google_ads_googleads_v17_services_PlannableLocation_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.ads.googleads.v17.services.ReachPlanServiceProto.internal_static_google_ads_googleads_v17_services_PlannableLocation_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ads.googleads.v17.services.PlannableLocation.class, com.google.ads.googleads.v17.services.PlannableLocation.Builder.class);
}
private int bitField0_;
public static final int ID_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private volatile java.lang.Object id_ = "";
/**
*
* The location identifier.
*
*
* optional string id = 4;
* @return Whether the id field is set.
*/
@java.lang.Override
public boolean hasId() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* The location identifier.
*
*
* optional string id = 4;
* @return The id.
*/
@java.lang.Override
public java.lang.String getId() {
java.lang.Object ref = id_;
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();
id_ = s;
return s;
}
}
/**
*
* The location identifier.
*
*
* optional string id = 4;
* @return The bytes for id.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int NAME_FIELD_NUMBER = 5;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
* The unique location name in English.
*
*
* optional string name = 5;
* @return Whether the name field is set.
*/
@java.lang.Override
public boolean hasName() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* The unique location name in English.
*
*
* optional string name = 5;
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
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();
name_ = s;
return s;
}
}
/**
*
* The unique location name in English.
*
*
* optional string name = 5;
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PARENT_COUNTRY_ID_FIELD_NUMBER = 6;
private long parentCountryId_ = 0L;
/**
*
* The parent country (not present if location is a country).
* If present, will always be a GeoTargetConstant ID. Additional information
* such as country name is provided by
* [ReachPlanService.ListPlannableLocations][google.ads.googleads.v17.services.ReachPlanService.ListPlannableLocations]
* or GoogleAdsService.Search/SearchStream.
*
*
* optional int64 parent_country_id = 6;
* @return Whether the parentCountryId field is set.
*/
@java.lang.Override
public boolean hasParentCountryId() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* The parent country (not present if location is a country).
* If present, will always be a GeoTargetConstant ID. Additional information
* such as country name is provided by
* [ReachPlanService.ListPlannableLocations][google.ads.googleads.v17.services.ReachPlanService.ListPlannableLocations]
* or GoogleAdsService.Search/SearchStream.
*
*
* optional int64 parent_country_id = 6;
* @return The parentCountryId.
*/
@java.lang.Override
public long getParentCountryId() {
return parentCountryId_;
}
public static final int COUNTRY_CODE_FIELD_NUMBER = 7;
@SuppressWarnings("serial")
private volatile java.lang.Object countryCode_ = "";
/**
*
* The ISO-3166-1 alpha-2 country code that is associated with the location.
*
*
* optional string country_code = 7;
* @return Whether the countryCode field is set.
*/
@java.lang.Override
public boolean hasCountryCode() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* The ISO-3166-1 alpha-2 country code that is associated with the location.
*
*
* optional string country_code = 7;
* @return The countryCode.
*/
@java.lang.Override
public java.lang.String getCountryCode() {
java.lang.Object ref = countryCode_;
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();
countryCode_ = s;
return s;
}
}
/**
*
* The ISO-3166-1 alpha-2 country code that is associated with the location.
*
*
* optional string country_code = 7;
* @return The bytes for countryCode.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getCountryCodeBytes() {
java.lang.Object ref = countryCode_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
countryCode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int LOCATION_TYPE_FIELD_NUMBER = 8;
@SuppressWarnings("serial")
private volatile java.lang.Object locationType_ = "";
/**
*
* The location's type. Location types correspond to target_type returned by
* searching location type in GoogleAdsService.Search/SearchStream.
*
*
* optional string location_type = 8;
* @return Whether the locationType field is set.
*/
@java.lang.Override
public boolean hasLocationType() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* The location's type. Location types correspond to target_type returned by
* searching location type in GoogleAdsService.Search/SearchStream.
*
*
* optional string location_type = 8;
* @return The locationType.
*/
@java.lang.Override
public java.lang.String getLocationType() {
java.lang.Object ref = locationType_;
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();
locationType_ = s;
return s;
}
}
/**
*
* The location's type. Location types correspond to target_type returned by
* searching location type in GoogleAdsService.Search/SearchStream.
*
*
* optional string location_type = 8;
* @return The bytes for locationType.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getLocationTypeBytes() {
java.lang.Object ref = locationType_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
locationType_ = 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 (((bitField0_ & 0x00000001) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, id_);
}
if (((bitField0_ & 0x00000002) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, name_);
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeInt64(6, parentCountryId_);
}
if (((bitField0_ & 0x00000008) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, countryCode_);
}
if (((bitField0_ & 0x00000010) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 8, locationType_);
}
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.GeneratedMessageV3.computeStringSize(4, id_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, name_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(6, parentCountryId_);
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, countryCode_);
}
if (((bitField0_ & 0x00000010) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, locationType_);
}
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.PlannableLocation)) {
return super.equals(obj);
}
com.google.ads.googleads.v17.services.PlannableLocation other = (com.google.ads.googleads.v17.services.PlannableLocation) obj;
if (hasId() != other.hasId()) return false;
if (hasId()) {
if (!getId()
.equals(other.getId())) return false;
}
if (hasName() != other.hasName()) return false;
if (hasName()) {
if (!getName()
.equals(other.getName())) return false;
}
if (hasParentCountryId() != other.hasParentCountryId()) return false;
if (hasParentCountryId()) {
if (getParentCountryId()
!= other.getParentCountryId()) return false;
}
if (hasCountryCode() != other.hasCountryCode()) return false;
if (hasCountryCode()) {
if (!getCountryCode()
.equals(other.getCountryCode())) return false;
}
if (hasLocationType() != other.hasLocationType()) return false;
if (hasLocationType()) {
if (!getLocationType()
.equals(other.getLocationType())) 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 (hasId()) {
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
}
if (hasName()) {
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
}
if (hasParentCountryId()) {
hash = (37 * hash) + PARENT_COUNTRY_ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getParentCountryId());
}
if (hasCountryCode()) {
hash = (37 * hash) + COUNTRY_CODE_FIELD_NUMBER;
hash = (53 * hash) + getCountryCode().hashCode();
}
if (hasLocationType()) {
hash = (37 * hash) + LOCATION_TYPE_FIELD_NUMBER;
hash = (53 * hash) + getLocationType().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.ads.googleads.v17.services.PlannableLocation parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.services.PlannableLocation 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.PlannableLocation parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.services.PlannableLocation 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.PlannableLocation parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.services.PlannableLocation 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.PlannableLocation 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.PlannableLocation 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.PlannableLocation 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.PlannableLocation 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.PlannableLocation 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.PlannableLocation 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.PlannableLocation 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 plannable location: country, metro region, province, etc.
*
*
* Protobuf type {@code google.ads.googleads.v17.services.PlannableLocation}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.ads.googleads.v17.services.PlannableLocation)
com.google.ads.googleads.v17.services.PlannableLocationOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.ads.googleads.v17.services.ReachPlanServiceProto.internal_static_google_ads_googleads_v17_services_PlannableLocation_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.ads.googleads.v17.services.ReachPlanServiceProto.internal_static_google_ads_googleads_v17_services_PlannableLocation_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ads.googleads.v17.services.PlannableLocation.class, com.google.ads.googleads.v17.services.PlannableLocation.Builder.class);
}
// Construct using com.google.ads.googleads.v17.services.PlannableLocation.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
id_ = "";
name_ = "";
parentCountryId_ = 0L;
countryCode_ = "";
locationType_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.ads.googleads.v17.services.ReachPlanServiceProto.internal_static_google_ads_googleads_v17_services_PlannableLocation_descriptor;
}
@java.lang.Override
public com.google.ads.googleads.v17.services.PlannableLocation getDefaultInstanceForType() {
return com.google.ads.googleads.v17.services.PlannableLocation.getDefaultInstance();
}
@java.lang.Override
public com.google.ads.googleads.v17.services.PlannableLocation build() {
com.google.ads.googleads.v17.services.PlannableLocation result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.ads.googleads.v17.services.PlannableLocation buildPartial() {
com.google.ads.googleads.v17.services.PlannableLocation result = new com.google.ads.googleads.v17.services.PlannableLocation(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.google.ads.googleads.v17.services.PlannableLocation result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.id_ = id_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.name_ = name_;
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.parentCountryId_ = parentCountryId_;
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.countryCode_ = countryCode_;
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.locationType_ = locationType_;
to_bitField0_ |= 0x00000010;
}
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.PlannableLocation) {
return mergeFrom((com.google.ads.googleads.v17.services.PlannableLocation)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.ads.googleads.v17.services.PlannableLocation other) {
if (other == com.google.ads.googleads.v17.services.PlannableLocation.getDefaultInstance()) return this;
if (other.hasId()) {
id_ = other.id_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasName()) {
name_ = other.name_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.hasParentCountryId()) {
setParentCountryId(other.getParentCountryId());
}
if (other.hasCountryCode()) {
countryCode_ = other.countryCode_;
bitField0_ |= 0x00000008;
onChanged();
}
if (other.hasLocationType()) {
locationType_ = other.locationType_;
bitField0_ |= 0x00000010;
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 34: {
id_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 34
case 42: {
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 42
case 48: {
parentCountryId_ = input.readInt64();
bitField0_ |= 0x00000004;
break;
} // case 48
case 58: {
countryCode_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000008;
break;
} // case 58
case 66: {
locationType_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000010;
break;
} // case 66
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object id_ = "";
/**
*
* The location identifier.
*
*
* optional string id = 4;
* @return Whether the id field is set.
*/
public boolean hasId() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* The location identifier.
*
*
* optional string id = 4;
* @return The id.
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The location identifier.
*
*
* optional string id = 4;
* @return The bytes for id.
*/
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The location identifier.
*
*
* optional string id = 4;
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
id_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* The location identifier.
*
*
* optional string id = 4;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* The location identifier.
*
*
* optional string id = 4;
* @param value The bytes for id to set.
* @return This builder for chaining.
*/
public Builder setIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
id_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object name_ = "";
/**
*
* The unique location name in English.
*
*
* optional string name = 5;
* @return Whether the name field is set.
*/
public boolean hasName() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* The unique location name in English.
*
*
* optional string name = 5;
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The unique location name in English.
*
*
* optional string name = 5;
* @return The bytes for name.
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The unique location name in English.
*
*
* optional string name = 5;
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
name_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* The unique location name in English.
*
*
* optional string name = 5;
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
* The unique location name in English.
*
*
* optional string name = 5;
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
name_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private long parentCountryId_ ;
/**
*
* The parent country (not present if location is a country).
* If present, will always be a GeoTargetConstant ID. Additional information
* such as country name is provided by
* [ReachPlanService.ListPlannableLocations][google.ads.googleads.v17.services.ReachPlanService.ListPlannableLocations]
* or GoogleAdsService.Search/SearchStream.
*
*
* optional int64 parent_country_id = 6;
* @return Whether the parentCountryId field is set.
*/
@java.lang.Override
public boolean hasParentCountryId() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* The parent country (not present if location is a country).
* If present, will always be a GeoTargetConstant ID. Additional information
* such as country name is provided by
* [ReachPlanService.ListPlannableLocations][google.ads.googleads.v17.services.ReachPlanService.ListPlannableLocations]
* or GoogleAdsService.Search/SearchStream.
*
*
* optional int64 parent_country_id = 6;
* @return The parentCountryId.
*/
@java.lang.Override
public long getParentCountryId() {
return parentCountryId_;
}
/**
*
* The parent country (not present if location is a country).
* If present, will always be a GeoTargetConstant ID. Additional information
* such as country name is provided by
* [ReachPlanService.ListPlannableLocations][google.ads.googleads.v17.services.ReachPlanService.ListPlannableLocations]
* or GoogleAdsService.Search/SearchStream.
*
*
* optional int64 parent_country_id = 6;
* @param value The parentCountryId to set.
* @return This builder for chaining.
*/
public Builder setParentCountryId(long value) {
parentCountryId_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* The parent country (not present if location is a country).
* If present, will always be a GeoTargetConstant ID. Additional information
* such as country name is provided by
* [ReachPlanService.ListPlannableLocations][google.ads.googleads.v17.services.ReachPlanService.ListPlannableLocations]
* or GoogleAdsService.Search/SearchStream.
*
*
* optional int64 parent_country_id = 6;
* @return This builder for chaining.
*/
public Builder clearParentCountryId() {
bitField0_ = (bitField0_ & ~0x00000004);
parentCountryId_ = 0L;
onChanged();
return this;
}
private java.lang.Object countryCode_ = "";
/**
*
* The ISO-3166-1 alpha-2 country code that is associated with the location.
*
*
* optional string country_code = 7;
* @return Whether the countryCode field is set.
*/
public boolean hasCountryCode() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* The ISO-3166-1 alpha-2 country code that is associated with the location.
*
*
* optional string country_code = 7;
* @return The countryCode.
*/
public java.lang.String getCountryCode() {
java.lang.Object ref = countryCode_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
countryCode_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The ISO-3166-1 alpha-2 country code that is associated with the location.
*
*
* optional string country_code = 7;
* @return The bytes for countryCode.
*/
public com.google.protobuf.ByteString
getCountryCodeBytes() {
java.lang.Object ref = countryCode_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
countryCode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The ISO-3166-1 alpha-2 country code that is associated with the location.
*
*
* optional string country_code = 7;
* @param value The countryCode to set.
* @return This builder for chaining.
*/
public Builder setCountryCode(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
countryCode_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* The ISO-3166-1 alpha-2 country code that is associated with the location.
*
*
* optional string country_code = 7;
* @return This builder for chaining.
*/
public Builder clearCountryCode() {
countryCode_ = getDefaultInstance().getCountryCode();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
*
* The ISO-3166-1 alpha-2 country code that is associated with the location.
*
*
* optional string country_code = 7;
* @param value The bytes for countryCode to set.
* @return This builder for chaining.
*/
public Builder setCountryCodeBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
countryCode_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
private java.lang.Object locationType_ = "";
/**
*
* The location's type. Location types correspond to target_type returned by
* searching location type in GoogleAdsService.Search/SearchStream.
*
*
* optional string location_type = 8;
* @return Whether the locationType field is set.
*/
public boolean hasLocationType() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* The location's type. Location types correspond to target_type returned by
* searching location type in GoogleAdsService.Search/SearchStream.
*
*
* optional string location_type = 8;
* @return The locationType.
*/
public java.lang.String getLocationType() {
java.lang.Object ref = locationType_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
locationType_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The location's type. Location types correspond to target_type returned by
* searching location type in GoogleAdsService.Search/SearchStream.
*
*
* optional string location_type = 8;
* @return The bytes for locationType.
*/
public com.google.protobuf.ByteString
getLocationTypeBytes() {
java.lang.Object ref = locationType_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
locationType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The location's type. Location types correspond to target_type returned by
* searching location type in GoogleAdsService.Search/SearchStream.
*
*
* optional string location_type = 8;
* @param value The locationType to set.
* @return This builder for chaining.
*/
public Builder setLocationType(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
locationType_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* The location's type. Location types correspond to target_type returned by
* searching location type in GoogleAdsService.Search/SearchStream.
*
*
* optional string location_type = 8;
* @return This builder for chaining.
*/
public Builder clearLocationType() {
locationType_ = getDefaultInstance().getLocationType();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
/**
*
* The location's type. Location types correspond to target_type returned by
* searching location type in GoogleAdsService.Search/SearchStream.
*
*
* optional string location_type = 8;
* @param value The bytes for locationType to set.
* @return This builder for chaining.
*/
public Builder setLocationTypeBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
locationType_ = value;
bitField0_ |= 0x00000010;
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.PlannableLocation)
}
// @@protoc_insertion_point(class_scope:google.ads.googleads.v17.services.PlannableLocation)
private static final com.google.ads.googleads.v17.services.PlannableLocation DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.ads.googleads.v17.services.PlannableLocation();
}
public static com.google.ads.googleads.v17.services.PlannableLocation getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public PlannableLocation 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.PlannableLocation getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy