com.google.ads.googleads.v17.resources.FeedItemTarget 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/resources/feed_item_target.proto
// Protobuf Java Version: 3.25.3
package com.google.ads.googleads.v17.resources;
/**
*
* A feed item target.
*
*
* Protobuf type {@code google.ads.googleads.v17.resources.FeedItemTarget}
*/
public final class FeedItemTarget extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.ads.googleads.v17.resources.FeedItemTarget)
FeedItemTargetOrBuilder {
private static final long serialVersionUID = 0L;
// Use FeedItemTarget.newBuilder() to construct.
private FeedItemTarget(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private FeedItemTarget() {
resourceName_ = "";
feedItem_ = "";
feedItemTargetType_ = 0;
status_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new FeedItemTarget();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.ads.googleads.v17.resources.FeedItemTargetProto.internal_static_google_ads_googleads_v17_resources_FeedItemTarget_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.ads.googleads.v17.resources.FeedItemTargetProto.internal_static_google_ads_googleads_v17_resources_FeedItemTarget_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ads.googleads.v17.resources.FeedItemTarget.class, com.google.ads.googleads.v17.resources.FeedItemTarget.Builder.class);
}
private int bitField0_;
private int targetCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object target_;
public enum TargetCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
CAMPAIGN(14),
AD_GROUP(15),
KEYWORD(7),
GEO_TARGET_CONSTANT(16),
DEVICE(9),
AD_SCHEDULE(10),
TARGET_NOT_SET(0);
private final int value;
private TargetCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static TargetCase valueOf(int value) {
return forNumber(value);
}
public static TargetCase forNumber(int value) {
switch (value) {
case 14: return CAMPAIGN;
case 15: return AD_GROUP;
case 7: return KEYWORD;
case 16: return GEO_TARGET_CONSTANT;
case 9: return DEVICE;
case 10: return AD_SCHEDULE;
case 0: return TARGET_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public TargetCase
getTargetCase() {
return TargetCase.forNumber(
targetCase_);
}
public static final int RESOURCE_NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object resourceName_ = "";
/**
*
* Immutable. The resource name of the feed item target.
* Feed item target resource names have the form:
* `customers/{customer_id}/feedItemTargets/{feed_id}~{feed_item_id}~{feed_item_target_type}~{feed_item_target_id}`
*
*
* string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return The resourceName.
*/
@java.lang.Override
public java.lang.String getResourceName() {
java.lang.Object ref = resourceName_;
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();
resourceName_ = s;
return s;
}
}
/**
*
* Immutable. The resource name of the feed item target.
* Feed item target resource names have the form:
* `customers/{customer_id}/feedItemTargets/{feed_id}~{feed_item_id}~{feed_item_target_type}~{feed_item_target_id}`
*
*
* string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return The bytes for resourceName.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getResourceNameBytes() {
java.lang.Object ref = resourceName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
resourceName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int FEED_ITEM_FIELD_NUMBER = 12;
@SuppressWarnings("serial")
private volatile java.lang.Object feedItem_ = "";
/**
*
* Immutable. The feed item to which this feed item target belongs.
*
*
* optional string feed_item = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return Whether the feedItem field is set.
*/
@java.lang.Override
public boolean hasFeedItem() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Immutable. The feed item to which this feed item target belongs.
*
*
* optional string feed_item = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return The feedItem.
*/
@java.lang.Override
public java.lang.String getFeedItem() {
java.lang.Object ref = feedItem_;
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();
feedItem_ = s;
return s;
}
}
/**
*
* Immutable. The feed item to which this feed item target belongs.
*
*
* optional string feed_item = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return The bytes for feedItem.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getFeedItemBytes() {
java.lang.Object ref = feedItem_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
feedItem_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int FEED_ITEM_TARGET_TYPE_FIELD_NUMBER = 3;
private int feedItemTargetType_ = 0;
/**
*
* Output only. The target type of this feed item target. This field is
* read-only.
*
*
* .google.ads.googleads.v17.enums.FeedItemTargetTypeEnum.FeedItemTargetType feed_item_target_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return The enum numeric value on the wire for feedItemTargetType.
*/
@java.lang.Override public int getFeedItemTargetTypeValue() {
return feedItemTargetType_;
}
/**
*
* Output only. The target type of this feed item target. This field is
* read-only.
*
*
* .google.ads.googleads.v17.enums.FeedItemTargetTypeEnum.FeedItemTargetType feed_item_target_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return The feedItemTargetType.
*/
@java.lang.Override public com.google.ads.googleads.v17.enums.FeedItemTargetTypeEnum.FeedItemTargetType getFeedItemTargetType() {
com.google.ads.googleads.v17.enums.FeedItemTargetTypeEnum.FeedItemTargetType result = com.google.ads.googleads.v17.enums.FeedItemTargetTypeEnum.FeedItemTargetType.forNumber(feedItemTargetType_);
return result == null ? com.google.ads.googleads.v17.enums.FeedItemTargetTypeEnum.FeedItemTargetType.UNRECOGNIZED : result;
}
public static final int FEED_ITEM_TARGET_ID_FIELD_NUMBER = 13;
private long feedItemTargetId_ = 0L;
/**
*
* Output only. The ID of the targeted resource. This field is read-only.
*
*
* optional int64 feed_item_target_id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return Whether the feedItemTargetId field is set.
*/
@java.lang.Override
public boolean hasFeedItemTargetId() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Output only. The ID of the targeted resource. This field is read-only.
*
*
* optional int64 feed_item_target_id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return The feedItemTargetId.
*/
@java.lang.Override
public long getFeedItemTargetId() {
return feedItemTargetId_;
}
public static final int STATUS_FIELD_NUMBER = 11;
private int status_ = 0;
/**
*
* Output only. Status of the feed item target.
* This field is read-only.
*
*
* .google.ads.googleads.v17.enums.FeedItemTargetStatusEnum.FeedItemTargetStatus status = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return The enum numeric value on the wire for status.
*/
@java.lang.Override public int getStatusValue() {
return status_;
}
/**
*
* Output only. Status of the feed item target.
* This field is read-only.
*
*
* .google.ads.googleads.v17.enums.FeedItemTargetStatusEnum.FeedItemTargetStatus status = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return The status.
*/
@java.lang.Override public com.google.ads.googleads.v17.enums.FeedItemTargetStatusEnum.FeedItemTargetStatus getStatus() {
com.google.ads.googleads.v17.enums.FeedItemTargetStatusEnum.FeedItemTargetStatus result = com.google.ads.googleads.v17.enums.FeedItemTargetStatusEnum.FeedItemTargetStatus.forNumber(status_);
return result == null ? com.google.ads.googleads.v17.enums.FeedItemTargetStatusEnum.FeedItemTargetStatus.UNRECOGNIZED : result;
}
public static final int CAMPAIGN_FIELD_NUMBER = 14;
/**
*
* Immutable. The targeted campaign.
*
*
* string campaign = 14 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return Whether the campaign field is set.
*/
public boolean hasCampaign() {
return targetCase_ == 14;
}
/**
*
* Immutable. The targeted campaign.
*
*
* string campaign = 14 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return The campaign.
*/
public java.lang.String getCampaign() {
java.lang.Object ref = "";
if (targetCase_ == 14) {
ref = target_;
}
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();
if (targetCase_ == 14) {
target_ = s;
}
return s;
}
}
/**
*
* Immutable. The targeted campaign.
*
*
* string campaign = 14 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return The bytes for campaign.
*/
public com.google.protobuf.ByteString
getCampaignBytes() {
java.lang.Object ref = "";
if (targetCase_ == 14) {
ref = target_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (targetCase_ == 14) {
target_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int AD_GROUP_FIELD_NUMBER = 15;
/**
*
* Immutable. The targeted ad group.
*
*
* string ad_group = 15 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return Whether the adGroup field is set.
*/
public boolean hasAdGroup() {
return targetCase_ == 15;
}
/**
*
* Immutable. The targeted ad group.
*
*
* string ad_group = 15 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return The adGroup.
*/
public java.lang.String getAdGroup() {
java.lang.Object ref = "";
if (targetCase_ == 15) {
ref = target_;
}
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();
if (targetCase_ == 15) {
target_ = s;
}
return s;
}
}
/**
*
* Immutable. The targeted ad group.
*
*
* string ad_group = 15 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return The bytes for adGroup.
*/
public com.google.protobuf.ByteString
getAdGroupBytes() {
java.lang.Object ref = "";
if (targetCase_ == 15) {
ref = target_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (targetCase_ == 15) {
target_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int KEYWORD_FIELD_NUMBER = 7;
/**
*
* Immutable. The targeted keyword.
*
*
* .google.ads.googleads.v17.common.KeywordInfo keyword = 7 [(.google.api.field_behavior) = IMMUTABLE];
* @return Whether the keyword field is set.
*/
@java.lang.Override
public boolean hasKeyword() {
return targetCase_ == 7;
}
/**
*
* Immutable. The targeted keyword.
*
*
* .google.ads.googleads.v17.common.KeywordInfo keyword = 7 [(.google.api.field_behavior) = IMMUTABLE];
* @return The keyword.
*/
@java.lang.Override
public com.google.ads.googleads.v17.common.KeywordInfo getKeyword() {
if (targetCase_ == 7) {
return (com.google.ads.googleads.v17.common.KeywordInfo) target_;
}
return com.google.ads.googleads.v17.common.KeywordInfo.getDefaultInstance();
}
/**
*
* Immutable. The targeted keyword.
*
*
* .google.ads.googleads.v17.common.KeywordInfo keyword = 7 [(.google.api.field_behavior) = IMMUTABLE];
*/
@java.lang.Override
public com.google.ads.googleads.v17.common.KeywordInfoOrBuilder getKeywordOrBuilder() {
if (targetCase_ == 7) {
return (com.google.ads.googleads.v17.common.KeywordInfo) target_;
}
return com.google.ads.googleads.v17.common.KeywordInfo.getDefaultInstance();
}
public static final int GEO_TARGET_CONSTANT_FIELD_NUMBER = 16;
/**
*
* Immutable. The targeted geo target constant resource name.
*
*
* string geo_target_constant = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return Whether the geoTargetConstant field is set.
*/
public boolean hasGeoTargetConstant() {
return targetCase_ == 16;
}
/**
*
* Immutable. The targeted geo target constant resource name.
*
*
* string geo_target_constant = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return The geoTargetConstant.
*/
public java.lang.String getGeoTargetConstant() {
java.lang.Object ref = "";
if (targetCase_ == 16) {
ref = target_;
}
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();
if (targetCase_ == 16) {
target_ = s;
}
return s;
}
}
/**
*
* Immutable. The targeted geo target constant resource name.
*
*
* string geo_target_constant = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return The bytes for geoTargetConstant.
*/
public com.google.protobuf.ByteString
getGeoTargetConstantBytes() {
java.lang.Object ref = "";
if (targetCase_ == 16) {
ref = target_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (targetCase_ == 16) {
target_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DEVICE_FIELD_NUMBER = 9;
/**
*
* Immutable. The targeted device.
*
*
* .google.ads.googleads.v17.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice device = 9 [(.google.api.field_behavior) = IMMUTABLE];
* @return Whether the device field is set.
*/
public boolean hasDevice() {
return targetCase_ == 9;
}
/**
*
* Immutable. The targeted device.
*
*
* .google.ads.googleads.v17.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice device = 9 [(.google.api.field_behavior) = IMMUTABLE];
* @return The enum numeric value on the wire for device.
*/
public int getDeviceValue() {
if (targetCase_ == 9) {
return (java.lang.Integer) target_;
}
return 0;
}
/**
*
* Immutable. The targeted device.
*
*
* .google.ads.googleads.v17.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice device = 9 [(.google.api.field_behavior) = IMMUTABLE];
* @return The device.
*/
public com.google.ads.googleads.v17.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice getDevice() {
if (targetCase_ == 9) {
com.google.ads.googleads.v17.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice result = com.google.ads.googleads.v17.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice.forNumber(
(java.lang.Integer) target_);
return result == null ? com.google.ads.googleads.v17.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice.UNRECOGNIZED : result;
}
return com.google.ads.googleads.v17.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice.UNSPECIFIED;
}
public static final int AD_SCHEDULE_FIELD_NUMBER = 10;
/**
*
* Immutable. The targeted schedule.
*
*
* .google.ads.googleads.v17.common.AdScheduleInfo ad_schedule = 10 [(.google.api.field_behavior) = IMMUTABLE];
* @return Whether the adSchedule field is set.
*/
@java.lang.Override
public boolean hasAdSchedule() {
return targetCase_ == 10;
}
/**
*
* Immutable. The targeted schedule.
*
*
* .google.ads.googleads.v17.common.AdScheduleInfo ad_schedule = 10 [(.google.api.field_behavior) = IMMUTABLE];
* @return The adSchedule.
*/
@java.lang.Override
public com.google.ads.googleads.v17.common.AdScheduleInfo getAdSchedule() {
if (targetCase_ == 10) {
return (com.google.ads.googleads.v17.common.AdScheduleInfo) target_;
}
return com.google.ads.googleads.v17.common.AdScheduleInfo.getDefaultInstance();
}
/**
*
* Immutable. The targeted schedule.
*
*
* .google.ads.googleads.v17.common.AdScheduleInfo ad_schedule = 10 [(.google.api.field_behavior) = IMMUTABLE];
*/
@java.lang.Override
public com.google.ads.googleads.v17.common.AdScheduleInfoOrBuilder getAdScheduleOrBuilder() {
if (targetCase_ == 10) {
return (com.google.ads.googleads.v17.common.AdScheduleInfo) target_;
}
return com.google.ads.googleads.v17.common.AdScheduleInfo.getDefaultInstance();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resourceName_);
}
if (feedItemTargetType_ != com.google.ads.googleads.v17.enums.FeedItemTargetTypeEnum.FeedItemTargetType.UNSPECIFIED.getNumber()) {
output.writeEnum(3, feedItemTargetType_);
}
if (targetCase_ == 7) {
output.writeMessage(7, (com.google.ads.googleads.v17.common.KeywordInfo) target_);
}
if (targetCase_ == 9) {
output.writeEnum(9, ((java.lang.Integer) target_));
}
if (targetCase_ == 10) {
output.writeMessage(10, (com.google.ads.googleads.v17.common.AdScheduleInfo) target_);
}
if (status_ != com.google.ads.googleads.v17.enums.FeedItemTargetStatusEnum.FeedItemTargetStatus.UNSPECIFIED.getNumber()) {
output.writeEnum(11, status_);
}
if (((bitField0_ & 0x00000001) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 12, feedItem_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeInt64(13, feedItemTargetId_);
}
if (targetCase_ == 14) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 14, target_);
}
if (targetCase_ == 15) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 15, target_);
}
if (targetCase_ == 16) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 16, target_);
}
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(resourceName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resourceName_);
}
if (feedItemTargetType_ != com.google.ads.googleads.v17.enums.FeedItemTargetTypeEnum.FeedItemTargetType.UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(3, feedItemTargetType_);
}
if (targetCase_ == 7) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, (com.google.ads.googleads.v17.common.KeywordInfo) target_);
}
if (targetCase_ == 9) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(9, ((java.lang.Integer) target_));
}
if (targetCase_ == 10) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(10, (com.google.ads.googleads.v17.common.AdScheduleInfo) target_);
}
if (status_ != com.google.ads.googleads.v17.enums.FeedItemTargetStatusEnum.FeedItemTargetStatus.UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(11, status_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, feedItem_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(13, feedItemTargetId_);
}
if (targetCase_ == 14) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, target_);
}
if (targetCase_ == 15) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, target_);
}
if (targetCase_ == 16) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, target_);
}
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.resources.FeedItemTarget)) {
return super.equals(obj);
}
com.google.ads.googleads.v17.resources.FeedItemTarget other = (com.google.ads.googleads.v17.resources.FeedItemTarget) obj;
if (!getResourceName()
.equals(other.getResourceName())) return false;
if (hasFeedItem() != other.hasFeedItem()) return false;
if (hasFeedItem()) {
if (!getFeedItem()
.equals(other.getFeedItem())) return false;
}
if (feedItemTargetType_ != other.feedItemTargetType_) return false;
if (hasFeedItemTargetId() != other.hasFeedItemTargetId()) return false;
if (hasFeedItemTargetId()) {
if (getFeedItemTargetId()
!= other.getFeedItemTargetId()) return false;
}
if (status_ != other.status_) return false;
if (!getTargetCase().equals(other.getTargetCase())) return false;
switch (targetCase_) {
case 14:
if (!getCampaign()
.equals(other.getCampaign())) return false;
break;
case 15:
if (!getAdGroup()
.equals(other.getAdGroup())) return false;
break;
case 7:
if (!getKeyword()
.equals(other.getKeyword())) return false;
break;
case 16:
if (!getGeoTargetConstant()
.equals(other.getGeoTargetConstant())) return false;
break;
case 9:
if (getDeviceValue()
!= other.getDeviceValue()) return false;
break;
case 10:
if (!getAdSchedule()
.equals(other.getAdSchedule())) return false;
break;
case 0:
default:
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + RESOURCE_NAME_FIELD_NUMBER;
hash = (53 * hash) + getResourceName().hashCode();
if (hasFeedItem()) {
hash = (37 * hash) + FEED_ITEM_FIELD_NUMBER;
hash = (53 * hash) + getFeedItem().hashCode();
}
hash = (37 * hash) + FEED_ITEM_TARGET_TYPE_FIELD_NUMBER;
hash = (53 * hash) + feedItemTargetType_;
if (hasFeedItemTargetId()) {
hash = (37 * hash) + FEED_ITEM_TARGET_ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getFeedItemTargetId());
}
hash = (37 * hash) + STATUS_FIELD_NUMBER;
hash = (53 * hash) + status_;
switch (targetCase_) {
case 14:
hash = (37 * hash) + CAMPAIGN_FIELD_NUMBER;
hash = (53 * hash) + getCampaign().hashCode();
break;
case 15:
hash = (37 * hash) + AD_GROUP_FIELD_NUMBER;
hash = (53 * hash) + getAdGroup().hashCode();
break;
case 7:
hash = (37 * hash) + KEYWORD_FIELD_NUMBER;
hash = (53 * hash) + getKeyword().hashCode();
break;
case 16:
hash = (37 * hash) + GEO_TARGET_CONSTANT_FIELD_NUMBER;
hash = (53 * hash) + getGeoTargetConstant().hashCode();
break;
case 9:
hash = (37 * hash) + DEVICE_FIELD_NUMBER;
hash = (53 * hash) + getDeviceValue();
break;
case 10:
hash = (37 * hash) + AD_SCHEDULE_FIELD_NUMBER;
hash = (53 * hash) + getAdSchedule().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.ads.googleads.v17.resources.FeedItemTarget parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.resources.FeedItemTarget 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.resources.FeedItemTarget parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.resources.FeedItemTarget 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.resources.FeedItemTarget parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.resources.FeedItemTarget 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.resources.FeedItemTarget parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.ads.googleads.v17.resources.FeedItemTarget 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.resources.FeedItemTarget parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.ads.googleads.v17.resources.FeedItemTarget 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.resources.FeedItemTarget 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.resources.FeedItemTarget 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.resources.FeedItemTarget 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 feed item target.
*
*
* Protobuf type {@code google.ads.googleads.v17.resources.FeedItemTarget}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.ads.googleads.v17.resources.FeedItemTarget)
com.google.ads.googleads.v17.resources.FeedItemTargetOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.ads.googleads.v17.resources.FeedItemTargetProto.internal_static_google_ads_googleads_v17_resources_FeedItemTarget_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.ads.googleads.v17.resources.FeedItemTargetProto.internal_static_google_ads_googleads_v17_resources_FeedItemTarget_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ads.googleads.v17.resources.FeedItemTarget.class, com.google.ads.googleads.v17.resources.FeedItemTarget.Builder.class);
}
// Construct using com.google.ads.googleads.v17.resources.FeedItemTarget.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
resourceName_ = "";
feedItem_ = "";
feedItemTargetType_ = 0;
feedItemTargetId_ = 0L;
status_ = 0;
if (keywordBuilder_ != null) {
keywordBuilder_.clear();
}
if (adScheduleBuilder_ != null) {
adScheduleBuilder_.clear();
}
targetCase_ = 0;
target_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.ads.googleads.v17.resources.FeedItemTargetProto.internal_static_google_ads_googleads_v17_resources_FeedItemTarget_descriptor;
}
@java.lang.Override
public com.google.ads.googleads.v17.resources.FeedItemTarget getDefaultInstanceForType() {
return com.google.ads.googleads.v17.resources.FeedItemTarget.getDefaultInstance();
}
@java.lang.Override
public com.google.ads.googleads.v17.resources.FeedItemTarget build() {
com.google.ads.googleads.v17.resources.FeedItemTarget result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.ads.googleads.v17.resources.FeedItemTarget buildPartial() {
com.google.ads.googleads.v17.resources.FeedItemTarget result = new com.google.ads.googleads.v17.resources.FeedItemTarget(this);
if (bitField0_ != 0) { buildPartial0(result); }
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(com.google.ads.googleads.v17.resources.FeedItemTarget result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.resourceName_ = resourceName_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.feedItem_ = feedItem_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.feedItemTargetType_ = feedItemTargetType_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.feedItemTargetId_ = feedItemTargetId_;
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.status_ = status_;
}
result.bitField0_ |= to_bitField0_;
}
private void buildPartialOneofs(com.google.ads.googleads.v17.resources.FeedItemTarget result) {
result.targetCase_ = targetCase_;
result.target_ = this.target_;
if (targetCase_ == 7 &&
keywordBuilder_ != null) {
result.target_ = keywordBuilder_.build();
}
if (targetCase_ == 10 &&
adScheduleBuilder_ != null) {
result.target_ = adScheduleBuilder_.build();
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.ads.googleads.v17.resources.FeedItemTarget) {
return mergeFrom((com.google.ads.googleads.v17.resources.FeedItemTarget)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.ads.googleads.v17.resources.FeedItemTarget other) {
if (other == com.google.ads.googleads.v17.resources.FeedItemTarget.getDefaultInstance()) return this;
if (!other.getResourceName().isEmpty()) {
resourceName_ = other.resourceName_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasFeedItem()) {
feedItem_ = other.feedItem_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.feedItemTargetType_ != 0) {
setFeedItemTargetTypeValue(other.getFeedItemTargetTypeValue());
}
if (other.hasFeedItemTargetId()) {
setFeedItemTargetId(other.getFeedItemTargetId());
}
if (other.status_ != 0) {
setStatusValue(other.getStatusValue());
}
switch (other.getTargetCase()) {
case CAMPAIGN: {
targetCase_ = 14;
target_ = other.target_;
onChanged();
break;
}
case AD_GROUP: {
targetCase_ = 15;
target_ = other.target_;
onChanged();
break;
}
case KEYWORD: {
mergeKeyword(other.getKeyword());
break;
}
case GEO_TARGET_CONSTANT: {
targetCase_ = 16;
target_ = other.target_;
onChanged();
break;
}
case DEVICE: {
setDeviceValue(other.getDeviceValue());
break;
}
case AD_SCHEDULE: {
mergeAdSchedule(other.getAdSchedule());
break;
}
case TARGET_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
resourceName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 24: {
feedItemTargetType_ = input.readEnum();
bitField0_ |= 0x00000004;
break;
} // case 24
case 58: {
input.readMessage(
getKeywordFieldBuilder().getBuilder(),
extensionRegistry);
targetCase_ = 7;
break;
} // case 58
case 72: {
int rawValue = input.readEnum();
targetCase_ = 9;
target_ = rawValue;
break;
} // case 72
case 82: {
input.readMessage(
getAdScheduleFieldBuilder().getBuilder(),
extensionRegistry);
targetCase_ = 10;
break;
} // case 82
case 88: {
status_ = input.readEnum();
bitField0_ |= 0x00000010;
break;
} // case 88
case 98: {
feedItem_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 98
case 104: {
feedItemTargetId_ = input.readInt64();
bitField0_ |= 0x00000008;
break;
} // case 104
case 114: {
java.lang.String s = input.readStringRequireUtf8();
targetCase_ = 14;
target_ = s;
break;
} // case 114
case 122: {
java.lang.String s = input.readStringRequireUtf8();
targetCase_ = 15;
target_ = s;
break;
} // case 122
case 130: {
java.lang.String s = input.readStringRequireUtf8();
targetCase_ = 16;
target_ = s;
break;
} // case 130
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 targetCase_ = 0;
private java.lang.Object target_;
public TargetCase
getTargetCase() {
return TargetCase.forNumber(
targetCase_);
}
public Builder clearTarget() {
targetCase_ = 0;
target_ = null;
onChanged();
return this;
}
private int bitField0_;
private java.lang.Object resourceName_ = "";
/**
*
* Immutable. The resource name of the feed item target.
* Feed item target resource names have the form:
* `customers/{customer_id}/feedItemTargets/{feed_id}~{feed_item_id}~{feed_item_target_type}~{feed_item_target_id}`
*
*
* string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return The resourceName.
*/
public java.lang.String getResourceName() {
java.lang.Object ref = resourceName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
resourceName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Immutable. The resource name of the feed item target.
* Feed item target resource names have the form:
* `customers/{customer_id}/feedItemTargets/{feed_id}~{feed_item_id}~{feed_item_target_type}~{feed_item_target_id}`
*
*
* string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return The bytes for resourceName.
*/
public com.google.protobuf.ByteString
getResourceNameBytes() {
java.lang.Object ref = resourceName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
resourceName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Immutable. The resource name of the feed item target.
* Feed item target resource names have the form:
* `customers/{customer_id}/feedItemTargets/{feed_id}~{feed_item_id}~{feed_item_target_type}~{feed_item_target_id}`
*
*
* string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @param value The resourceName to set.
* @return This builder for chaining.
*/
public Builder setResourceName(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
resourceName_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Immutable. The resource name of the feed item target.
* Feed item target resource names have the form:
* `customers/{customer_id}/feedItemTargets/{feed_id}~{feed_item_id}~{feed_item_target_type}~{feed_item_target_id}`
*
*
* string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return This builder for chaining.
*/
public Builder clearResourceName() {
resourceName_ = getDefaultInstance().getResourceName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* Immutable. The resource name of the feed item target.
* Feed item target resource names have the form:
* `customers/{customer_id}/feedItemTargets/{feed_id}~{feed_item_id}~{feed_item_target_type}~{feed_item_target_id}`
*
*
* string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @param value The bytes for resourceName to set.
* @return This builder for chaining.
*/
public Builder setResourceNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
resourceName_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object feedItem_ = "";
/**
*
* Immutable. The feed item to which this feed item target belongs.
*
*
* optional string feed_item = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return Whether the feedItem field is set.
*/
public boolean hasFeedItem() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Immutable. The feed item to which this feed item target belongs.
*
*
* optional string feed_item = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return The feedItem.
*/
public java.lang.String getFeedItem() {
java.lang.Object ref = feedItem_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
feedItem_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Immutable. The feed item to which this feed item target belongs.
*
*
* optional string feed_item = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return The bytes for feedItem.
*/
public com.google.protobuf.ByteString
getFeedItemBytes() {
java.lang.Object ref = feedItem_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
feedItem_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Immutable. The feed item to which this feed item target belongs.
*
*
* optional string feed_item = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @param value The feedItem to set.
* @return This builder for chaining.
*/
public Builder setFeedItem(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
feedItem_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Immutable. The feed item to which this feed item target belongs.
*
*
* optional string feed_item = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return This builder for chaining.
*/
public Builder clearFeedItem() {
feedItem_ = getDefaultInstance().getFeedItem();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
* Immutable. The feed item to which this feed item target belongs.
*
*
* optional string feed_item = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @param value The bytes for feedItem to set.
* @return This builder for chaining.
*/
public Builder setFeedItemBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
feedItem_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private int feedItemTargetType_ = 0;
/**
*
* Output only. The target type of this feed item target. This field is
* read-only.
*
*
* .google.ads.googleads.v17.enums.FeedItemTargetTypeEnum.FeedItemTargetType feed_item_target_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return The enum numeric value on the wire for feedItemTargetType.
*/
@java.lang.Override public int getFeedItemTargetTypeValue() {
return feedItemTargetType_;
}
/**
*
* Output only. The target type of this feed item target. This field is
* read-only.
*
*
* .google.ads.googleads.v17.enums.FeedItemTargetTypeEnum.FeedItemTargetType feed_item_target_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @param value The enum numeric value on the wire for feedItemTargetType to set.
* @return This builder for chaining.
*/
public Builder setFeedItemTargetTypeValue(int value) {
feedItemTargetType_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Output only. The target type of this feed item target. This field is
* read-only.
*
*
* .google.ads.googleads.v17.enums.FeedItemTargetTypeEnum.FeedItemTargetType feed_item_target_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return The feedItemTargetType.
*/
@java.lang.Override
public com.google.ads.googleads.v17.enums.FeedItemTargetTypeEnum.FeedItemTargetType getFeedItemTargetType() {
com.google.ads.googleads.v17.enums.FeedItemTargetTypeEnum.FeedItemTargetType result = com.google.ads.googleads.v17.enums.FeedItemTargetTypeEnum.FeedItemTargetType.forNumber(feedItemTargetType_);
return result == null ? com.google.ads.googleads.v17.enums.FeedItemTargetTypeEnum.FeedItemTargetType.UNRECOGNIZED : result;
}
/**
*
* Output only. The target type of this feed item target. This field is
* read-only.
*
*
* .google.ads.googleads.v17.enums.FeedItemTargetTypeEnum.FeedItemTargetType feed_item_target_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @param value The feedItemTargetType to set.
* @return This builder for chaining.
*/
public Builder setFeedItemTargetType(com.google.ads.googleads.v17.enums.FeedItemTargetTypeEnum.FeedItemTargetType value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000004;
feedItemTargetType_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Output only. The target type of this feed item target. This field is
* read-only.
*
*
* .google.ads.googleads.v17.enums.FeedItemTargetTypeEnum.FeedItemTargetType feed_item_target_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return This builder for chaining.
*/
public Builder clearFeedItemTargetType() {
bitField0_ = (bitField0_ & ~0x00000004);
feedItemTargetType_ = 0;
onChanged();
return this;
}
private long feedItemTargetId_ ;
/**
*
* Output only. The ID of the targeted resource. This field is read-only.
*
*
* optional int64 feed_item_target_id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return Whether the feedItemTargetId field is set.
*/
@java.lang.Override
public boolean hasFeedItemTargetId() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* Output only. The ID of the targeted resource. This field is read-only.
*
*
* optional int64 feed_item_target_id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return The feedItemTargetId.
*/
@java.lang.Override
public long getFeedItemTargetId() {
return feedItemTargetId_;
}
/**
*
* Output only. The ID of the targeted resource. This field is read-only.
*
*
* optional int64 feed_item_target_id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @param value The feedItemTargetId to set.
* @return This builder for chaining.
*/
public Builder setFeedItemTargetId(long value) {
feedItemTargetId_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* Output only. The ID of the targeted resource. This field is read-only.
*
*
* optional int64 feed_item_target_id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return This builder for chaining.
*/
public Builder clearFeedItemTargetId() {
bitField0_ = (bitField0_ & ~0x00000008);
feedItemTargetId_ = 0L;
onChanged();
return this;
}
private int status_ = 0;
/**
*
* Output only. Status of the feed item target.
* This field is read-only.
*
*
* .google.ads.googleads.v17.enums.FeedItemTargetStatusEnum.FeedItemTargetStatus status = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return The enum numeric value on the wire for status.
*/
@java.lang.Override public int getStatusValue() {
return status_;
}
/**
*
* Output only. Status of the feed item target.
* This field is read-only.
*
*
* .google.ads.googleads.v17.enums.FeedItemTargetStatusEnum.FeedItemTargetStatus status = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @param value The enum numeric value on the wire for status to set.
* @return This builder for chaining.
*/
public Builder setStatusValue(int value) {
status_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* Output only. Status of the feed item target.
* This field is read-only.
*
*
* .google.ads.googleads.v17.enums.FeedItemTargetStatusEnum.FeedItemTargetStatus status = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return The status.
*/
@java.lang.Override
public com.google.ads.googleads.v17.enums.FeedItemTargetStatusEnum.FeedItemTargetStatus getStatus() {
com.google.ads.googleads.v17.enums.FeedItemTargetStatusEnum.FeedItemTargetStatus result = com.google.ads.googleads.v17.enums.FeedItemTargetStatusEnum.FeedItemTargetStatus.forNumber(status_);
return result == null ? com.google.ads.googleads.v17.enums.FeedItemTargetStatusEnum.FeedItemTargetStatus.UNRECOGNIZED : result;
}
/**
*
* Output only. Status of the feed item target.
* This field is read-only.
*
*
* .google.ads.googleads.v17.enums.FeedItemTargetStatusEnum.FeedItemTargetStatus status = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @param value The status to set.
* @return This builder for chaining.
*/
public Builder setStatus(com.google.ads.googleads.v17.enums.FeedItemTargetStatusEnum.FeedItemTargetStatus value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000010;
status_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Output only. Status of the feed item target.
* This field is read-only.
*
*
* .google.ads.googleads.v17.enums.FeedItemTargetStatusEnum.FeedItemTargetStatus status = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return This builder for chaining.
*/
public Builder clearStatus() {
bitField0_ = (bitField0_ & ~0x00000010);
status_ = 0;
onChanged();
return this;
}
/**
*
* Immutable. The targeted campaign.
*
*
* string campaign = 14 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return Whether the campaign field is set.
*/
@java.lang.Override
public boolean hasCampaign() {
return targetCase_ == 14;
}
/**
*
* Immutable. The targeted campaign.
*
*
* string campaign = 14 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return The campaign.
*/
@java.lang.Override
public java.lang.String getCampaign() {
java.lang.Object ref = "";
if (targetCase_ == 14) {
ref = target_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (targetCase_ == 14) {
target_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Immutable. The targeted campaign.
*
*
* string campaign = 14 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return The bytes for campaign.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getCampaignBytes() {
java.lang.Object ref = "";
if (targetCase_ == 14) {
ref = target_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (targetCase_ == 14) {
target_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Immutable. The targeted campaign.
*
*
* string campaign = 14 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @param value The campaign to set.
* @return This builder for chaining.
*/
public Builder setCampaign(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
targetCase_ = 14;
target_ = value;
onChanged();
return this;
}
/**
*
* Immutable. The targeted campaign.
*
*
* string campaign = 14 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return This builder for chaining.
*/
public Builder clearCampaign() {
if (targetCase_ == 14) {
targetCase_ = 0;
target_ = null;
onChanged();
}
return this;
}
/**
*
* Immutable. The targeted campaign.
*
*
* string campaign = 14 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @param value The bytes for campaign to set.
* @return This builder for chaining.
*/
public Builder setCampaignBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
targetCase_ = 14;
target_ = value;
onChanged();
return this;
}
/**
*
* Immutable. The targeted ad group.
*
*
* string ad_group = 15 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return Whether the adGroup field is set.
*/
@java.lang.Override
public boolean hasAdGroup() {
return targetCase_ == 15;
}
/**
*
* Immutable. The targeted ad group.
*
*
* string ad_group = 15 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return The adGroup.
*/
@java.lang.Override
public java.lang.String getAdGroup() {
java.lang.Object ref = "";
if (targetCase_ == 15) {
ref = target_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (targetCase_ == 15) {
target_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Immutable. The targeted ad group.
*
*
* string ad_group = 15 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return The bytes for adGroup.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getAdGroupBytes() {
java.lang.Object ref = "";
if (targetCase_ == 15) {
ref = target_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (targetCase_ == 15) {
target_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Immutable. The targeted ad group.
*
*
* string ad_group = 15 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @param value The adGroup to set.
* @return This builder for chaining.
*/
public Builder setAdGroup(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
targetCase_ = 15;
target_ = value;
onChanged();
return this;
}
/**
*
* Immutable. The targeted ad group.
*
*
* string ad_group = 15 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return This builder for chaining.
*/
public Builder clearAdGroup() {
if (targetCase_ == 15) {
targetCase_ = 0;
target_ = null;
onChanged();
}
return this;
}
/**
*
* Immutable. The targeted ad group.
*
*
* string ad_group = 15 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @param value The bytes for adGroup to set.
* @return This builder for chaining.
*/
public Builder setAdGroupBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
targetCase_ = 15;
target_ = value;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.common.KeywordInfo, com.google.ads.googleads.v17.common.KeywordInfo.Builder, com.google.ads.googleads.v17.common.KeywordInfoOrBuilder> keywordBuilder_;
/**
*
* Immutable. The targeted keyword.
*
*
* .google.ads.googleads.v17.common.KeywordInfo keyword = 7 [(.google.api.field_behavior) = IMMUTABLE];
* @return Whether the keyword field is set.
*/
@java.lang.Override
public boolean hasKeyword() {
return targetCase_ == 7;
}
/**
*
* Immutable. The targeted keyword.
*
*
* .google.ads.googleads.v17.common.KeywordInfo keyword = 7 [(.google.api.field_behavior) = IMMUTABLE];
* @return The keyword.
*/
@java.lang.Override
public com.google.ads.googleads.v17.common.KeywordInfo getKeyword() {
if (keywordBuilder_ == null) {
if (targetCase_ == 7) {
return (com.google.ads.googleads.v17.common.KeywordInfo) target_;
}
return com.google.ads.googleads.v17.common.KeywordInfo.getDefaultInstance();
} else {
if (targetCase_ == 7) {
return keywordBuilder_.getMessage();
}
return com.google.ads.googleads.v17.common.KeywordInfo.getDefaultInstance();
}
}
/**
*
* Immutable. The targeted keyword.
*
*
* .google.ads.googleads.v17.common.KeywordInfo keyword = 7 [(.google.api.field_behavior) = IMMUTABLE];
*/
public Builder setKeyword(com.google.ads.googleads.v17.common.KeywordInfo value) {
if (keywordBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
target_ = value;
onChanged();
} else {
keywordBuilder_.setMessage(value);
}
targetCase_ = 7;
return this;
}
/**
*
* Immutable. The targeted keyword.
*
*
* .google.ads.googleads.v17.common.KeywordInfo keyword = 7 [(.google.api.field_behavior) = IMMUTABLE];
*/
public Builder setKeyword(
com.google.ads.googleads.v17.common.KeywordInfo.Builder builderForValue) {
if (keywordBuilder_ == null) {
target_ = builderForValue.build();
onChanged();
} else {
keywordBuilder_.setMessage(builderForValue.build());
}
targetCase_ = 7;
return this;
}
/**
*
* Immutable. The targeted keyword.
*
*
* .google.ads.googleads.v17.common.KeywordInfo keyword = 7 [(.google.api.field_behavior) = IMMUTABLE];
*/
public Builder mergeKeyword(com.google.ads.googleads.v17.common.KeywordInfo value) {
if (keywordBuilder_ == null) {
if (targetCase_ == 7 &&
target_ != com.google.ads.googleads.v17.common.KeywordInfo.getDefaultInstance()) {
target_ = com.google.ads.googleads.v17.common.KeywordInfo.newBuilder((com.google.ads.googleads.v17.common.KeywordInfo) target_)
.mergeFrom(value).buildPartial();
} else {
target_ = value;
}
onChanged();
} else {
if (targetCase_ == 7) {
keywordBuilder_.mergeFrom(value);
} else {
keywordBuilder_.setMessage(value);
}
}
targetCase_ = 7;
return this;
}
/**
*
* Immutable. The targeted keyword.
*
*
* .google.ads.googleads.v17.common.KeywordInfo keyword = 7 [(.google.api.field_behavior) = IMMUTABLE];
*/
public Builder clearKeyword() {
if (keywordBuilder_ == null) {
if (targetCase_ == 7) {
targetCase_ = 0;
target_ = null;
onChanged();
}
} else {
if (targetCase_ == 7) {
targetCase_ = 0;
target_ = null;
}
keywordBuilder_.clear();
}
return this;
}
/**
*
* Immutable. The targeted keyword.
*
*
* .google.ads.googleads.v17.common.KeywordInfo keyword = 7 [(.google.api.field_behavior) = IMMUTABLE];
*/
public com.google.ads.googleads.v17.common.KeywordInfo.Builder getKeywordBuilder() {
return getKeywordFieldBuilder().getBuilder();
}
/**
*
* Immutable. The targeted keyword.
*
*
* .google.ads.googleads.v17.common.KeywordInfo keyword = 7 [(.google.api.field_behavior) = IMMUTABLE];
*/
@java.lang.Override
public com.google.ads.googleads.v17.common.KeywordInfoOrBuilder getKeywordOrBuilder() {
if ((targetCase_ == 7) && (keywordBuilder_ != null)) {
return keywordBuilder_.getMessageOrBuilder();
} else {
if (targetCase_ == 7) {
return (com.google.ads.googleads.v17.common.KeywordInfo) target_;
}
return com.google.ads.googleads.v17.common.KeywordInfo.getDefaultInstance();
}
}
/**
*
* Immutable. The targeted keyword.
*
*
* .google.ads.googleads.v17.common.KeywordInfo keyword = 7 [(.google.api.field_behavior) = IMMUTABLE];
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.common.KeywordInfo, com.google.ads.googleads.v17.common.KeywordInfo.Builder, com.google.ads.googleads.v17.common.KeywordInfoOrBuilder>
getKeywordFieldBuilder() {
if (keywordBuilder_ == null) {
if (!(targetCase_ == 7)) {
target_ = com.google.ads.googleads.v17.common.KeywordInfo.getDefaultInstance();
}
keywordBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.common.KeywordInfo, com.google.ads.googleads.v17.common.KeywordInfo.Builder, com.google.ads.googleads.v17.common.KeywordInfoOrBuilder>(
(com.google.ads.googleads.v17.common.KeywordInfo) target_,
getParentForChildren(),
isClean());
target_ = null;
}
targetCase_ = 7;
onChanged();
return keywordBuilder_;
}
/**
*
* Immutable. The targeted geo target constant resource name.
*
*
* string geo_target_constant = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return Whether the geoTargetConstant field is set.
*/
@java.lang.Override
public boolean hasGeoTargetConstant() {
return targetCase_ == 16;
}
/**
*
* Immutable. The targeted geo target constant resource name.
*
*
* string geo_target_constant = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return The geoTargetConstant.
*/
@java.lang.Override
public java.lang.String getGeoTargetConstant() {
java.lang.Object ref = "";
if (targetCase_ == 16) {
ref = target_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (targetCase_ == 16) {
target_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Immutable. The targeted geo target constant resource name.
*
*
* string geo_target_constant = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return The bytes for geoTargetConstant.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getGeoTargetConstantBytes() {
java.lang.Object ref = "";
if (targetCase_ == 16) {
ref = target_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (targetCase_ == 16) {
target_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Immutable. The targeted geo target constant resource name.
*
*
* string geo_target_constant = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @param value The geoTargetConstant to set.
* @return This builder for chaining.
*/
public Builder setGeoTargetConstant(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
targetCase_ = 16;
target_ = value;
onChanged();
return this;
}
/**
*
* Immutable. The targeted geo target constant resource name.
*
*
* string geo_target_constant = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return This builder for chaining.
*/
public Builder clearGeoTargetConstant() {
if (targetCase_ == 16) {
targetCase_ = 0;
target_ = null;
onChanged();
}
return this;
}
/**
*
* Immutable. The targeted geo target constant resource name.
*
*
* string geo_target_constant = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @param value The bytes for geoTargetConstant to set.
* @return This builder for chaining.
*/
public Builder setGeoTargetConstantBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
targetCase_ = 16;
target_ = value;
onChanged();
return this;
}
/**
*
* Immutable. The targeted device.
*
*
* .google.ads.googleads.v17.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice device = 9 [(.google.api.field_behavior) = IMMUTABLE];
* @return Whether the device field is set.
*/
@java.lang.Override
public boolean hasDevice() {
return targetCase_ == 9;
}
/**
*
* Immutable. The targeted device.
*
*
* .google.ads.googleads.v17.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice device = 9 [(.google.api.field_behavior) = IMMUTABLE];
* @return The enum numeric value on the wire for device.
*/
@java.lang.Override
public int getDeviceValue() {
if (targetCase_ == 9) {
return ((java.lang.Integer) target_).intValue();
}
return 0;
}
/**
*
* Immutable. The targeted device.
*
*
* .google.ads.googleads.v17.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice device = 9 [(.google.api.field_behavior) = IMMUTABLE];
* @param value The enum numeric value on the wire for device to set.
* @return This builder for chaining.
*/
public Builder setDeviceValue(int value) {
targetCase_ = 9;
target_ = value;
onChanged();
return this;
}
/**
*
* Immutable. The targeted device.
*
*
* .google.ads.googleads.v17.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice device = 9 [(.google.api.field_behavior) = IMMUTABLE];
* @return The device.
*/
@java.lang.Override
public com.google.ads.googleads.v17.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice getDevice() {
if (targetCase_ == 9) {
com.google.ads.googleads.v17.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice result = com.google.ads.googleads.v17.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice.forNumber(
(java.lang.Integer) target_);
return result == null ? com.google.ads.googleads.v17.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice.UNRECOGNIZED : result;
}
return com.google.ads.googleads.v17.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice.UNSPECIFIED;
}
/**
*
* Immutable. The targeted device.
*
*
* .google.ads.googleads.v17.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice device = 9 [(.google.api.field_behavior) = IMMUTABLE];
* @param value The device to set.
* @return This builder for chaining.
*/
public Builder setDevice(com.google.ads.googleads.v17.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice value) {
if (value == null) {
throw new NullPointerException();
}
targetCase_ = 9;
target_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Immutable. The targeted device.
*
*
* .google.ads.googleads.v17.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice device = 9 [(.google.api.field_behavior) = IMMUTABLE];
* @return This builder for chaining.
*/
public Builder clearDevice() {
if (targetCase_ == 9) {
targetCase_ = 0;
target_ = null;
onChanged();
}
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.common.AdScheduleInfo, com.google.ads.googleads.v17.common.AdScheduleInfo.Builder, com.google.ads.googleads.v17.common.AdScheduleInfoOrBuilder> adScheduleBuilder_;
/**
*
* Immutable. The targeted schedule.
*
*
* .google.ads.googleads.v17.common.AdScheduleInfo ad_schedule = 10 [(.google.api.field_behavior) = IMMUTABLE];
* @return Whether the adSchedule field is set.
*/
@java.lang.Override
public boolean hasAdSchedule() {
return targetCase_ == 10;
}
/**
*
* Immutable. The targeted schedule.
*
*
* .google.ads.googleads.v17.common.AdScheduleInfo ad_schedule = 10 [(.google.api.field_behavior) = IMMUTABLE];
* @return The adSchedule.
*/
@java.lang.Override
public com.google.ads.googleads.v17.common.AdScheduleInfo getAdSchedule() {
if (adScheduleBuilder_ == null) {
if (targetCase_ == 10) {
return (com.google.ads.googleads.v17.common.AdScheduleInfo) target_;
}
return com.google.ads.googleads.v17.common.AdScheduleInfo.getDefaultInstance();
} else {
if (targetCase_ == 10) {
return adScheduleBuilder_.getMessage();
}
return com.google.ads.googleads.v17.common.AdScheduleInfo.getDefaultInstance();
}
}
/**
*
* Immutable. The targeted schedule.
*
*
* .google.ads.googleads.v17.common.AdScheduleInfo ad_schedule = 10 [(.google.api.field_behavior) = IMMUTABLE];
*/
public Builder setAdSchedule(com.google.ads.googleads.v17.common.AdScheduleInfo value) {
if (adScheduleBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
target_ = value;
onChanged();
} else {
adScheduleBuilder_.setMessage(value);
}
targetCase_ = 10;
return this;
}
/**
*
* Immutable. The targeted schedule.
*
*
* .google.ads.googleads.v17.common.AdScheduleInfo ad_schedule = 10 [(.google.api.field_behavior) = IMMUTABLE];
*/
public Builder setAdSchedule(
com.google.ads.googleads.v17.common.AdScheduleInfo.Builder builderForValue) {
if (adScheduleBuilder_ == null) {
target_ = builderForValue.build();
onChanged();
} else {
adScheduleBuilder_.setMessage(builderForValue.build());
}
targetCase_ = 10;
return this;
}
/**
*
* Immutable. The targeted schedule.
*
*
* .google.ads.googleads.v17.common.AdScheduleInfo ad_schedule = 10 [(.google.api.field_behavior) = IMMUTABLE];
*/
public Builder mergeAdSchedule(com.google.ads.googleads.v17.common.AdScheduleInfo value) {
if (adScheduleBuilder_ == null) {
if (targetCase_ == 10 &&
target_ != com.google.ads.googleads.v17.common.AdScheduleInfo.getDefaultInstance()) {
target_ = com.google.ads.googleads.v17.common.AdScheduleInfo.newBuilder((com.google.ads.googleads.v17.common.AdScheduleInfo) target_)
.mergeFrom(value).buildPartial();
} else {
target_ = value;
}
onChanged();
} else {
if (targetCase_ == 10) {
adScheduleBuilder_.mergeFrom(value);
} else {
adScheduleBuilder_.setMessage(value);
}
}
targetCase_ = 10;
return this;
}
/**
*
* Immutable. The targeted schedule.
*
*
* .google.ads.googleads.v17.common.AdScheduleInfo ad_schedule = 10 [(.google.api.field_behavior) = IMMUTABLE];
*/
public Builder clearAdSchedule() {
if (adScheduleBuilder_ == null) {
if (targetCase_ == 10) {
targetCase_ = 0;
target_ = null;
onChanged();
}
} else {
if (targetCase_ == 10) {
targetCase_ = 0;
target_ = null;
}
adScheduleBuilder_.clear();
}
return this;
}
/**
*
* Immutable. The targeted schedule.
*
*
* .google.ads.googleads.v17.common.AdScheduleInfo ad_schedule = 10 [(.google.api.field_behavior) = IMMUTABLE];
*/
public com.google.ads.googleads.v17.common.AdScheduleInfo.Builder getAdScheduleBuilder() {
return getAdScheduleFieldBuilder().getBuilder();
}
/**
*
* Immutable. The targeted schedule.
*
*
* .google.ads.googleads.v17.common.AdScheduleInfo ad_schedule = 10 [(.google.api.field_behavior) = IMMUTABLE];
*/
@java.lang.Override
public com.google.ads.googleads.v17.common.AdScheduleInfoOrBuilder getAdScheduleOrBuilder() {
if ((targetCase_ == 10) && (adScheduleBuilder_ != null)) {
return adScheduleBuilder_.getMessageOrBuilder();
} else {
if (targetCase_ == 10) {
return (com.google.ads.googleads.v17.common.AdScheduleInfo) target_;
}
return com.google.ads.googleads.v17.common.AdScheduleInfo.getDefaultInstance();
}
}
/**
*
* Immutable. The targeted schedule.
*
*
* .google.ads.googleads.v17.common.AdScheduleInfo ad_schedule = 10 [(.google.api.field_behavior) = IMMUTABLE];
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.common.AdScheduleInfo, com.google.ads.googleads.v17.common.AdScheduleInfo.Builder, com.google.ads.googleads.v17.common.AdScheduleInfoOrBuilder>
getAdScheduleFieldBuilder() {
if (adScheduleBuilder_ == null) {
if (!(targetCase_ == 10)) {
target_ = com.google.ads.googleads.v17.common.AdScheduleInfo.getDefaultInstance();
}
adScheduleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.common.AdScheduleInfo, com.google.ads.googleads.v17.common.AdScheduleInfo.Builder, com.google.ads.googleads.v17.common.AdScheduleInfoOrBuilder>(
(com.google.ads.googleads.v17.common.AdScheduleInfo) target_,
getParentForChildren(),
isClean());
target_ = null;
}
targetCase_ = 10;
onChanged();
return adScheduleBuilder_;
}
@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.resources.FeedItemTarget)
}
// @@protoc_insertion_point(class_scope:google.ads.googleads.v17.resources.FeedItemTarget)
private static final com.google.ads.googleads.v17.resources.FeedItemTarget DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.ads.googleads.v17.resources.FeedItemTarget();
}
public static com.google.ads.googleads.v17.resources.FeedItemTarget getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public FeedItemTarget 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.resources.FeedItemTarget getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy