com.google.ads.googleads.v17.common.DemandGenCarouselAdInfo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of google-ads-stubs-v17 Show documentation
Show all versions of google-ads-stubs-v17 Show documentation
Stubs for GAAPI version google-ads-stubs-v17
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/ads/googleads/v17/common/ad_type_infos.proto
// Protobuf Java Version: 3.25.3
package com.google.ads.googleads.v17.common;
/**
*
* A Demand Gen carousel ad.
*
*
* Protobuf type {@code google.ads.googleads.v17.common.DemandGenCarouselAdInfo}
*/
public final class DemandGenCarouselAdInfo extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.ads.googleads.v17.common.DemandGenCarouselAdInfo)
DemandGenCarouselAdInfoOrBuilder {
private static final long serialVersionUID = 0L;
// Use DemandGenCarouselAdInfo.newBuilder() to construct.
private DemandGenCarouselAdInfo(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private DemandGenCarouselAdInfo() {
businessName_ = "";
callToActionText_ = "";
carouselCards_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new DemandGenCarouselAdInfo();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.ads.googleads.v17.common.AdTypeInfosProto.internal_static_google_ads_googleads_v17_common_DemandGenCarouselAdInfo_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.ads.googleads.v17.common.AdTypeInfosProto.internal_static_google_ads_googleads_v17_common_DemandGenCarouselAdInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ads.googleads.v17.common.DemandGenCarouselAdInfo.class, com.google.ads.googleads.v17.common.DemandGenCarouselAdInfo.Builder.class);
}
private int bitField0_;
public static final int BUSINESS_NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object businessName_ = "";
/**
*
* Required. The Advertiser/brand name.
*
*
* string business_name = 1 [(.google.api.field_behavior) = REQUIRED];
* @return The businessName.
*/
@java.lang.Override
public java.lang.String getBusinessName() {
java.lang.Object ref = businessName_;
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();
businessName_ = s;
return s;
}
}
/**
*
* Required. The Advertiser/brand name.
*
*
* string business_name = 1 [(.google.api.field_behavior) = REQUIRED];
* @return The bytes for businessName.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getBusinessNameBytes() {
java.lang.Object ref = businessName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
businessName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int LOGO_IMAGE_FIELD_NUMBER = 2;
private com.google.ads.googleads.v17.common.AdImageAsset logoImage_;
/**
*
* Required. Logo image to be used in the ad. The minimum size is 128x128 and
* the aspect ratio must be 1:1 (+-1%).
*
*
* .google.ads.googleads.v17.common.AdImageAsset logo_image = 2 [(.google.api.field_behavior) = REQUIRED];
* @return Whether the logoImage field is set.
*/
@java.lang.Override
public boolean hasLogoImage() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Required. Logo image to be used in the ad. The minimum size is 128x128 and
* the aspect ratio must be 1:1 (+-1%).
*
*
* .google.ads.googleads.v17.common.AdImageAsset logo_image = 2 [(.google.api.field_behavior) = REQUIRED];
* @return The logoImage.
*/
@java.lang.Override
public com.google.ads.googleads.v17.common.AdImageAsset getLogoImage() {
return logoImage_ == null ? com.google.ads.googleads.v17.common.AdImageAsset.getDefaultInstance() : logoImage_;
}
/**
*
* Required. Logo image to be used in the ad. The minimum size is 128x128 and
* the aspect ratio must be 1:1 (+-1%).
*
*
* .google.ads.googleads.v17.common.AdImageAsset logo_image = 2 [(.google.api.field_behavior) = REQUIRED];
*/
@java.lang.Override
public com.google.ads.googleads.v17.common.AdImageAssetOrBuilder getLogoImageOrBuilder() {
return logoImage_ == null ? com.google.ads.googleads.v17.common.AdImageAsset.getDefaultInstance() : logoImage_;
}
public static final int HEADLINE_FIELD_NUMBER = 3;
private com.google.ads.googleads.v17.common.AdTextAsset headline_;
/**
*
* Required. Headline of the ad.
*
*
* .google.ads.googleads.v17.common.AdTextAsset headline = 3 [(.google.api.field_behavior) = REQUIRED];
* @return Whether the headline field is set.
*/
@java.lang.Override
public boolean hasHeadline() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Required. Headline of the ad.
*
*
* .google.ads.googleads.v17.common.AdTextAsset headline = 3 [(.google.api.field_behavior) = REQUIRED];
* @return The headline.
*/
@java.lang.Override
public com.google.ads.googleads.v17.common.AdTextAsset getHeadline() {
return headline_ == null ? com.google.ads.googleads.v17.common.AdTextAsset.getDefaultInstance() : headline_;
}
/**
*
* Required. Headline of the ad.
*
*
* .google.ads.googleads.v17.common.AdTextAsset headline = 3 [(.google.api.field_behavior) = REQUIRED];
*/
@java.lang.Override
public com.google.ads.googleads.v17.common.AdTextAssetOrBuilder getHeadlineOrBuilder() {
return headline_ == null ? com.google.ads.googleads.v17.common.AdTextAsset.getDefaultInstance() : headline_;
}
public static final int DESCRIPTION_FIELD_NUMBER = 4;
private com.google.ads.googleads.v17.common.AdTextAsset description_;
/**
*
* Required. The descriptive text of the ad.
*
*
* .google.ads.googleads.v17.common.AdTextAsset description = 4 [(.google.api.field_behavior) = REQUIRED];
* @return Whether the description field is set.
*/
@java.lang.Override
public boolean hasDescription() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Required. The descriptive text of the ad.
*
*
* .google.ads.googleads.v17.common.AdTextAsset description = 4 [(.google.api.field_behavior) = REQUIRED];
* @return The description.
*/
@java.lang.Override
public com.google.ads.googleads.v17.common.AdTextAsset getDescription() {
return description_ == null ? com.google.ads.googleads.v17.common.AdTextAsset.getDefaultInstance() : description_;
}
/**
*
* Required. The descriptive text of the ad.
*
*
* .google.ads.googleads.v17.common.AdTextAsset description = 4 [(.google.api.field_behavior) = REQUIRED];
*/
@java.lang.Override
public com.google.ads.googleads.v17.common.AdTextAssetOrBuilder getDescriptionOrBuilder() {
return description_ == null ? com.google.ads.googleads.v17.common.AdTextAsset.getDefaultInstance() : description_;
}
public static final int CALL_TO_ACTION_TEXT_FIELD_NUMBER = 5;
@SuppressWarnings("serial")
private volatile java.lang.Object callToActionText_ = "";
/**
*
* Call to action text.
*
*
* string call_to_action_text = 5;
* @return The callToActionText.
*/
@java.lang.Override
public java.lang.String getCallToActionText() {
java.lang.Object ref = callToActionText_;
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();
callToActionText_ = s;
return s;
}
}
/**
*
* Call to action text.
*
*
* string call_to_action_text = 5;
* @return The bytes for callToActionText.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getCallToActionTextBytes() {
java.lang.Object ref = callToActionText_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
callToActionText_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CAROUSEL_CARDS_FIELD_NUMBER = 6;
@SuppressWarnings("serial")
private java.util.List carouselCards_;
/**
*
* Required. Carousel cards that will display with the ad. Min 2 max 10.
*
*
* repeated .google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset carousel_cards = 6 [(.google.api.field_behavior) = REQUIRED];
*/
@java.lang.Override
public java.util.List getCarouselCardsList() {
return carouselCards_;
}
/**
*
* Required. Carousel cards that will display with the ad. Min 2 max 10.
*
*
* repeated .google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset carousel_cards = 6 [(.google.api.field_behavior) = REQUIRED];
*/
@java.lang.Override
public java.util.List extends com.google.ads.googleads.v17.common.AdDemandGenCarouselCardAssetOrBuilder>
getCarouselCardsOrBuilderList() {
return carouselCards_;
}
/**
*
* Required. Carousel cards that will display with the ad. Min 2 max 10.
*
*
* repeated .google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset carousel_cards = 6 [(.google.api.field_behavior) = REQUIRED];
*/
@java.lang.Override
public int getCarouselCardsCount() {
return carouselCards_.size();
}
/**
*
* Required. Carousel cards that will display with the ad. Min 2 max 10.
*
*
* repeated .google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset carousel_cards = 6 [(.google.api.field_behavior) = REQUIRED];
*/
@java.lang.Override
public com.google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset getCarouselCards(int index) {
return carouselCards_.get(index);
}
/**
*
* Required. Carousel cards that will display with the ad. Min 2 max 10.
*
*
* repeated .google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset carousel_cards = 6 [(.google.api.field_behavior) = REQUIRED];
*/
@java.lang.Override
public com.google.ads.googleads.v17.common.AdDemandGenCarouselCardAssetOrBuilder getCarouselCardsOrBuilder(
int index) {
return carouselCards_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(businessName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, businessName_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(2, getLogoImage());
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(3, getHeadline());
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(4, getDescription());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(callToActionText_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, callToActionText_);
}
for (int i = 0; i < carouselCards_.size(); i++) {
output.writeMessage(6, carouselCards_.get(i));
}
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(businessName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, businessName_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getLogoImage());
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getHeadline());
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getDescription());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(callToActionText_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, callToActionText_);
}
for (int i = 0; i < carouselCards_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, carouselCards_.get(i));
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.ads.googleads.v17.common.DemandGenCarouselAdInfo)) {
return super.equals(obj);
}
com.google.ads.googleads.v17.common.DemandGenCarouselAdInfo other = (com.google.ads.googleads.v17.common.DemandGenCarouselAdInfo) obj;
if (!getBusinessName()
.equals(other.getBusinessName())) return false;
if (hasLogoImage() != other.hasLogoImage()) return false;
if (hasLogoImage()) {
if (!getLogoImage()
.equals(other.getLogoImage())) return false;
}
if (hasHeadline() != other.hasHeadline()) return false;
if (hasHeadline()) {
if (!getHeadline()
.equals(other.getHeadline())) return false;
}
if (hasDescription() != other.hasDescription()) return false;
if (hasDescription()) {
if (!getDescription()
.equals(other.getDescription())) return false;
}
if (!getCallToActionText()
.equals(other.getCallToActionText())) return false;
if (!getCarouselCardsList()
.equals(other.getCarouselCardsList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + BUSINESS_NAME_FIELD_NUMBER;
hash = (53 * hash) + getBusinessName().hashCode();
if (hasLogoImage()) {
hash = (37 * hash) + LOGO_IMAGE_FIELD_NUMBER;
hash = (53 * hash) + getLogoImage().hashCode();
}
if (hasHeadline()) {
hash = (37 * hash) + HEADLINE_FIELD_NUMBER;
hash = (53 * hash) + getHeadline().hashCode();
}
if (hasDescription()) {
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
}
hash = (37 * hash) + CALL_TO_ACTION_TEXT_FIELD_NUMBER;
hash = (53 * hash) + getCallToActionText().hashCode();
if (getCarouselCardsCount() > 0) {
hash = (37 * hash) + CAROUSEL_CARDS_FIELD_NUMBER;
hash = (53 * hash) + getCarouselCardsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.ads.googleads.v17.common.DemandGenCarouselAdInfo parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.common.DemandGenCarouselAdInfo parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.ads.googleads.v17.common.DemandGenCarouselAdInfo parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.common.DemandGenCarouselAdInfo parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.ads.googleads.v17.common.DemandGenCarouselAdInfo parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.common.DemandGenCarouselAdInfo parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.ads.googleads.v17.common.DemandGenCarouselAdInfo parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.ads.googleads.v17.common.DemandGenCarouselAdInfo parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.ads.googleads.v17.common.DemandGenCarouselAdInfo parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.ads.googleads.v17.common.DemandGenCarouselAdInfo parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.ads.googleads.v17.common.DemandGenCarouselAdInfo parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.ads.googleads.v17.common.DemandGenCarouselAdInfo parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.ads.googleads.v17.common.DemandGenCarouselAdInfo 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 Demand Gen carousel ad.
*
*
* Protobuf type {@code google.ads.googleads.v17.common.DemandGenCarouselAdInfo}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.ads.googleads.v17.common.DemandGenCarouselAdInfo)
com.google.ads.googleads.v17.common.DemandGenCarouselAdInfoOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.ads.googleads.v17.common.AdTypeInfosProto.internal_static_google_ads_googleads_v17_common_DemandGenCarouselAdInfo_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.ads.googleads.v17.common.AdTypeInfosProto.internal_static_google_ads_googleads_v17_common_DemandGenCarouselAdInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ads.googleads.v17.common.DemandGenCarouselAdInfo.class, com.google.ads.googleads.v17.common.DemandGenCarouselAdInfo.Builder.class);
}
// Construct using com.google.ads.googleads.v17.common.DemandGenCarouselAdInfo.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getLogoImageFieldBuilder();
getHeadlineFieldBuilder();
getDescriptionFieldBuilder();
getCarouselCardsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
businessName_ = "";
logoImage_ = null;
if (logoImageBuilder_ != null) {
logoImageBuilder_.dispose();
logoImageBuilder_ = null;
}
headline_ = null;
if (headlineBuilder_ != null) {
headlineBuilder_.dispose();
headlineBuilder_ = null;
}
description_ = null;
if (descriptionBuilder_ != null) {
descriptionBuilder_.dispose();
descriptionBuilder_ = null;
}
callToActionText_ = "";
if (carouselCardsBuilder_ == null) {
carouselCards_ = java.util.Collections.emptyList();
} else {
carouselCards_ = null;
carouselCardsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000020);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.ads.googleads.v17.common.AdTypeInfosProto.internal_static_google_ads_googleads_v17_common_DemandGenCarouselAdInfo_descriptor;
}
@java.lang.Override
public com.google.ads.googleads.v17.common.DemandGenCarouselAdInfo getDefaultInstanceForType() {
return com.google.ads.googleads.v17.common.DemandGenCarouselAdInfo.getDefaultInstance();
}
@java.lang.Override
public com.google.ads.googleads.v17.common.DemandGenCarouselAdInfo build() {
com.google.ads.googleads.v17.common.DemandGenCarouselAdInfo result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.ads.googleads.v17.common.DemandGenCarouselAdInfo buildPartial() {
com.google.ads.googleads.v17.common.DemandGenCarouselAdInfo result = new com.google.ads.googleads.v17.common.DemandGenCarouselAdInfo(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.google.ads.googleads.v17.common.DemandGenCarouselAdInfo result) {
if (carouselCardsBuilder_ == null) {
if (((bitField0_ & 0x00000020) != 0)) {
carouselCards_ = java.util.Collections.unmodifiableList(carouselCards_);
bitField0_ = (bitField0_ & ~0x00000020);
}
result.carouselCards_ = carouselCards_;
} else {
result.carouselCards_ = carouselCardsBuilder_.build();
}
}
private void buildPartial0(com.google.ads.googleads.v17.common.DemandGenCarouselAdInfo result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.businessName_ = businessName_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.logoImage_ = logoImageBuilder_ == null
? logoImage_
: logoImageBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.headline_ = headlineBuilder_ == null
? headline_
: headlineBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.description_ = descriptionBuilder_ == null
? description_
: descriptionBuilder_.build();
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.callToActionText_ = callToActionText_;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.ads.googleads.v17.common.DemandGenCarouselAdInfo) {
return mergeFrom((com.google.ads.googleads.v17.common.DemandGenCarouselAdInfo)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.ads.googleads.v17.common.DemandGenCarouselAdInfo other) {
if (other == com.google.ads.googleads.v17.common.DemandGenCarouselAdInfo.getDefaultInstance()) return this;
if (!other.getBusinessName().isEmpty()) {
businessName_ = other.businessName_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasLogoImage()) {
mergeLogoImage(other.getLogoImage());
}
if (other.hasHeadline()) {
mergeHeadline(other.getHeadline());
}
if (other.hasDescription()) {
mergeDescription(other.getDescription());
}
if (!other.getCallToActionText().isEmpty()) {
callToActionText_ = other.callToActionText_;
bitField0_ |= 0x00000010;
onChanged();
}
if (carouselCardsBuilder_ == null) {
if (!other.carouselCards_.isEmpty()) {
if (carouselCards_.isEmpty()) {
carouselCards_ = other.carouselCards_;
bitField0_ = (bitField0_ & ~0x00000020);
} else {
ensureCarouselCardsIsMutable();
carouselCards_.addAll(other.carouselCards_);
}
onChanged();
}
} else {
if (!other.carouselCards_.isEmpty()) {
if (carouselCardsBuilder_.isEmpty()) {
carouselCardsBuilder_.dispose();
carouselCardsBuilder_ = null;
carouselCards_ = other.carouselCards_;
bitField0_ = (bitField0_ & ~0x00000020);
carouselCardsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getCarouselCardsFieldBuilder() : null;
} else {
carouselCardsBuilder_.addAllMessages(other.carouselCards_);
}
}
}
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: {
businessName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
input.readMessage(
getLogoImageFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
input.readMessage(
getHeadlineFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 26
case 34: {
input.readMessage(
getDescriptionFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 34
case 42: {
callToActionText_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000010;
break;
} // case 42
case 50: {
com.google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset m =
input.readMessage(
com.google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset.parser(),
extensionRegistry);
if (carouselCardsBuilder_ == null) {
ensureCarouselCardsIsMutable();
carouselCards_.add(m);
} else {
carouselCardsBuilder_.addMessage(m);
}
break;
} // case 50
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object businessName_ = "";
/**
*
* Required. The Advertiser/brand name.
*
*
* string business_name = 1 [(.google.api.field_behavior) = REQUIRED];
* @return The businessName.
*/
public java.lang.String getBusinessName() {
java.lang.Object ref = businessName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
businessName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Required. The Advertiser/brand name.
*
*
* string business_name = 1 [(.google.api.field_behavior) = REQUIRED];
* @return The bytes for businessName.
*/
public com.google.protobuf.ByteString
getBusinessNameBytes() {
java.lang.Object ref = businessName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
businessName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Required. The Advertiser/brand name.
*
*
* string business_name = 1 [(.google.api.field_behavior) = REQUIRED];
* @param value The businessName to set.
* @return This builder for chaining.
*/
public Builder setBusinessName(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
businessName_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Required. The Advertiser/brand name.
*
*
* string business_name = 1 [(.google.api.field_behavior) = REQUIRED];
* @return This builder for chaining.
*/
public Builder clearBusinessName() {
businessName_ = getDefaultInstance().getBusinessName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* Required. The Advertiser/brand name.
*
*
* string business_name = 1 [(.google.api.field_behavior) = REQUIRED];
* @param value The bytes for businessName to set.
* @return This builder for chaining.
*/
public Builder setBusinessNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
businessName_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.ads.googleads.v17.common.AdImageAsset logoImage_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.common.AdImageAsset, com.google.ads.googleads.v17.common.AdImageAsset.Builder, com.google.ads.googleads.v17.common.AdImageAssetOrBuilder> logoImageBuilder_;
/**
*
* Required. Logo image to be used in the ad. The minimum size is 128x128 and
* the aspect ratio must be 1:1 (+-1%).
*
*
* .google.ads.googleads.v17.common.AdImageAsset logo_image = 2 [(.google.api.field_behavior) = REQUIRED];
* @return Whether the logoImage field is set.
*/
public boolean hasLogoImage() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Required. Logo image to be used in the ad. The minimum size is 128x128 and
* the aspect ratio must be 1:1 (+-1%).
*
*
* .google.ads.googleads.v17.common.AdImageAsset logo_image = 2 [(.google.api.field_behavior) = REQUIRED];
* @return The logoImage.
*/
public com.google.ads.googleads.v17.common.AdImageAsset getLogoImage() {
if (logoImageBuilder_ == null) {
return logoImage_ == null ? com.google.ads.googleads.v17.common.AdImageAsset.getDefaultInstance() : logoImage_;
} else {
return logoImageBuilder_.getMessage();
}
}
/**
*
* Required. Logo image to be used in the ad. The minimum size is 128x128 and
* the aspect ratio must be 1:1 (+-1%).
*
*
* .google.ads.googleads.v17.common.AdImageAsset logo_image = 2 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder setLogoImage(com.google.ads.googleads.v17.common.AdImageAsset value) {
if (logoImageBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
logoImage_ = value;
} else {
logoImageBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Required. Logo image to be used in the ad. The minimum size is 128x128 and
* the aspect ratio must be 1:1 (+-1%).
*
*
* .google.ads.googleads.v17.common.AdImageAsset logo_image = 2 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder setLogoImage(
com.google.ads.googleads.v17.common.AdImageAsset.Builder builderForValue) {
if (logoImageBuilder_ == null) {
logoImage_ = builderForValue.build();
} else {
logoImageBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Required. Logo image to be used in the ad. The minimum size is 128x128 and
* the aspect ratio must be 1:1 (+-1%).
*
*
* .google.ads.googleads.v17.common.AdImageAsset logo_image = 2 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder mergeLogoImage(com.google.ads.googleads.v17.common.AdImageAsset value) {
if (logoImageBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0) &&
logoImage_ != null &&
logoImage_ != com.google.ads.googleads.v17.common.AdImageAsset.getDefaultInstance()) {
getLogoImageBuilder().mergeFrom(value);
} else {
logoImage_ = value;
}
} else {
logoImageBuilder_.mergeFrom(value);
}
if (logoImage_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
*
* Required. Logo image to be used in the ad. The minimum size is 128x128 and
* the aspect ratio must be 1:1 (+-1%).
*
*
* .google.ads.googleads.v17.common.AdImageAsset logo_image = 2 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder clearLogoImage() {
bitField0_ = (bitField0_ & ~0x00000002);
logoImage_ = null;
if (logoImageBuilder_ != null) {
logoImageBuilder_.dispose();
logoImageBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Required. Logo image to be used in the ad. The minimum size is 128x128 and
* the aspect ratio must be 1:1 (+-1%).
*
*
* .google.ads.googleads.v17.common.AdImageAsset logo_image = 2 [(.google.api.field_behavior) = REQUIRED];
*/
public com.google.ads.googleads.v17.common.AdImageAsset.Builder getLogoImageBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getLogoImageFieldBuilder().getBuilder();
}
/**
*
* Required. Logo image to be used in the ad. The minimum size is 128x128 and
* the aspect ratio must be 1:1 (+-1%).
*
*
* .google.ads.googleads.v17.common.AdImageAsset logo_image = 2 [(.google.api.field_behavior) = REQUIRED];
*/
public com.google.ads.googleads.v17.common.AdImageAssetOrBuilder getLogoImageOrBuilder() {
if (logoImageBuilder_ != null) {
return logoImageBuilder_.getMessageOrBuilder();
} else {
return logoImage_ == null ?
com.google.ads.googleads.v17.common.AdImageAsset.getDefaultInstance() : logoImage_;
}
}
/**
*
* Required. Logo image to be used in the ad. The minimum size is 128x128 and
* the aspect ratio must be 1:1 (+-1%).
*
*
* .google.ads.googleads.v17.common.AdImageAsset logo_image = 2 [(.google.api.field_behavior) = REQUIRED];
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.common.AdImageAsset, com.google.ads.googleads.v17.common.AdImageAsset.Builder, com.google.ads.googleads.v17.common.AdImageAssetOrBuilder>
getLogoImageFieldBuilder() {
if (logoImageBuilder_ == null) {
logoImageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.common.AdImageAsset, com.google.ads.googleads.v17.common.AdImageAsset.Builder, com.google.ads.googleads.v17.common.AdImageAssetOrBuilder>(
getLogoImage(),
getParentForChildren(),
isClean());
logoImage_ = null;
}
return logoImageBuilder_;
}
private com.google.ads.googleads.v17.common.AdTextAsset headline_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.common.AdTextAsset, com.google.ads.googleads.v17.common.AdTextAsset.Builder, com.google.ads.googleads.v17.common.AdTextAssetOrBuilder> headlineBuilder_;
/**
*
* Required. Headline of the ad.
*
*
* .google.ads.googleads.v17.common.AdTextAsset headline = 3 [(.google.api.field_behavior) = REQUIRED];
* @return Whether the headline field is set.
*/
public boolean hasHeadline() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Required. Headline of the ad.
*
*
* .google.ads.googleads.v17.common.AdTextAsset headline = 3 [(.google.api.field_behavior) = REQUIRED];
* @return The headline.
*/
public com.google.ads.googleads.v17.common.AdTextAsset getHeadline() {
if (headlineBuilder_ == null) {
return headline_ == null ? com.google.ads.googleads.v17.common.AdTextAsset.getDefaultInstance() : headline_;
} else {
return headlineBuilder_.getMessage();
}
}
/**
*
* Required. Headline of the ad.
*
*
* .google.ads.googleads.v17.common.AdTextAsset headline = 3 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder setHeadline(com.google.ads.googleads.v17.common.AdTextAsset value) {
if (headlineBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
headline_ = value;
} else {
headlineBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Required. Headline of the ad.
*
*
* .google.ads.googleads.v17.common.AdTextAsset headline = 3 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder setHeadline(
com.google.ads.googleads.v17.common.AdTextAsset.Builder builderForValue) {
if (headlineBuilder_ == null) {
headline_ = builderForValue.build();
} else {
headlineBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Required. Headline of the ad.
*
*
* .google.ads.googleads.v17.common.AdTextAsset headline = 3 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder mergeHeadline(com.google.ads.googleads.v17.common.AdTextAsset value) {
if (headlineBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0) &&
headline_ != null &&
headline_ != com.google.ads.googleads.v17.common.AdTextAsset.getDefaultInstance()) {
getHeadlineBuilder().mergeFrom(value);
} else {
headline_ = value;
}
} else {
headlineBuilder_.mergeFrom(value);
}
if (headline_ != null) {
bitField0_ |= 0x00000004;
onChanged();
}
return this;
}
/**
*
* Required. Headline of the ad.
*
*
* .google.ads.googleads.v17.common.AdTextAsset headline = 3 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder clearHeadline() {
bitField0_ = (bitField0_ & ~0x00000004);
headline_ = null;
if (headlineBuilder_ != null) {
headlineBuilder_.dispose();
headlineBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Required. Headline of the ad.
*
*
* .google.ads.googleads.v17.common.AdTextAsset headline = 3 [(.google.api.field_behavior) = REQUIRED];
*/
public com.google.ads.googleads.v17.common.AdTextAsset.Builder getHeadlineBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getHeadlineFieldBuilder().getBuilder();
}
/**
*
* Required. Headline of the ad.
*
*
* .google.ads.googleads.v17.common.AdTextAsset headline = 3 [(.google.api.field_behavior) = REQUIRED];
*/
public com.google.ads.googleads.v17.common.AdTextAssetOrBuilder getHeadlineOrBuilder() {
if (headlineBuilder_ != null) {
return headlineBuilder_.getMessageOrBuilder();
} else {
return headline_ == null ?
com.google.ads.googleads.v17.common.AdTextAsset.getDefaultInstance() : headline_;
}
}
/**
*
* Required. Headline of the ad.
*
*
* .google.ads.googleads.v17.common.AdTextAsset headline = 3 [(.google.api.field_behavior) = REQUIRED];
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.common.AdTextAsset, com.google.ads.googleads.v17.common.AdTextAsset.Builder, com.google.ads.googleads.v17.common.AdTextAssetOrBuilder>
getHeadlineFieldBuilder() {
if (headlineBuilder_ == null) {
headlineBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.common.AdTextAsset, com.google.ads.googleads.v17.common.AdTextAsset.Builder, com.google.ads.googleads.v17.common.AdTextAssetOrBuilder>(
getHeadline(),
getParentForChildren(),
isClean());
headline_ = null;
}
return headlineBuilder_;
}
private com.google.ads.googleads.v17.common.AdTextAsset description_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.common.AdTextAsset, com.google.ads.googleads.v17.common.AdTextAsset.Builder, com.google.ads.googleads.v17.common.AdTextAssetOrBuilder> descriptionBuilder_;
/**
*
* Required. The descriptive text of the ad.
*
*
* .google.ads.googleads.v17.common.AdTextAsset description = 4 [(.google.api.field_behavior) = REQUIRED];
* @return Whether the description field is set.
*/
public boolean hasDescription() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* Required. The descriptive text of the ad.
*
*
* .google.ads.googleads.v17.common.AdTextAsset description = 4 [(.google.api.field_behavior) = REQUIRED];
* @return The description.
*/
public com.google.ads.googleads.v17.common.AdTextAsset getDescription() {
if (descriptionBuilder_ == null) {
return description_ == null ? com.google.ads.googleads.v17.common.AdTextAsset.getDefaultInstance() : description_;
} else {
return descriptionBuilder_.getMessage();
}
}
/**
*
* Required. The descriptive text of the ad.
*
*
* .google.ads.googleads.v17.common.AdTextAsset description = 4 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder setDescription(com.google.ads.googleads.v17.common.AdTextAsset value) {
if (descriptionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
description_ = value;
} else {
descriptionBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* Required. The descriptive text of the ad.
*
*
* .google.ads.googleads.v17.common.AdTextAsset description = 4 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder setDescription(
com.google.ads.googleads.v17.common.AdTextAsset.Builder builderForValue) {
if (descriptionBuilder_ == null) {
description_ = builderForValue.build();
} else {
descriptionBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* Required. The descriptive text of the ad.
*
*
* .google.ads.googleads.v17.common.AdTextAsset description = 4 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder mergeDescription(com.google.ads.googleads.v17.common.AdTextAsset value) {
if (descriptionBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0) &&
description_ != null &&
description_ != com.google.ads.googleads.v17.common.AdTextAsset.getDefaultInstance()) {
getDescriptionBuilder().mergeFrom(value);
} else {
description_ = value;
}
} else {
descriptionBuilder_.mergeFrom(value);
}
if (description_ != null) {
bitField0_ |= 0x00000008;
onChanged();
}
return this;
}
/**
*
* Required. The descriptive text of the ad.
*
*
* .google.ads.googleads.v17.common.AdTextAsset description = 4 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder clearDescription() {
bitField0_ = (bitField0_ & ~0x00000008);
description_ = null;
if (descriptionBuilder_ != null) {
descriptionBuilder_.dispose();
descriptionBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Required. The descriptive text of the ad.
*
*
* .google.ads.googleads.v17.common.AdTextAsset description = 4 [(.google.api.field_behavior) = REQUIRED];
*/
public com.google.ads.googleads.v17.common.AdTextAsset.Builder getDescriptionBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getDescriptionFieldBuilder().getBuilder();
}
/**
*
* Required. The descriptive text of the ad.
*
*
* .google.ads.googleads.v17.common.AdTextAsset description = 4 [(.google.api.field_behavior) = REQUIRED];
*/
public com.google.ads.googleads.v17.common.AdTextAssetOrBuilder getDescriptionOrBuilder() {
if (descriptionBuilder_ != null) {
return descriptionBuilder_.getMessageOrBuilder();
} else {
return description_ == null ?
com.google.ads.googleads.v17.common.AdTextAsset.getDefaultInstance() : description_;
}
}
/**
*
* Required. The descriptive text of the ad.
*
*
* .google.ads.googleads.v17.common.AdTextAsset description = 4 [(.google.api.field_behavior) = REQUIRED];
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.common.AdTextAsset, com.google.ads.googleads.v17.common.AdTextAsset.Builder, com.google.ads.googleads.v17.common.AdTextAssetOrBuilder>
getDescriptionFieldBuilder() {
if (descriptionBuilder_ == null) {
descriptionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.common.AdTextAsset, com.google.ads.googleads.v17.common.AdTextAsset.Builder, com.google.ads.googleads.v17.common.AdTextAssetOrBuilder>(
getDescription(),
getParentForChildren(),
isClean());
description_ = null;
}
return descriptionBuilder_;
}
private java.lang.Object callToActionText_ = "";
/**
*
* Call to action text.
*
*
* string call_to_action_text = 5;
* @return The callToActionText.
*/
public java.lang.String getCallToActionText() {
java.lang.Object ref = callToActionText_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
callToActionText_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Call to action text.
*
*
* string call_to_action_text = 5;
* @return The bytes for callToActionText.
*/
public com.google.protobuf.ByteString
getCallToActionTextBytes() {
java.lang.Object ref = callToActionText_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
callToActionText_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Call to action text.
*
*
* string call_to_action_text = 5;
* @param value The callToActionText to set.
* @return This builder for chaining.
*/
public Builder setCallToActionText(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
callToActionText_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* Call to action text.
*
*
* string call_to_action_text = 5;
* @return This builder for chaining.
*/
public Builder clearCallToActionText() {
callToActionText_ = getDefaultInstance().getCallToActionText();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
/**
*
* Call to action text.
*
*
* string call_to_action_text = 5;
* @param value The bytes for callToActionText to set.
* @return This builder for chaining.
*/
public Builder setCallToActionTextBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
callToActionText_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
private java.util.List carouselCards_ =
java.util.Collections.emptyList();
private void ensureCarouselCardsIsMutable() {
if (!((bitField0_ & 0x00000020) != 0)) {
carouselCards_ = new java.util.ArrayList(carouselCards_);
bitField0_ |= 0x00000020;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset, com.google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset.Builder, com.google.ads.googleads.v17.common.AdDemandGenCarouselCardAssetOrBuilder> carouselCardsBuilder_;
/**
*
* Required. Carousel cards that will display with the ad. Min 2 max 10.
*
*
* repeated .google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset carousel_cards = 6 [(.google.api.field_behavior) = REQUIRED];
*/
public java.util.List getCarouselCardsList() {
if (carouselCardsBuilder_ == null) {
return java.util.Collections.unmodifiableList(carouselCards_);
} else {
return carouselCardsBuilder_.getMessageList();
}
}
/**
*
* Required. Carousel cards that will display with the ad. Min 2 max 10.
*
*
* repeated .google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset carousel_cards = 6 [(.google.api.field_behavior) = REQUIRED];
*/
public int getCarouselCardsCount() {
if (carouselCardsBuilder_ == null) {
return carouselCards_.size();
} else {
return carouselCardsBuilder_.getCount();
}
}
/**
*
* Required. Carousel cards that will display with the ad. Min 2 max 10.
*
*
* repeated .google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset carousel_cards = 6 [(.google.api.field_behavior) = REQUIRED];
*/
public com.google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset getCarouselCards(int index) {
if (carouselCardsBuilder_ == null) {
return carouselCards_.get(index);
} else {
return carouselCardsBuilder_.getMessage(index);
}
}
/**
*
* Required. Carousel cards that will display with the ad. Min 2 max 10.
*
*
* repeated .google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset carousel_cards = 6 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder setCarouselCards(
int index, com.google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset value) {
if (carouselCardsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureCarouselCardsIsMutable();
carouselCards_.set(index, value);
onChanged();
} else {
carouselCardsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Required. Carousel cards that will display with the ad. Min 2 max 10.
*
*
* repeated .google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset carousel_cards = 6 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder setCarouselCards(
int index, com.google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset.Builder builderForValue) {
if (carouselCardsBuilder_ == null) {
ensureCarouselCardsIsMutable();
carouselCards_.set(index, builderForValue.build());
onChanged();
} else {
carouselCardsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Required. Carousel cards that will display with the ad. Min 2 max 10.
*
*
* repeated .google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset carousel_cards = 6 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder addCarouselCards(com.google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset value) {
if (carouselCardsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureCarouselCardsIsMutable();
carouselCards_.add(value);
onChanged();
} else {
carouselCardsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Required. Carousel cards that will display with the ad. Min 2 max 10.
*
*
* repeated .google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset carousel_cards = 6 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder addCarouselCards(
int index, com.google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset value) {
if (carouselCardsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureCarouselCardsIsMutable();
carouselCards_.add(index, value);
onChanged();
} else {
carouselCardsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Required. Carousel cards that will display with the ad. Min 2 max 10.
*
*
* repeated .google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset carousel_cards = 6 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder addCarouselCards(
com.google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset.Builder builderForValue) {
if (carouselCardsBuilder_ == null) {
ensureCarouselCardsIsMutable();
carouselCards_.add(builderForValue.build());
onChanged();
} else {
carouselCardsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Required. Carousel cards that will display with the ad. Min 2 max 10.
*
*
* repeated .google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset carousel_cards = 6 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder addCarouselCards(
int index, com.google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset.Builder builderForValue) {
if (carouselCardsBuilder_ == null) {
ensureCarouselCardsIsMutable();
carouselCards_.add(index, builderForValue.build());
onChanged();
} else {
carouselCardsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Required. Carousel cards that will display with the ad. Min 2 max 10.
*
*
* repeated .google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset carousel_cards = 6 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder addAllCarouselCards(
java.lang.Iterable extends com.google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset> values) {
if (carouselCardsBuilder_ == null) {
ensureCarouselCardsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, carouselCards_);
onChanged();
} else {
carouselCardsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Required. Carousel cards that will display with the ad. Min 2 max 10.
*
*
* repeated .google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset carousel_cards = 6 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder clearCarouselCards() {
if (carouselCardsBuilder_ == null) {
carouselCards_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000020);
onChanged();
} else {
carouselCardsBuilder_.clear();
}
return this;
}
/**
*
* Required. Carousel cards that will display with the ad. Min 2 max 10.
*
*
* repeated .google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset carousel_cards = 6 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder removeCarouselCards(int index) {
if (carouselCardsBuilder_ == null) {
ensureCarouselCardsIsMutable();
carouselCards_.remove(index);
onChanged();
} else {
carouselCardsBuilder_.remove(index);
}
return this;
}
/**
*
* Required. Carousel cards that will display with the ad. Min 2 max 10.
*
*
* repeated .google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset carousel_cards = 6 [(.google.api.field_behavior) = REQUIRED];
*/
public com.google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset.Builder getCarouselCardsBuilder(
int index) {
return getCarouselCardsFieldBuilder().getBuilder(index);
}
/**
*
* Required. Carousel cards that will display with the ad. Min 2 max 10.
*
*
* repeated .google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset carousel_cards = 6 [(.google.api.field_behavior) = REQUIRED];
*/
public com.google.ads.googleads.v17.common.AdDemandGenCarouselCardAssetOrBuilder getCarouselCardsOrBuilder(
int index) {
if (carouselCardsBuilder_ == null) {
return carouselCards_.get(index); } else {
return carouselCardsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Required. Carousel cards that will display with the ad. Min 2 max 10.
*
*
* repeated .google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset carousel_cards = 6 [(.google.api.field_behavior) = REQUIRED];
*/
public java.util.List extends com.google.ads.googleads.v17.common.AdDemandGenCarouselCardAssetOrBuilder>
getCarouselCardsOrBuilderList() {
if (carouselCardsBuilder_ != null) {
return carouselCardsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(carouselCards_);
}
}
/**
*
* Required. Carousel cards that will display with the ad. Min 2 max 10.
*
*
* repeated .google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset carousel_cards = 6 [(.google.api.field_behavior) = REQUIRED];
*/
public com.google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset.Builder addCarouselCardsBuilder() {
return getCarouselCardsFieldBuilder().addBuilder(
com.google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset.getDefaultInstance());
}
/**
*
* Required. Carousel cards that will display with the ad. Min 2 max 10.
*
*
* repeated .google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset carousel_cards = 6 [(.google.api.field_behavior) = REQUIRED];
*/
public com.google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset.Builder addCarouselCardsBuilder(
int index) {
return getCarouselCardsFieldBuilder().addBuilder(
index, com.google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset.getDefaultInstance());
}
/**
*
* Required. Carousel cards that will display with the ad. Min 2 max 10.
*
*
* repeated .google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset carousel_cards = 6 [(.google.api.field_behavior) = REQUIRED];
*/
public java.util.List
getCarouselCardsBuilderList() {
return getCarouselCardsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset, com.google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset.Builder, com.google.ads.googleads.v17.common.AdDemandGenCarouselCardAssetOrBuilder>
getCarouselCardsFieldBuilder() {
if (carouselCardsBuilder_ == null) {
carouselCardsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset, com.google.ads.googleads.v17.common.AdDemandGenCarouselCardAsset.Builder, com.google.ads.googleads.v17.common.AdDemandGenCarouselCardAssetOrBuilder>(
carouselCards_,
((bitField0_ & 0x00000020) != 0),
getParentForChildren(),
isClean());
carouselCards_ = null;
}
return carouselCardsBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.ads.googleads.v17.common.DemandGenCarouselAdInfo)
}
// @@protoc_insertion_point(class_scope:google.ads.googleads.v17.common.DemandGenCarouselAdInfo)
private static final com.google.ads.googleads.v17.common.DemandGenCarouselAdInfo DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.ads.googleads.v17.common.DemandGenCarouselAdInfo();
}
public static com.google.ads.googleads.v17.common.DemandGenCarouselAdInfo getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public DemandGenCarouselAdInfo parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.ads.googleads.v17.common.DemandGenCarouselAdInfo getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy