com.google.ads.googleads.v10.common.DiscoveryCarouselAdInfo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of google-ads-stubs-v10 Show documentation
Show all versions of google-ads-stubs-v10 Show documentation
Stubs for GAAPI version google-ads-stubs-v10
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/ads/googleads/v10/common/ad_type_infos.proto
package com.google.ads.googleads.v10.common;
/**
*
* A discovery carousel ad.
*
*
* Protobuf type {@code google.ads.googleads.v10.common.DiscoveryCarouselAdInfo}
*/
public final class DiscoveryCarouselAdInfo extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.ads.googleads.v10.common.DiscoveryCarouselAdInfo)
DiscoveryCarouselAdInfoOrBuilder {
private static final long serialVersionUID = 0L;
// Use DiscoveryCarouselAdInfo.newBuilder() to construct.
private DiscoveryCarouselAdInfo(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private DiscoveryCarouselAdInfo() {
businessName_ = "";
callToActionText_ = "";
carouselCards_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new DiscoveryCarouselAdInfo();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.ads.googleads.v10.common.AdTypeInfosProto.internal_static_google_ads_googleads_v10_common_DiscoveryCarouselAdInfo_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.ads.googleads.v10.common.AdTypeInfosProto.internal_static_google_ads_googleads_v10_common_DiscoveryCarouselAdInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ads.googleads.v10.common.DiscoveryCarouselAdInfo.class, com.google.ads.googleads.v10.common.DiscoveryCarouselAdInfo.Builder.class);
}
public static final int BUSINESS_NAME_FIELD_NUMBER = 1;
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.v10.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.v10.common.AdImageAsset logo_image = 2 [(.google.api.field_behavior) = REQUIRED];
* @return Whether the logoImage field is set.
*/
@java.lang.Override
public boolean hasLogoImage() {
return logoImage_ != null;
}
/**
*
* 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.v10.common.AdImageAsset logo_image = 2 [(.google.api.field_behavior) = REQUIRED];
* @return The logoImage.
*/
@java.lang.Override
public com.google.ads.googleads.v10.common.AdImageAsset getLogoImage() {
return logoImage_ == null ? com.google.ads.googleads.v10.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.v10.common.AdImageAsset logo_image = 2 [(.google.api.field_behavior) = REQUIRED];
*/
@java.lang.Override
public com.google.ads.googleads.v10.common.AdImageAssetOrBuilder getLogoImageOrBuilder() {
return getLogoImage();
}
public static final int HEADLINE_FIELD_NUMBER = 3;
private com.google.ads.googleads.v10.common.AdTextAsset headline_;
/**
*
* Required. Headline of the ad.
*
*
* .google.ads.googleads.v10.common.AdTextAsset headline = 3 [(.google.api.field_behavior) = REQUIRED];
* @return Whether the headline field is set.
*/
@java.lang.Override
public boolean hasHeadline() {
return headline_ != null;
}
/**
*
* Required. Headline of the ad.
*
*
* .google.ads.googleads.v10.common.AdTextAsset headline = 3 [(.google.api.field_behavior) = REQUIRED];
* @return The headline.
*/
@java.lang.Override
public com.google.ads.googleads.v10.common.AdTextAsset getHeadline() {
return headline_ == null ? com.google.ads.googleads.v10.common.AdTextAsset.getDefaultInstance() : headline_;
}
/**
*
* Required. Headline of the ad.
*
*
* .google.ads.googleads.v10.common.AdTextAsset headline = 3 [(.google.api.field_behavior) = REQUIRED];
*/
@java.lang.Override
public com.google.ads.googleads.v10.common.AdTextAssetOrBuilder getHeadlineOrBuilder() {
return getHeadline();
}
public static final int DESCRIPTION_FIELD_NUMBER = 4;
private com.google.ads.googleads.v10.common.AdTextAsset description_;
/**
*
* Required. The descriptive text of the ad.
*
*
* .google.ads.googleads.v10.common.AdTextAsset description = 4 [(.google.api.field_behavior) = REQUIRED];
* @return Whether the description field is set.
*/
@java.lang.Override
public boolean hasDescription() {
return description_ != null;
}
/**
*
* Required. The descriptive text of the ad.
*
*
* .google.ads.googleads.v10.common.AdTextAsset description = 4 [(.google.api.field_behavior) = REQUIRED];
* @return The description.
*/
@java.lang.Override
public com.google.ads.googleads.v10.common.AdTextAsset getDescription() {
return description_ == null ? com.google.ads.googleads.v10.common.AdTextAsset.getDefaultInstance() : description_;
}
/**
*
* Required. The descriptive text of the ad.
*
*
* .google.ads.googleads.v10.common.AdTextAsset description = 4 [(.google.api.field_behavior) = REQUIRED];
*/
@java.lang.Override
public com.google.ads.googleads.v10.common.AdTextAssetOrBuilder getDescriptionOrBuilder() {
return getDescription();
}
public static final int CALL_TO_ACTION_TEXT_FIELD_NUMBER = 5;
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;
private java.util.List carouselCards_;
/**
*
* Required. Carousel cards that will display with the ad. Min 2 max 10.
*
*
* repeated .google.ads.googleads.v10.common.AdDiscoveryCarouselCardAsset 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.v10.common.AdDiscoveryCarouselCardAsset carousel_cards = 6 [(.google.api.field_behavior) = REQUIRED];
*/
@java.lang.Override
public java.util.List extends com.google.ads.googleads.v10.common.AdDiscoveryCarouselCardAssetOrBuilder>
getCarouselCardsOrBuilderList() {
return carouselCards_;
}
/**
*
* Required. Carousel cards that will display with the ad. Min 2 max 10.
*
*
* repeated .google.ads.googleads.v10.common.AdDiscoveryCarouselCardAsset 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.v10.common.AdDiscoveryCarouselCardAsset carousel_cards = 6 [(.google.api.field_behavior) = REQUIRED];
*/
@java.lang.Override
public com.google.ads.googleads.v10.common.AdDiscoveryCarouselCardAsset getCarouselCards(int index) {
return carouselCards_.get(index);
}
/**
*
* Required. Carousel cards that will display with the ad. Min 2 max 10.
*
*
* repeated .google.ads.googleads.v10.common.AdDiscoveryCarouselCardAsset carousel_cards = 6 [(.google.api.field_behavior) = REQUIRED];
*/
@java.lang.Override
public com.google.ads.googleads.v10.common.AdDiscoveryCarouselCardAssetOrBuilder 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 (logoImage_ != null) {
output.writeMessage(2, getLogoImage());
}
if (headline_ != null) {
output.writeMessage(3, getHeadline());
}
if (description_ != null) {
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 (logoImage_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getLogoImage());
}
if (headline_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getHeadline());
}
if (description_ != null) {
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.v10.common.DiscoveryCarouselAdInfo)) {
return super.equals(obj);
}
com.google.ads.googleads.v10.common.DiscoveryCarouselAdInfo other = (com.google.ads.googleads.v10.common.DiscoveryCarouselAdInfo) 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.v10.common.DiscoveryCarouselAdInfo parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v10.common.DiscoveryCarouselAdInfo 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.v10.common.DiscoveryCarouselAdInfo parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v10.common.DiscoveryCarouselAdInfo 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.v10.common.DiscoveryCarouselAdInfo parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v10.common.DiscoveryCarouselAdInfo parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.ads.googleads.v10.common.DiscoveryCarouselAdInfo parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.ads.googleads.v10.common.DiscoveryCarouselAdInfo 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.v10.common.DiscoveryCarouselAdInfo parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.ads.googleads.v10.common.DiscoveryCarouselAdInfo 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.v10.common.DiscoveryCarouselAdInfo parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.ads.googleads.v10.common.DiscoveryCarouselAdInfo 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.v10.common.DiscoveryCarouselAdInfo 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 discovery carousel ad.
*
*
* Protobuf type {@code google.ads.googleads.v10.common.DiscoveryCarouselAdInfo}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.ads.googleads.v10.common.DiscoveryCarouselAdInfo)
com.google.ads.googleads.v10.common.DiscoveryCarouselAdInfoOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.ads.googleads.v10.common.AdTypeInfosProto.internal_static_google_ads_googleads_v10_common_DiscoveryCarouselAdInfo_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.ads.googleads.v10.common.AdTypeInfosProto.internal_static_google_ads_googleads_v10_common_DiscoveryCarouselAdInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ads.googleads.v10.common.DiscoveryCarouselAdInfo.class, com.google.ads.googleads.v10.common.DiscoveryCarouselAdInfo.Builder.class);
}
// Construct using com.google.ads.googleads.v10.common.DiscoveryCarouselAdInfo.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
businessName_ = "";
if (logoImageBuilder_ == null) {
logoImage_ = null;
} else {
logoImage_ = null;
logoImageBuilder_ = null;
}
if (headlineBuilder_ == null) {
headline_ = null;
} else {
headline_ = null;
headlineBuilder_ = null;
}
if (descriptionBuilder_ == null) {
description_ = null;
} else {
description_ = null;
descriptionBuilder_ = null;
}
callToActionText_ = "";
if (carouselCardsBuilder_ == null) {
carouselCards_ = java.util.Collections.emptyList();
} else {
carouselCards_ = null;
carouselCardsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.ads.googleads.v10.common.AdTypeInfosProto.internal_static_google_ads_googleads_v10_common_DiscoveryCarouselAdInfo_descriptor;
}
@java.lang.Override
public com.google.ads.googleads.v10.common.DiscoveryCarouselAdInfo getDefaultInstanceForType() {
return com.google.ads.googleads.v10.common.DiscoveryCarouselAdInfo.getDefaultInstance();
}
@java.lang.Override
public com.google.ads.googleads.v10.common.DiscoveryCarouselAdInfo build() {
com.google.ads.googleads.v10.common.DiscoveryCarouselAdInfo result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.ads.googleads.v10.common.DiscoveryCarouselAdInfo buildPartial() {
com.google.ads.googleads.v10.common.DiscoveryCarouselAdInfo result = new com.google.ads.googleads.v10.common.DiscoveryCarouselAdInfo(this);
int from_bitField0_ = bitField0_;
result.businessName_ = businessName_;
if (logoImageBuilder_ == null) {
result.logoImage_ = logoImage_;
} else {
result.logoImage_ = logoImageBuilder_.build();
}
if (headlineBuilder_ == null) {
result.headline_ = headline_;
} else {
result.headline_ = headlineBuilder_.build();
}
if (descriptionBuilder_ == null) {
result.description_ = description_;
} else {
result.description_ = descriptionBuilder_.build();
}
result.callToActionText_ = callToActionText_;
if (carouselCardsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
carouselCards_ = java.util.Collections.unmodifiableList(carouselCards_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.carouselCards_ = carouselCards_;
} else {
result.carouselCards_ = carouselCardsBuilder_.build();
}
onBuilt();
return result;
}
@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.v10.common.DiscoveryCarouselAdInfo) {
return mergeFrom((com.google.ads.googleads.v10.common.DiscoveryCarouselAdInfo)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.ads.googleads.v10.common.DiscoveryCarouselAdInfo other) {
if (other == com.google.ads.googleads.v10.common.DiscoveryCarouselAdInfo.getDefaultInstance()) return this;
if (!other.getBusinessName().isEmpty()) {
businessName_ = other.businessName_;
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_;
onChanged();
}
if (carouselCardsBuilder_ == null) {
if (!other.carouselCards_.isEmpty()) {
if (carouselCards_.isEmpty()) {
carouselCards_ = other.carouselCards_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureCarouselCardsIsMutable();
carouselCards_.addAll(other.carouselCards_);
}
onChanged();
}
} else {
if (!other.carouselCards_.isEmpty()) {
if (carouselCardsBuilder_.isEmpty()) {
carouselCardsBuilder_.dispose();
carouselCardsBuilder_ = null;
carouselCards_ = other.carouselCards_;
bitField0_ = (bitField0_ & ~0x00000001);
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();
break;
} // case 10
case 18: {
input.readMessage(
getLogoImageFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 18
case 26: {
input.readMessage(
getHeadlineFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 26
case 34: {
input.readMessage(
getDescriptionFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 34
case 42: {
callToActionText_ = input.readStringRequireUtf8();
break;
} // case 42
case 50: {
com.google.ads.googleads.v10.common.AdDiscoveryCarouselCardAsset m =
input.readMessage(
com.google.ads.googleads.v10.common.AdDiscoveryCarouselCardAsset.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;
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();
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;
onChanged();
return this;
}
private com.google.ads.googleads.v10.common.AdImageAsset logoImage_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v10.common.AdImageAsset, com.google.ads.googleads.v10.common.AdImageAsset.Builder, com.google.ads.googleads.v10.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.v10.common.AdImageAsset logo_image = 2 [(.google.api.field_behavior) = REQUIRED];
* @return Whether the logoImage field is set.
*/
public boolean hasLogoImage() {
return logoImageBuilder_ != null || logoImage_ != null;
}
/**
*
* 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.v10.common.AdImageAsset logo_image = 2 [(.google.api.field_behavior) = REQUIRED];
* @return The logoImage.
*/
public com.google.ads.googleads.v10.common.AdImageAsset getLogoImage() {
if (logoImageBuilder_ == null) {
return logoImage_ == null ? com.google.ads.googleads.v10.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.v10.common.AdImageAsset logo_image = 2 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder setLogoImage(com.google.ads.googleads.v10.common.AdImageAsset value) {
if (logoImageBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
logoImage_ = value;
onChanged();
} else {
logoImageBuilder_.setMessage(value);
}
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.v10.common.AdImageAsset logo_image = 2 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder setLogoImage(
com.google.ads.googleads.v10.common.AdImageAsset.Builder builderForValue) {
if (logoImageBuilder_ == null) {
logoImage_ = builderForValue.build();
onChanged();
} else {
logoImageBuilder_.setMessage(builderForValue.build());
}
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.v10.common.AdImageAsset logo_image = 2 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder mergeLogoImage(com.google.ads.googleads.v10.common.AdImageAsset value) {
if (logoImageBuilder_ == null) {
if (logoImage_ != null) {
logoImage_ =
com.google.ads.googleads.v10.common.AdImageAsset.newBuilder(logoImage_).mergeFrom(value).buildPartial();
} else {
logoImage_ = value;
}
onChanged();
} else {
logoImageBuilder_.mergeFrom(value);
}
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.v10.common.AdImageAsset logo_image = 2 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder clearLogoImage() {
if (logoImageBuilder_ == null) {
logoImage_ = null;
onChanged();
} else {
logoImage_ = null;
logoImageBuilder_ = null;
}
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.v10.common.AdImageAsset logo_image = 2 [(.google.api.field_behavior) = REQUIRED];
*/
public com.google.ads.googleads.v10.common.AdImageAsset.Builder getLogoImageBuilder() {
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.v10.common.AdImageAsset logo_image = 2 [(.google.api.field_behavior) = REQUIRED];
*/
public com.google.ads.googleads.v10.common.AdImageAssetOrBuilder getLogoImageOrBuilder() {
if (logoImageBuilder_ != null) {
return logoImageBuilder_.getMessageOrBuilder();
} else {
return logoImage_ == null ?
com.google.ads.googleads.v10.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.v10.common.AdImageAsset logo_image = 2 [(.google.api.field_behavior) = REQUIRED];
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v10.common.AdImageAsset, com.google.ads.googleads.v10.common.AdImageAsset.Builder, com.google.ads.googleads.v10.common.AdImageAssetOrBuilder>
getLogoImageFieldBuilder() {
if (logoImageBuilder_ == null) {
logoImageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v10.common.AdImageAsset, com.google.ads.googleads.v10.common.AdImageAsset.Builder, com.google.ads.googleads.v10.common.AdImageAssetOrBuilder>(
getLogoImage(),
getParentForChildren(),
isClean());
logoImage_ = null;
}
return logoImageBuilder_;
}
private com.google.ads.googleads.v10.common.AdTextAsset headline_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v10.common.AdTextAsset, com.google.ads.googleads.v10.common.AdTextAsset.Builder, com.google.ads.googleads.v10.common.AdTextAssetOrBuilder> headlineBuilder_;
/**
*
* Required. Headline of the ad.
*
*
* .google.ads.googleads.v10.common.AdTextAsset headline = 3 [(.google.api.field_behavior) = REQUIRED];
* @return Whether the headline field is set.
*/
public boolean hasHeadline() {
return headlineBuilder_ != null || headline_ != null;
}
/**
*
* Required. Headline of the ad.
*
*
* .google.ads.googleads.v10.common.AdTextAsset headline = 3 [(.google.api.field_behavior) = REQUIRED];
* @return The headline.
*/
public com.google.ads.googleads.v10.common.AdTextAsset getHeadline() {
if (headlineBuilder_ == null) {
return headline_ == null ? com.google.ads.googleads.v10.common.AdTextAsset.getDefaultInstance() : headline_;
} else {
return headlineBuilder_.getMessage();
}
}
/**
*
* Required. Headline of the ad.
*
*
* .google.ads.googleads.v10.common.AdTextAsset headline = 3 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder setHeadline(com.google.ads.googleads.v10.common.AdTextAsset value) {
if (headlineBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
headline_ = value;
onChanged();
} else {
headlineBuilder_.setMessage(value);
}
return this;
}
/**
*
* Required. Headline of the ad.
*
*
* .google.ads.googleads.v10.common.AdTextAsset headline = 3 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder setHeadline(
com.google.ads.googleads.v10.common.AdTextAsset.Builder builderForValue) {
if (headlineBuilder_ == null) {
headline_ = builderForValue.build();
onChanged();
} else {
headlineBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Required. Headline of the ad.
*
*
* .google.ads.googleads.v10.common.AdTextAsset headline = 3 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder mergeHeadline(com.google.ads.googleads.v10.common.AdTextAsset value) {
if (headlineBuilder_ == null) {
if (headline_ != null) {
headline_ =
com.google.ads.googleads.v10.common.AdTextAsset.newBuilder(headline_).mergeFrom(value).buildPartial();
} else {
headline_ = value;
}
onChanged();
} else {
headlineBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Required. Headline of the ad.
*
*
* .google.ads.googleads.v10.common.AdTextAsset headline = 3 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder clearHeadline() {
if (headlineBuilder_ == null) {
headline_ = null;
onChanged();
} else {
headline_ = null;
headlineBuilder_ = null;
}
return this;
}
/**
*
* Required. Headline of the ad.
*
*
* .google.ads.googleads.v10.common.AdTextAsset headline = 3 [(.google.api.field_behavior) = REQUIRED];
*/
public com.google.ads.googleads.v10.common.AdTextAsset.Builder getHeadlineBuilder() {
onChanged();
return getHeadlineFieldBuilder().getBuilder();
}
/**
*
* Required. Headline of the ad.
*
*
* .google.ads.googleads.v10.common.AdTextAsset headline = 3 [(.google.api.field_behavior) = REQUIRED];
*/
public com.google.ads.googleads.v10.common.AdTextAssetOrBuilder getHeadlineOrBuilder() {
if (headlineBuilder_ != null) {
return headlineBuilder_.getMessageOrBuilder();
} else {
return headline_ == null ?
com.google.ads.googleads.v10.common.AdTextAsset.getDefaultInstance() : headline_;
}
}
/**
*
* Required. Headline of the ad.
*
*
* .google.ads.googleads.v10.common.AdTextAsset headline = 3 [(.google.api.field_behavior) = REQUIRED];
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v10.common.AdTextAsset, com.google.ads.googleads.v10.common.AdTextAsset.Builder, com.google.ads.googleads.v10.common.AdTextAssetOrBuilder>
getHeadlineFieldBuilder() {
if (headlineBuilder_ == null) {
headlineBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v10.common.AdTextAsset, com.google.ads.googleads.v10.common.AdTextAsset.Builder, com.google.ads.googleads.v10.common.AdTextAssetOrBuilder>(
getHeadline(),
getParentForChildren(),
isClean());
headline_ = null;
}
return headlineBuilder_;
}
private com.google.ads.googleads.v10.common.AdTextAsset description_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v10.common.AdTextAsset, com.google.ads.googleads.v10.common.AdTextAsset.Builder, com.google.ads.googleads.v10.common.AdTextAssetOrBuilder> descriptionBuilder_;
/**
*
* Required. The descriptive text of the ad.
*
*
* .google.ads.googleads.v10.common.AdTextAsset description = 4 [(.google.api.field_behavior) = REQUIRED];
* @return Whether the description field is set.
*/
public boolean hasDescription() {
return descriptionBuilder_ != null || description_ != null;
}
/**
*
* Required. The descriptive text of the ad.
*
*
* .google.ads.googleads.v10.common.AdTextAsset description = 4 [(.google.api.field_behavior) = REQUIRED];
* @return The description.
*/
public com.google.ads.googleads.v10.common.AdTextAsset getDescription() {
if (descriptionBuilder_ == null) {
return description_ == null ? com.google.ads.googleads.v10.common.AdTextAsset.getDefaultInstance() : description_;
} else {
return descriptionBuilder_.getMessage();
}
}
/**
*
* Required. The descriptive text of the ad.
*
*
* .google.ads.googleads.v10.common.AdTextAsset description = 4 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder setDescription(com.google.ads.googleads.v10.common.AdTextAsset value) {
if (descriptionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
description_ = value;
onChanged();
} else {
descriptionBuilder_.setMessage(value);
}
return this;
}
/**
*
* Required. The descriptive text of the ad.
*
*
* .google.ads.googleads.v10.common.AdTextAsset description = 4 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder setDescription(
com.google.ads.googleads.v10.common.AdTextAsset.Builder builderForValue) {
if (descriptionBuilder_ == null) {
description_ = builderForValue.build();
onChanged();
} else {
descriptionBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Required. The descriptive text of the ad.
*
*
* .google.ads.googleads.v10.common.AdTextAsset description = 4 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder mergeDescription(com.google.ads.googleads.v10.common.AdTextAsset value) {
if (descriptionBuilder_ == null) {
if (description_ != null) {
description_ =
com.google.ads.googleads.v10.common.AdTextAsset.newBuilder(description_).mergeFrom(value).buildPartial();
} else {
description_ = value;
}
onChanged();
} else {
descriptionBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Required. The descriptive text of the ad.
*
*
* .google.ads.googleads.v10.common.AdTextAsset description = 4 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder clearDescription() {
if (descriptionBuilder_ == null) {
description_ = null;
onChanged();
} else {
description_ = null;
descriptionBuilder_ = null;
}
return this;
}
/**
*
* Required. The descriptive text of the ad.
*
*
* .google.ads.googleads.v10.common.AdTextAsset description = 4 [(.google.api.field_behavior) = REQUIRED];
*/
public com.google.ads.googleads.v10.common.AdTextAsset.Builder getDescriptionBuilder() {
onChanged();
return getDescriptionFieldBuilder().getBuilder();
}
/**
*
* Required. The descriptive text of the ad.
*
*
* .google.ads.googleads.v10.common.AdTextAsset description = 4 [(.google.api.field_behavior) = REQUIRED];
*/
public com.google.ads.googleads.v10.common.AdTextAssetOrBuilder getDescriptionOrBuilder() {
if (descriptionBuilder_ != null) {
return descriptionBuilder_.getMessageOrBuilder();
} else {
return description_ == null ?
com.google.ads.googleads.v10.common.AdTextAsset.getDefaultInstance() : description_;
}
}
/**
*
* Required. The descriptive text of the ad.
*
*
* .google.ads.googleads.v10.common.AdTextAsset description = 4 [(.google.api.field_behavior) = REQUIRED];
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v10.common.AdTextAsset, com.google.ads.googleads.v10.common.AdTextAsset.Builder, com.google.ads.googleads.v10.common.AdTextAssetOrBuilder>
getDescriptionFieldBuilder() {
if (descriptionBuilder_ == null) {
descriptionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v10.common.AdTextAsset, com.google.ads.googleads.v10.common.AdTextAsset.Builder, com.google.ads.googleads.v10.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;
onChanged();
return this;
}
/**
*
* Call to action text.
*
*
* string call_to_action_text = 5;
* @return This builder for chaining.
*/
public Builder clearCallToActionText() {
callToActionText_ = getDefaultInstance().getCallToActionText();
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;
onChanged();
return this;
}
private java.util.List carouselCards_ =
java.util.Collections.emptyList();
private void ensureCarouselCardsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
carouselCards_ = new java.util.ArrayList(carouselCards_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.ads.googleads.v10.common.AdDiscoveryCarouselCardAsset, com.google.ads.googleads.v10.common.AdDiscoveryCarouselCardAsset.Builder, com.google.ads.googleads.v10.common.AdDiscoveryCarouselCardAssetOrBuilder> carouselCardsBuilder_;
/**
*
* Required. Carousel cards that will display with the ad. Min 2 max 10.
*
*
* repeated .google.ads.googleads.v10.common.AdDiscoveryCarouselCardAsset 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.v10.common.AdDiscoveryCarouselCardAsset 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.v10.common.AdDiscoveryCarouselCardAsset carousel_cards = 6 [(.google.api.field_behavior) = REQUIRED];
*/
public com.google.ads.googleads.v10.common.AdDiscoveryCarouselCardAsset 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.v10.common.AdDiscoveryCarouselCardAsset carousel_cards = 6 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder setCarouselCards(
int index, com.google.ads.googleads.v10.common.AdDiscoveryCarouselCardAsset 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.v10.common.AdDiscoveryCarouselCardAsset carousel_cards = 6 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder setCarouselCards(
int index, com.google.ads.googleads.v10.common.AdDiscoveryCarouselCardAsset.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.v10.common.AdDiscoveryCarouselCardAsset carousel_cards = 6 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder addCarouselCards(com.google.ads.googleads.v10.common.AdDiscoveryCarouselCardAsset 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.v10.common.AdDiscoveryCarouselCardAsset carousel_cards = 6 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder addCarouselCards(
int index, com.google.ads.googleads.v10.common.AdDiscoveryCarouselCardAsset 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.v10.common.AdDiscoveryCarouselCardAsset carousel_cards = 6 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder addCarouselCards(
com.google.ads.googleads.v10.common.AdDiscoveryCarouselCardAsset.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.v10.common.AdDiscoveryCarouselCardAsset carousel_cards = 6 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder addCarouselCards(
int index, com.google.ads.googleads.v10.common.AdDiscoveryCarouselCardAsset.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.v10.common.AdDiscoveryCarouselCardAsset carousel_cards = 6 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder addAllCarouselCards(
java.lang.Iterable extends com.google.ads.googleads.v10.common.AdDiscoveryCarouselCardAsset> 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.v10.common.AdDiscoveryCarouselCardAsset carousel_cards = 6 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder clearCarouselCards() {
if (carouselCardsBuilder_ == null) {
carouselCards_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
carouselCardsBuilder_.clear();
}
return this;
}
/**
*
* Required. Carousel cards that will display with the ad. Min 2 max 10.
*
*
* repeated .google.ads.googleads.v10.common.AdDiscoveryCarouselCardAsset 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.v10.common.AdDiscoveryCarouselCardAsset carousel_cards = 6 [(.google.api.field_behavior) = REQUIRED];
*/
public com.google.ads.googleads.v10.common.AdDiscoveryCarouselCardAsset.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.v10.common.AdDiscoveryCarouselCardAsset carousel_cards = 6 [(.google.api.field_behavior) = REQUIRED];
*/
public com.google.ads.googleads.v10.common.AdDiscoveryCarouselCardAssetOrBuilder 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.v10.common.AdDiscoveryCarouselCardAsset carousel_cards = 6 [(.google.api.field_behavior) = REQUIRED];
*/
public java.util.List extends com.google.ads.googleads.v10.common.AdDiscoveryCarouselCardAssetOrBuilder>
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.v10.common.AdDiscoveryCarouselCardAsset carousel_cards = 6 [(.google.api.field_behavior) = REQUIRED];
*/
public com.google.ads.googleads.v10.common.AdDiscoveryCarouselCardAsset.Builder addCarouselCardsBuilder() {
return getCarouselCardsFieldBuilder().addBuilder(
com.google.ads.googleads.v10.common.AdDiscoveryCarouselCardAsset.getDefaultInstance());
}
/**
*
* Required. Carousel cards that will display with the ad. Min 2 max 10.
*
*
* repeated .google.ads.googleads.v10.common.AdDiscoveryCarouselCardAsset carousel_cards = 6 [(.google.api.field_behavior) = REQUIRED];
*/
public com.google.ads.googleads.v10.common.AdDiscoveryCarouselCardAsset.Builder addCarouselCardsBuilder(
int index) {
return getCarouselCardsFieldBuilder().addBuilder(
index, com.google.ads.googleads.v10.common.AdDiscoveryCarouselCardAsset.getDefaultInstance());
}
/**
*
* Required. Carousel cards that will display with the ad. Min 2 max 10.
*
*
* repeated .google.ads.googleads.v10.common.AdDiscoveryCarouselCardAsset 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.v10.common.AdDiscoveryCarouselCardAsset, com.google.ads.googleads.v10.common.AdDiscoveryCarouselCardAsset.Builder, com.google.ads.googleads.v10.common.AdDiscoveryCarouselCardAssetOrBuilder>
getCarouselCardsFieldBuilder() {
if (carouselCardsBuilder_ == null) {
carouselCardsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.ads.googleads.v10.common.AdDiscoveryCarouselCardAsset, com.google.ads.googleads.v10.common.AdDiscoveryCarouselCardAsset.Builder, com.google.ads.googleads.v10.common.AdDiscoveryCarouselCardAssetOrBuilder>(
carouselCards_,
((bitField0_ & 0x00000001) != 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.v10.common.DiscoveryCarouselAdInfo)
}
// @@protoc_insertion_point(class_scope:google.ads.googleads.v10.common.DiscoveryCarouselAdInfo)
private static final com.google.ads.googleads.v10.common.DiscoveryCarouselAdInfo DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.ads.googleads.v10.common.DiscoveryCarouselAdInfo();
}
public static com.google.ads.googleads.v10.common.DiscoveryCarouselAdInfo getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public DiscoveryCarouselAdInfo 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.v10.common.DiscoveryCarouselAdInfo getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy