com.google.ads.googleads.v10.resources.MediaFile 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/resources/media_file.proto
package com.google.ads.googleads.v10.resources;
/**
*
* A media file.
*
*
* Protobuf type {@code google.ads.googleads.v10.resources.MediaFile}
*/
public final class MediaFile extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.ads.googleads.v10.resources.MediaFile)
MediaFileOrBuilder {
private static final long serialVersionUID = 0L;
// Use MediaFile.newBuilder() to construct.
private MediaFile(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private MediaFile() {
resourceName_ = "";
type_ = 0;
mimeType_ = 0;
sourceUrl_ = "";
name_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new MediaFile();
}
@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.resources.MediaFileProto.internal_static_google_ads_googleads_v10_resources_MediaFile_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.ads.googleads.v10.resources.MediaFileProto.internal_static_google_ads_googleads_v10_resources_MediaFile_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ads.googleads.v10.resources.MediaFile.class, com.google.ads.googleads.v10.resources.MediaFile.Builder.class);
}
private int bitField0_;
private int mediatypeCase_ = 0;
private java.lang.Object mediatype_;
public enum MediatypeCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
IMAGE(3),
MEDIA_BUNDLE(4),
AUDIO(10),
VIDEO(11),
MEDIATYPE_NOT_SET(0);
private final int value;
private MediatypeCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static MediatypeCase valueOf(int value) {
return forNumber(value);
}
public static MediatypeCase forNumber(int value) {
switch (value) {
case 3: return IMAGE;
case 4: return MEDIA_BUNDLE;
case 10: return AUDIO;
case 11: return VIDEO;
case 0: return MEDIATYPE_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public MediatypeCase
getMediatypeCase() {
return MediatypeCase.forNumber(
mediatypeCase_);
}
public static final int RESOURCE_NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object resourceName_;
/**
*
* Immutable. The resource name of the media file.
* Media file resource names have the form:
* `customers/{customer_id}/mediaFiles/{media_file_id}`
*
*
* string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return The resourceName.
*/
@java.lang.Override
public java.lang.String getResourceName() {
java.lang.Object ref = resourceName_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
resourceName_ = s;
return s;
}
}
/**
*
* Immutable. The resource name of the media file.
* Media file resource names have the form:
* `customers/{customer_id}/mediaFiles/{media_file_id}`
*
*
* string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return The bytes for resourceName.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getResourceNameBytes() {
java.lang.Object ref = resourceName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
resourceName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ID_FIELD_NUMBER = 12;
private long id_;
/**
*
* Output only. The ID of the media file.
*
*
* optional int64 id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return Whether the id field is set.
*/
@java.lang.Override
public boolean hasId() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Output only. The ID of the media file.
*
*
* optional int64 id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return The id.
*/
@java.lang.Override
public long getId() {
return id_;
}
public static final int TYPE_FIELD_NUMBER = 5;
private int type_;
/**
*
* Immutable. Type of the media file.
*
*
* .google.ads.googleads.v10.enums.MediaTypeEnum.MediaType type = 5 [(.google.api.field_behavior) = IMMUTABLE];
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override public int getTypeValue() {
return type_;
}
/**
*
* Immutable. Type of the media file.
*
*
* .google.ads.googleads.v10.enums.MediaTypeEnum.MediaType type = 5 [(.google.api.field_behavior) = IMMUTABLE];
* @return The type.
*/
@java.lang.Override public com.google.ads.googleads.v10.enums.MediaTypeEnum.MediaType getType() {
@SuppressWarnings("deprecation")
com.google.ads.googleads.v10.enums.MediaTypeEnum.MediaType result = com.google.ads.googleads.v10.enums.MediaTypeEnum.MediaType.valueOf(type_);
return result == null ? com.google.ads.googleads.v10.enums.MediaTypeEnum.MediaType.UNRECOGNIZED : result;
}
public static final int MIME_TYPE_FIELD_NUMBER = 6;
private int mimeType_;
/**
*
* Output only. The mime type of the media file.
*
*
* .google.ads.googleads.v10.enums.MimeTypeEnum.MimeType mime_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return The enum numeric value on the wire for mimeType.
*/
@java.lang.Override public int getMimeTypeValue() {
return mimeType_;
}
/**
*
* Output only. The mime type of the media file.
*
*
* .google.ads.googleads.v10.enums.MimeTypeEnum.MimeType mime_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return The mimeType.
*/
@java.lang.Override public com.google.ads.googleads.v10.enums.MimeTypeEnum.MimeType getMimeType() {
@SuppressWarnings("deprecation")
com.google.ads.googleads.v10.enums.MimeTypeEnum.MimeType result = com.google.ads.googleads.v10.enums.MimeTypeEnum.MimeType.valueOf(mimeType_);
return result == null ? com.google.ads.googleads.v10.enums.MimeTypeEnum.MimeType.UNRECOGNIZED : result;
}
public static final int SOURCE_URL_FIELD_NUMBER = 13;
private volatile java.lang.Object sourceUrl_;
/**
*
* Immutable. The URL of where the original media file was downloaded from (or a file
* name). Only used for media of type AUDIO and IMAGE.
*
*
* optional string source_url = 13 [(.google.api.field_behavior) = IMMUTABLE];
* @return Whether the sourceUrl field is set.
*/
@java.lang.Override
public boolean hasSourceUrl() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Immutable. The URL of where the original media file was downloaded from (or a file
* name). Only used for media of type AUDIO and IMAGE.
*
*
* optional string source_url = 13 [(.google.api.field_behavior) = IMMUTABLE];
* @return The sourceUrl.
*/
@java.lang.Override
public java.lang.String getSourceUrl() {
java.lang.Object ref = sourceUrl_;
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();
sourceUrl_ = s;
return s;
}
}
/**
*
* Immutable. The URL of where the original media file was downloaded from (or a file
* name). Only used for media of type AUDIO and IMAGE.
*
*
* optional string source_url = 13 [(.google.api.field_behavior) = IMMUTABLE];
* @return The bytes for sourceUrl.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getSourceUrlBytes() {
java.lang.Object ref = sourceUrl_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
sourceUrl_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int NAME_FIELD_NUMBER = 14;
private volatile java.lang.Object name_;
/**
*
* Immutable. The name of the media file. The name can be used by clients to help
* identify previously uploaded media.
*
*
* optional string name = 14 [(.google.api.field_behavior) = IMMUTABLE];
* @return Whether the name field is set.
*/
@java.lang.Override
public boolean hasName() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Immutable. The name of the media file. The name can be used by clients to help
* identify previously uploaded media.
*
*
* optional string name = 14 [(.google.api.field_behavior) = IMMUTABLE];
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
}
}
/**
*
* Immutable. The name of the media file. The name can be used by clients to help
* identify previously uploaded media.
*
*
* optional string name = 14 [(.google.api.field_behavior) = IMMUTABLE];
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int FILE_SIZE_FIELD_NUMBER = 15;
private long fileSize_;
/**
*
* Output only. The size of the media file in bytes.
*
*
* optional int64 file_size = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return Whether the fileSize field is set.
*/
@java.lang.Override
public boolean hasFileSize() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* Output only. The size of the media file in bytes.
*
*
* optional int64 file_size = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return The fileSize.
*/
@java.lang.Override
public long getFileSize() {
return fileSize_;
}
public static final int IMAGE_FIELD_NUMBER = 3;
/**
*
* Immutable. Encapsulates an Image.
*
*
* .google.ads.googleads.v10.resources.MediaImage image = 3 [(.google.api.field_behavior) = IMMUTABLE];
* @return Whether the image field is set.
*/
@java.lang.Override
public boolean hasImage() {
return mediatypeCase_ == 3;
}
/**
*
* Immutable. Encapsulates an Image.
*
*
* .google.ads.googleads.v10.resources.MediaImage image = 3 [(.google.api.field_behavior) = IMMUTABLE];
* @return The image.
*/
@java.lang.Override
public com.google.ads.googleads.v10.resources.MediaImage getImage() {
if (mediatypeCase_ == 3) {
return (com.google.ads.googleads.v10.resources.MediaImage) mediatype_;
}
return com.google.ads.googleads.v10.resources.MediaImage.getDefaultInstance();
}
/**
*
* Immutable. Encapsulates an Image.
*
*
* .google.ads.googleads.v10.resources.MediaImage image = 3 [(.google.api.field_behavior) = IMMUTABLE];
*/
@java.lang.Override
public com.google.ads.googleads.v10.resources.MediaImageOrBuilder getImageOrBuilder() {
if (mediatypeCase_ == 3) {
return (com.google.ads.googleads.v10.resources.MediaImage) mediatype_;
}
return com.google.ads.googleads.v10.resources.MediaImage.getDefaultInstance();
}
public static final int MEDIA_BUNDLE_FIELD_NUMBER = 4;
/**
*
* Immutable. A ZIP archive media the content of which contains HTML5 assets.
*
*
* .google.ads.googleads.v10.resources.MediaBundle media_bundle = 4 [(.google.api.field_behavior) = IMMUTABLE];
* @return Whether the mediaBundle field is set.
*/
@java.lang.Override
public boolean hasMediaBundle() {
return mediatypeCase_ == 4;
}
/**
*
* Immutable. A ZIP archive media the content of which contains HTML5 assets.
*
*
* .google.ads.googleads.v10.resources.MediaBundle media_bundle = 4 [(.google.api.field_behavior) = IMMUTABLE];
* @return The mediaBundle.
*/
@java.lang.Override
public com.google.ads.googleads.v10.resources.MediaBundle getMediaBundle() {
if (mediatypeCase_ == 4) {
return (com.google.ads.googleads.v10.resources.MediaBundle) mediatype_;
}
return com.google.ads.googleads.v10.resources.MediaBundle.getDefaultInstance();
}
/**
*
* Immutable. A ZIP archive media the content of which contains HTML5 assets.
*
*
* .google.ads.googleads.v10.resources.MediaBundle media_bundle = 4 [(.google.api.field_behavior) = IMMUTABLE];
*/
@java.lang.Override
public com.google.ads.googleads.v10.resources.MediaBundleOrBuilder getMediaBundleOrBuilder() {
if (mediatypeCase_ == 4) {
return (com.google.ads.googleads.v10.resources.MediaBundle) mediatype_;
}
return com.google.ads.googleads.v10.resources.MediaBundle.getDefaultInstance();
}
public static final int AUDIO_FIELD_NUMBER = 10;
/**
*
* Output only. Encapsulates an Audio.
*
*
* .google.ads.googleads.v10.resources.MediaAudio audio = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return Whether the audio field is set.
*/
@java.lang.Override
public boolean hasAudio() {
return mediatypeCase_ == 10;
}
/**
*
* Output only. Encapsulates an Audio.
*
*
* .google.ads.googleads.v10.resources.MediaAudio audio = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return The audio.
*/
@java.lang.Override
public com.google.ads.googleads.v10.resources.MediaAudio getAudio() {
if (mediatypeCase_ == 10) {
return (com.google.ads.googleads.v10.resources.MediaAudio) mediatype_;
}
return com.google.ads.googleads.v10.resources.MediaAudio.getDefaultInstance();
}
/**
*
* Output only. Encapsulates an Audio.
*
*
* .google.ads.googleads.v10.resources.MediaAudio audio = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
@java.lang.Override
public com.google.ads.googleads.v10.resources.MediaAudioOrBuilder getAudioOrBuilder() {
if (mediatypeCase_ == 10) {
return (com.google.ads.googleads.v10.resources.MediaAudio) mediatype_;
}
return com.google.ads.googleads.v10.resources.MediaAudio.getDefaultInstance();
}
public static final int VIDEO_FIELD_NUMBER = 11;
/**
*
* Immutable. Encapsulates a Video.
*
*
* .google.ads.googleads.v10.resources.MediaVideo video = 11 [(.google.api.field_behavior) = IMMUTABLE];
* @return Whether the video field is set.
*/
@java.lang.Override
public boolean hasVideo() {
return mediatypeCase_ == 11;
}
/**
*
* Immutable. Encapsulates a Video.
*
*
* .google.ads.googleads.v10.resources.MediaVideo video = 11 [(.google.api.field_behavior) = IMMUTABLE];
* @return The video.
*/
@java.lang.Override
public com.google.ads.googleads.v10.resources.MediaVideo getVideo() {
if (mediatypeCase_ == 11) {
return (com.google.ads.googleads.v10.resources.MediaVideo) mediatype_;
}
return com.google.ads.googleads.v10.resources.MediaVideo.getDefaultInstance();
}
/**
*
* Immutable. Encapsulates a Video.
*
*
* .google.ads.googleads.v10.resources.MediaVideo video = 11 [(.google.api.field_behavior) = IMMUTABLE];
*/
@java.lang.Override
public com.google.ads.googleads.v10.resources.MediaVideoOrBuilder getVideoOrBuilder() {
if (mediatypeCase_ == 11) {
return (com.google.ads.googleads.v10.resources.MediaVideo) mediatype_;
}
return com.google.ads.googleads.v10.resources.MediaVideo.getDefaultInstance();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resourceName_);
}
if (mediatypeCase_ == 3) {
output.writeMessage(3, (com.google.ads.googleads.v10.resources.MediaImage) mediatype_);
}
if (mediatypeCase_ == 4) {
output.writeMessage(4, (com.google.ads.googleads.v10.resources.MediaBundle) mediatype_);
}
if (type_ != com.google.ads.googleads.v10.enums.MediaTypeEnum.MediaType.UNSPECIFIED.getNumber()) {
output.writeEnum(5, type_);
}
if (mimeType_ != com.google.ads.googleads.v10.enums.MimeTypeEnum.MimeType.UNSPECIFIED.getNumber()) {
output.writeEnum(6, mimeType_);
}
if (mediatypeCase_ == 10) {
output.writeMessage(10, (com.google.ads.googleads.v10.resources.MediaAudio) mediatype_);
}
if (mediatypeCase_ == 11) {
output.writeMessage(11, (com.google.ads.googleads.v10.resources.MediaVideo) mediatype_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeInt64(12, id_);
}
if (((bitField0_ & 0x00000002) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 13, sourceUrl_);
}
if (((bitField0_ & 0x00000004) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 14, name_);
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeInt64(15, fileSize_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resourceName_);
}
if (mediatypeCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, (com.google.ads.googleads.v10.resources.MediaImage) mediatype_);
}
if (mediatypeCase_ == 4) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, (com.google.ads.googleads.v10.resources.MediaBundle) mediatype_);
}
if (type_ != com.google.ads.googleads.v10.enums.MediaTypeEnum.MediaType.UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(5, type_);
}
if (mimeType_ != com.google.ads.googleads.v10.enums.MimeTypeEnum.MimeType.UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(6, mimeType_);
}
if (mediatypeCase_ == 10) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(10, (com.google.ads.googleads.v10.resources.MediaAudio) mediatype_);
}
if (mediatypeCase_ == 11) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(11, (com.google.ads.googleads.v10.resources.MediaVideo) mediatype_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(12, id_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, sourceUrl_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, name_);
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(15, fileSize_);
}
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.resources.MediaFile)) {
return super.equals(obj);
}
com.google.ads.googleads.v10.resources.MediaFile other = (com.google.ads.googleads.v10.resources.MediaFile) obj;
if (!getResourceName()
.equals(other.getResourceName())) return false;
if (hasId() != other.hasId()) return false;
if (hasId()) {
if (getId()
!= other.getId()) return false;
}
if (type_ != other.type_) return false;
if (mimeType_ != other.mimeType_) return false;
if (hasSourceUrl() != other.hasSourceUrl()) return false;
if (hasSourceUrl()) {
if (!getSourceUrl()
.equals(other.getSourceUrl())) return false;
}
if (hasName() != other.hasName()) return false;
if (hasName()) {
if (!getName()
.equals(other.getName())) return false;
}
if (hasFileSize() != other.hasFileSize()) return false;
if (hasFileSize()) {
if (getFileSize()
!= other.getFileSize()) return false;
}
if (!getMediatypeCase().equals(other.getMediatypeCase())) return false;
switch (mediatypeCase_) {
case 3:
if (!getImage()
.equals(other.getImage())) return false;
break;
case 4:
if (!getMediaBundle()
.equals(other.getMediaBundle())) return false;
break;
case 10:
if (!getAudio()
.equals(other.getAudio())) return false;
break;
case 11:
if (!getVideo()
.equals(other.getVideo())) return false;
break;
case 0:
default:
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + RESOURCE_NAME_FIELD_NUMBER;
hash = (53 * hash) + getResourceName().hashCode();
if (hasId()) {
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getId());
}
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + type_;
hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER;
hash = (53 * hash) + mimeType_;
if (hasSourceUrl()) {
hash = (37 * hash) + SOURCE_URL_FIELD_NUMBER;
hash = (53 * hash) + getSourceUrl().hashCode();
}
if (hasName()) {
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
}
if (hasFileSize()) {
hash = (37 * hash) + FILE_SIZE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getFileSize());
}
switch (mediatypeCase_) {
case 3:
hash = (37 * hash) + IMAGE_FIELD_NUMBER;
hash = (53 * hash) + getImage().hashCode();
break;
case 4:
hash = (37 * hash) + MEDIA_BUNDLE_FIELD_NUMBER;
hash = (53 * hash) + getMediaBundle().hashCode();
break;
case 10:
hash = (37 * hash) + AUDIO_FIELD_NUMBER;
hash = (53 * hash) + getAudio().hashCode();
break;
case 11:
hash = (37 * hash) + VIDEO_FIELD_NUMBER;
hash = (53 * hash) + getVideo().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.ads.googleads.v10.resources.MediaFile parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v10.resources.MediaFile 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.resources.MediaFile parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v10.resources.MediaFile 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.resources.MediaFile parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v10.resources.MediaFile 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.resources.MediaFile parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.ads.googleads.v10.resources.MediaFile 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.resources.MediaFile parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.ads.googleads.v10.resources.MediaFile 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.resources.MediaFile 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.resources.MediaFile 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.resources.MediaFile 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 media file.
*
*
* Protobuf type {@code google.ads.googleads.v10.resources.MediaFile}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.ads.googleads.v10.resources.MediaFile)
com.google.ads.googleads.v10.resources.MediaFileOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.ads.googleads.v10.resources.MediaFileProto.internal_static_google_ads_googleads_v10_resources_MediaFile_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.ads.googleads.v10.resources.MediaFileProto.internal_static_google_ads_googleads_v10_resources_MediaFile_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ads.googleads.v10.resources.MediaFile.class, com.google.ads.googleads.v10.resources.MediaFile.Builder.class);
}
// Construct using com.google.ads.googleads.v10.resources.MediaFile.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
resourceName_ = "";
id_ = 0L;
bitField0_ = (bitField0_ & ~0x00000001);
type_ = 0;
mimeType_ = 0;
sourceUrl_ = "";
bitField0_ = (bitField0_ & ~0x00000002);
name_ = "";
bitField0_ = (bitField0_ & ~0x00000004);
fileSize_ = 0L;
bitField0_ = (bitField0_ & ~0x00000008);
if (imageBuilder_ != null) {
imageBuilder_.clear();
}
if (mediaBundleBuilder_ != null) {
mediaBundleBuilder_.clear();
}
if (audioBuilder_ != null) {
audioBuilder_.clear();
}
if (videoBuilder_ != null) {
videoBuilder_.clear();
}
mediatypeCase_ = 0;
mediatype_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.ads.googleads.v10.resources.MediaFileProto.internal_static_google_ads_googleads_v10_resources_MediaFile_descriptor;
}
@java.lang.Override
public com.google.ads.googleads.v10.resources.MediaFile getDefaultInstanceForType() {
return com.google.ads.googleads.v10.resources.MediaFile.getDefaultInstance();
}
@java.lang.Override
public com.google.ads.googleads.v10.resources.MediaFile build() {
com.google.ads.googleads.v10.resources.MediaFile result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.ads.googleads.v10.resources.MediaFile buildPartial() {
com.google.ads.googleads.v10.resources.MediaFile result = new com.google.ads.googleads.v10.resources.MediaFile(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.resourceName_ = resourceName_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.id_ = id_;
to_bitField0_ |= 0x00000001;
}
result.type_ = type_;
result.mimeType_ = mimeType_;
if (((from_bitField0_ & 0x00000002) != 0)) {
to_bitField0_ |= 0x00000002;
}
result.sourceUrl_ = sourceUrl_;
if (((from_bitField0_ & 0x00000004) != 0)) {
to_bitField0_ |= 0x00000004;
}
result.name_ = name_;
if (((from_bitField0_ & 0x00000008) != 0)) {
result.fileSize_ = fileSize_;
to_bitField0_ |= 0x00000008;
}
if (mediatypeCase_ == 3) {
if (imageBuilder_ == null) {
result.mediatype_ = mediatype_;
} else {
result.mediatype_ = imageBuilder_.build();
}
}
if (mediatypeCase_ == 4) {
if (mediaBundleBuilder_ == null) {
result.mediatype_ = mediatype_;
} else {
result.mediatype_ = mediaBundleBuilder_.build();
}
}
if (mediatypeCase_ == 10) {
if (audioBuilder_ == null) {
result.mediatype_ = mediatype_;
} else {
result.mediatype_ = audioBuilder_.build();
}
}
if (mediatypeCase_ == 11) {
if (videoBuilder_ == null) {
result.mediatype_ = mediatype_;
} else {
result.mediatype_ = videoBuilder_.build();
}
}
result.bitField0_ = to_bitField0_;
result.mediatypeCase_ = mediatypeCase_;
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.resources.MediaFile) {
return mergeFrom((com.google.ads.googleads.v10.resources.MediaFile)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.ads.googleads.v10.resources.MediaFile other) {
if (other == com.google.ads.googleads.v10.resources.MediaFile.getDefaultInstance()) return this;
if (!other.getResourceName().isEmpty()) {
resourceName_ = other.resourceName_;
onChanged();
}
if (other.hasId()) {
setId(other.getId());
}
if (other.type_ != 0) {
setTypeValue(other.getTypeValue());
}
if (other.mimeType_ != 0) {
setMimeTypeValue(other.getMimeTypeValue());
}
if (other.hasSourceUrl()) {
bitField0_ |= 0x00000002;
sourceUrl_ = other.sourceUrl_;
onChanged();
}
if (other.hasName()) {
bitField0_ |= 0x00000004;
name_ = other.name_;
onChanged();
}
if (other.hasFileSize()) {
setFileSize(other.getFileSize());
}
switch (other.getMediatypeCase()) {
case IMAGE: {
mergeImage(other.getImage());
break;
}
case MEDIA_BUNDLE: {
mergeMediaBundle(other.getMediaBundle());
break;
}
case AUDIO: {
mergeAudio(other.getAudio());
break;
}
case VIDEO: {
mergeVideo(other.getVideo());
break;
}
case MEDIATYPE_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
resourceName_ = input.readStringRequireUtf8();
break;
} // case 10
case 26: {
input.readMessage(
getImageFieldBuilder().getBuilder(),
extensionRegistry);
mediatypeCase_ = 3;
break;
} // case 26
case 34: {
input.readMessage(
getMediaBundleFieldBuilder().getBuilder(),
extensionRegistry);
mediatypeCase_ = 4;
break;
} // case 34
case 40: {
type_ = input.readEnum();
break;
} // case 40
case 48: {
mimeType_ = input.readEnum();
break;
} // case 48
case 82: {
input.readMessage(
getAudioFieldBuilder().getBuilder(),
extensionRegistry);
mediatypeCase_ = 10;
break;
} // case 82
case 90: {
input.readMessage(
getVideoFieldBuilder().getBuilder(),
extensionRegistry);
mediatypeCase_ = 11;
break;
} // case 90
case 96: {
id_ = input.readInt64();
bitField0_ |= 0x00000001;
break;
} // case 96
case 106: {
sourceUrl_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 106
case 114: {
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 114
case 120: {
fileSize_ = input.readInt64();
bitField0_ |= 0x00000008;
break;
} // case 120
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 mediatypeCase_ = 0;
private java.lang.Object mediatype_;
public MediatypeCase
getMediatypeCase() {
return MediatypeCase.forNumber(
mediatypeCase_);
}
public Builder clearMediatype() {
mediatypeCase_ = 0;
mediatype_ = null;
onChanged();
return this;
}
private int bitField0_;
private java.lang.Object resourceName_ = "";
/**
*
* Immutable. The resource name of the media file.
* Media file resource names have the form:
* `customers/{customer_id}/mediaFiles/{media_file_id}`
*
*
* string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return The resourceName.
*/
public java.lang.String getResourceName() {
java.lang.Object ref = resourceName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
resourceName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Immutable. The resource name of the media file.
* Media file resource names have the form:
* `customers/{customer_id}/mediaFiles/{media_file_id}`
*
*
* string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return The bytes for resourceName.
*/
public com.google.protobuf.ByteString
getResourceNameBytes() {
java.lang.Object ref = resourceName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
resourceName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Immutable. The resource name of the media file.
* Media file resource names have the form:
* `customers/{customer_id}/mediaFiles/{media_file_id}`
*
*
* string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @param value The resourceName to set.
* @return This builder for chaining.
*/
public Builder setResourceName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
resourceName_ = value;
onChanged();
return this;
}
/**
*
* Immutable. The resource name of the media file.
* Media file resource names have the form:
* `customers/{customer_id}/mediaFiles/{media_file_id}`
*
*
* string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return This builder for chaining.
*/
public Builder clearResourceName() {
resourceName_ = getDefaultInstance().getResourceName();
onChanged();
return this;
}
/**
*
* Immutable. The resource name of the media file.
* Media file resource names have the form:
* `customers/{customer_id}/mediaFiles/{media_file_id}`
*
*
* string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @param value The bytes for resourceName to set.
* @return This builder for chaining.
*/
public Builder setResourceNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
resourceName_ = value;
onChanged();
return this;
}
private long id_ ;
/**
*
* Output only. The ID of the media file.
*
*
* optional int64 id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return Whether the id field is set.
*/
@java.lang.Override
public boolean hasId() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Output only. The ID of the media file.
*
*
* optional int64 id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return The id.
*/
@java.lang.Override
public long getId() {
return id_;
}
/**
*
* Output only. The ID of the media file.
*
*
* optional int64 id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(long value) {
bitField0_ |= 0x00000001;
id_ = value;
onChanged();
return this;
}
/**
*
* Output only. The ID of the media file.
*
*
* optional int64 id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return This builder for chaining.
*/
public Builder clearId() {
bitField0_ = (bitField0_ & ~0x00000001);
id_ = 0L;
onChanged();
return this;
}
private int type_ = 0;
/**
*
* Immutable. Type of the media file.
*
*
* .google.ads.googleads.v10.enums.MediaTypeEnum.MediaType type = 5 [(.google.api.field_behavior) = IMMUTABLE];
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override public int getTypeValue() {
return type_;
}
/**
*
* Immutable. Type of the media file.
*
*
* .google.ads.googleads.v10.enums.MediaTypeEnum.MediaType type = 5 [(.google.api.field_behavior) = IMMUTABLE];
* @param value The enum numeric value on the wire for type to set.
* @return This builder for chaining.
*/
public Builder setTypeValue(int value) {
type_ = value;
onChanged();
return this;
}
/**
*
* Immutable. Type of the media file.
*
*
* .google.ads.googleads.v10.enums.MediaTypeEnum.MediaType type = 5 [(.google.api.field_behavior) = IMMUTABLE];
* @return The type.
*/
@java.lang.Override
public com.google.ads.googleads.v10.enums.MediaTypeEnum.MediaType getType() {
@SuppressWarnings("deprecation")
com.google.ads.googleads.v10.enums.MediaTypeEnum.MediaType result = com.google.ads.googleads.v10.enums.MediaTypeEnum.MediaType.valueOf(type_);
return result == null ? com.google.ads.googleads.v10.enums.MediaTypeEnum.MediaType.UNRECOGNIZED : result;
}
/**
*
* Immutable. Type of the media file.
*
*
* .google.ads.googleads.v10.enums.MediaTypeEnum.MediaType type = 5 [(.google.api.field_behavior) = IMMUTABLE];
* @param value The type to set.
* @return This builder for chaining.
*/
public Builder setType(com.google.ads.googleads.v10.enums.MediaTypeEnum.MediaType value) {
if (value == null) {
throw new NullPointerException();
}
type_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Immutable. Type of the media file.
*
*
* .google.ads.googleads.v10.enums.MediaTypeEnum.MediaType type = 5 [(.google.api.field_behavior) = IMMUTABLE];
* @return This builder for chaining.
*/
public Builder clearType() {
type_ = 0;
onChanged();
return this;
}
private int mimeType_ = 0;
/**
*
* Output only. The mime type of the media file.
*
*
* .google.ads.googleads.v10.enums.MimeTypeEnum.MimeType mime_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return The enum numeric value on the wire for mimeType.
*/
@java.lang.Override public int getMimeTypeValue() {
return mimeType_;
}
/**
*
* Output only. The mime type of the media file.
*
*
* .google.ads.googleads.v10.enums.MimeTypeEnum.MimeType mime_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @param value The enum numeric value on the wire for mimeType to set.
* @return This builder for chaining.
*/
public Builder setMimeTypeValue(int value) {
mimeType_ = value;
onChanged();
return this;
}
/**
*
* Output only. The mime type of the media file.
*
*
* .google.ads.googleads.v10.enums.MimeTypeEnum.MimeType mime_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return The mimeType.
*/
@java.lang.Override
public com.google.ads.googleads.v10.enums.MimeTypeEnum.MimeType getMimeType() {
@SuppressWarnings("deprecation")
com.google.ads.googleads.v10.enums.MimeTypeEnum.MimeType result = com.google.ads.googleads.v10.enums.MimeTypeEnum.MimeType.valueOf(mimeType_);
return result == null ? com.google.ads.googleads.v10.enums.MimeTypeEnum.MimeType.UNRECOGNIZED : result;
}
/**
*
* Output only. The mime type of the media file.
*
*
* .google.ads.googleads.v10.enums.MimeTypeEnum.MimeType mime_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @param value The mimeType to set.
* @return This builder for chaining.
*/
public Builder setMimeType(com.google.ads.googleads.v10.enums.MimeTypeEnum.MimeType value) {
if (value == null) {
throw new NullPointerException();
}
mimeType_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Output only. The mime type of the media file.
*
*
* .google.ads.googleads.v10.enums.MimeTypeEnum.MimeType mime_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return This builder for chaining.
*/
public Builder clearMimeType() {
mimeType_ = 0;
onChanged();
return this;
}
private java.lang.Object sourceUrl_ = "";
/**
*
* Immutable. The URL of where the original media file was downloaded from (or a file
* name). Only used for media of type AUDIO and IMAGE.
*
*
* optional string source_url = 13 [(.google.api.field_behavior) = IMMUTABLE];
* @return Whether the sourceUrl field is set.
*/
public boolean hasSourceUrl() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Immutable. The URL of where the original media file was downloaded from (or a file
* name). Only used for media of type AUDIO and IMAGE.
*
*
* optional string source_url = 13 [(.google.api.field_behavior) = IMMUTABLE];
* @return The sourceUrl.
*/
public java.lang.String getSourceUrl() {
java.lang.Object ref = sourceUrl_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
sourceUrl_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Immutable. The URL of where the original media file was downloaded from (or a file
* name). Only used for media of type AUDIO and IMAGE.
*
*
* optional string source_url = 13 [(.google.api.field_behavior) = IMMUTABLE];
* @return The bytes for sourceUrl.
*/
public com.google.protobuf.ByteString
getSourceUrlBytes() {
java.lang.Object ref = sourceUrl_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
sourceUrl_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Immutable. The URL of where the original media file was downloaded from (or a file
* name). Only used for media of type AUDIO and IMAGE.
*
*
* optional string source_url = 13 [(.google.api.field_behavior) = IMMUTABLE];
* @param value The sourceUrl to set.
* @return This builder for chaining.
*/
public Builder setSourceUrl(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
sourceUrl_ = value;
onChanged();
return this;
}
/**
*
* Immutable. The URL of where the original media file was downloaded from (or a file
* name). Only used for media of type AUDIO and IMAGE.
*
*
* optional string source_url = 13 [(.google.api.field_behavior) = IMMUTABLE];
* @return This builder for chaining.
*/
public Builder clearSourceUrl() {
bitField0_ = (bitField0_ & ~0x00000002);
sourceUrl_ = getDefaultInstance().getSourceUrl();
onChanged();
return this;
}
/**
*
* Immutable. The URL of where the original media file was downloaded from (or a file
* name). Only used for media of type AUDIO and IMAGE.
*
*
* optional string source_url = 13 [(.google.api.field_behavior) = IMMUTABLE];
* @param value The bytes for sourceUrl to set.
* @return This builder for chaining.
*/
public Builder setSourceUrlBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
bitField0_ |= 0x00000002;
sourceUrl_ = value;
onChanged();
return this;
}
private java.lang.Object name_ = "";
/**
*
* Immutable. The name of the media file. The name can be used by clients to help
* identify previously uploaded media.
*
*
* optional string name = 14 [(.google.api.field_behavior) = IMMUTABLE];
* @return Whether the name field is set.
*/
public boolean hasName() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Immutable. The name of the media file. The name can be used by clients to help
* identify previously uploaded media.
*
*
* optional string name = 14 [(.google.api.field_behavior) = IMMUTABLE];
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Immutable. The name of the media file. The name can be used by clients to help
* identify previously uploaded media.
*
*
* optional string name = 14 [(.google.api.field_behavior) = IMMUTABLE];
* @return The bytes for name.
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Immutable. The name of the media file. The name can be used by clients to help
* identify previously uploaded media.
*
*
* optional string name = 14 [(.google.api.field_behavior) = IMMUTABLE];
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000004;
name_ = value;
onChanged();
return this;
}
/**
*
* Immutable. The name of the media file. The name can be used by clients to help
* identify previously uploaded media.
*
*
* optional string name = 14 [(.google.api.field_behavior) = IMMUTABLE];
* @return This builder for chaining.
*/
public Builder clearName() {
bitField0_ = (bitField0_ & ~0x00000004);
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* Immutable. The name of the media file. The name can be used by clients to help
* identify previously uploaded media.
*
*
* optional string name = 14 [(.google.api.field_behavior) = IMMUTABLE];
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
bitField0_ |= 0x00000004;
name_ = value;
onChanged();
return this;
}
private long fileSize_ ;
/**
*
* Output only. The size of the media file in bytes.
*
*
* optional int64 file_size = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return Whether the fileSize field is set.
*/
@java.lang.Override
public boolean hasFileSize() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* Output only. The size of the media file in bytes.
*
*
* optional int64 file_size = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return The fileSize.
*/
@java.lang.Override
public long getFileSize() {
return fileSize_;
}
/**
*
* Output only. The size of the media file in bytes.
*
*
* optional int64 file_size = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @param value The fileSize to set.
* @return This builder for chaining.
*/
public Builder setFileSize(long value) {
bitField0_ |= 0x00000008;
fileSize_ = value;
onChanged();
return this;
}
/**
*
* Output only. The size of the media file in bytes.
*
*
* optional int64 file_size = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return This builder for chaining.
*/
public Builder clearFileSize() {
bitField0_ = (bitField0_ & ~0x00000008);
fileSize_ = 0L;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v10.resources.MediaImage, com.google.ads.googleads.v10.resources.MediaImage.Builder, com.google.ads.googleads.v10.resources.MediaImageOrBuilder> imageBuilder_;
/**
*
* Immutable. Encapsulates an Image.
*
*
* .google.ads.googleads.v10.resources.MediaImage image = 3 [(.google.api.field_behavior) = IMMUTABLE];
* @return Whether the image field is set.
*/
@java.lang.Override
public boolean hasImage() {
return mediatypeCase_ == 3;
}
/**
*
* Immutable. Encapsulates an Image.
*
*
* .google.ads.googleads.v10.resources.MediaImage image = 3 [(.google.api.field_behavior) = IMMUTABLE];
* @return The image.
*/
@java.lang.Override
public com.google.ads.googleads.v10.resources.MediaImage getImage() {
if (imageBuilder_ == null) {
if (mediatypeCase_ == 3) {
return (com.google.ads.googleads.v10.resources.MediaImage) mediatype_;
}
return com.google.ads.googleads.v10.resources.MediaImage.getDefaultInstance();
} else {
if (mediatypeCase_ == 3) {
return imageBuilder_.getMessage();
}
return com.google.ads.googleads.v10.resources.MediaImage.getDefaultInstance();
}
}
/**
*
* Immutable. Encapsulates an Image.
*
*
* .google.ads.googleads.v10.resources.MediaImage image = 3 [(.google.api.field_behavior) = IMMUTABLE];
*/
public Builder setImage(com.google.ads.googleads.v10.resources.MediaImage value) {
if (imageBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
mediatype_ = value;
onChanged();
} else {
imageBuilder_.setMessage(value);
}
mediatypeCase_ = 3;
return this;
}
/**
*
* Immutable. Encapsulates an Image.
*
*
* .google.ads.googleads.v10.resources.MediaImage image = 3 [(.google.api.field_behavior) = IMMUTABLE];
*/
public Builder setImage(
com.google.ads.googleads.v10.resources.MediaImage.Builder builderForValue) {
if (imageBuilder_ == null) {
mediatype_ = builderForValue.build();
onChanged();
} else {
imageBuilder_.setMessage(builderForValue.build());
}
mediatypeCase_ = 3;
return this;
}
/**
*
* Immutable. Encapsulates an Image.
*
*
* .google.ads.googleads.v10.resources.MediaImage image = 3 [(.google.api.field_behavior) = IMMUTABLE];
*/
public Builder mergeImage(com.google.ads.googleads.v10.resources.MediaImage value) {
if (imageBuilder_ == null) {
if (mediatypeCase_ == 3 &&
mediatype_ != com.google.ads.googleads.v10.resources.MediaImage.getDefaultInstance()) {
mediatype_ = com.google.ads.googleads.v10.resources.MediaImage.newBuilder((com.google.ads.googleads.v10.resources.MediaImage) mediatype_)
.mergeFrom(value).buildPartial();
} else {
mediatype_ = value;
}
onChanged();
} else {
if (mediatypeCase_ == 3) {
imageBuilder_.mergeFrom(value);
} else {
imageBuilder_.setMessage(value);
}
}
mediatypeCase_ = 3;
return this;
}
/**
*
* Immutable. Encapsulates an Image.
*
*
* .google.ads.googleads.v10.resources.MediaImage image = 3 [(.google.api.field_behavior) = IMMUTABLE];
*/
public Builder clearImage() {
if (imageBuilder_ == null) {
if (mediatypeCase_ == 3) {
mediatypeCase_ = 0;
mediatype_ = null;
onChanged();
}
} else {
if (mediatypeCase_ == 3) {
mediatypeCase_ = 0;
mediatype_ = null;
}
imageBuilder_.clear();
}
return this;
}
/**
*
* Immutable. Encapsulates an Image.
*
*
* .google.ads.googleads.v10.resources.MediaImage image = 3 [(.google.api.field_behavior) = IMMUTABLE];
*/
public com.google.ads.googleads.v10.resources.MediaImage.Builder getImageBuilder() {
return getImageFieldBuilder().getBuilder();
}
/**
*
* Immutable. Encapsulates an Image.
*
*
* .google.ads.googleads.v10.resources.MediaImage image = 3 [(.google.api.field_behavior) = IMMUTABLE];
*/
@java.lang.Override
public com.google.ads.googleads.v10.resources.MediaImageOrBuilder getImageOrBuilder() {
if ((mediatypeCase_ == 3) && (imageBuilder_ != null)) {
return imageBuilder_.getMessageOrBuilder();
} else {
if (mediatypeCase_ == 3) {
return (com.google.ads.googleads.v10.resources.MediaImage) mediatype_;
}
return com.google.ads.googleads.v10.resources.MediaImage.getDefaultInstance();
}
}
/**
*
* Immutable. Encapsulates an Image.
*
*
* .google.ads.googleads.v10.resources.MediaImage image = 3 [(.google.api.field_behavior) = IMMUTABLE];
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v10.resources.MediaImage, com.google.ads.googleads.v10.resources.MediaImage.Builder, com.google.ads.googleads.v10.resources.MediaImageOrBuilder>
getImageFieldBuilder() {
if (imageBuilder_ == null) {
if (!(mediatypeCase_ == 3)) {
mediatype_ = com.google.ads.googleads.v10.resources.MediaImage.getDefaultInstance();
}
imageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v10.resources.MediaImage, com.google.ads.googleads.v10.resources.MediaImage.Builder, com.google.ads.googleads.v10.resources.MediaImageOrBuilder>(
(com.google.ads.googleads.v10.resources.MediaImage) mediatype_,
getParentForChildren(),
isClean());
mediatype_ = null;
}
mediatypeCase_ = 3;
onChanged();;
return imageBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v10.resources.MediaBundle, com.google.ads.googleads.v10.resources.MediaBundle.Builder, com.google.ads.googleads.v10.resources.MediaBundleOrBuilder> mediaBundleBuilder_;
/**
*
* Immutable. A ZIP archive media the content of which contains HTML5 assets.
*
*
* .google.ads.googleads.v10.resources.MediaBundle media_bundle = 4 [(.google.api.field_behavior) = IMMUTABLE];
* @return Whether the mediaBundle field is set.
*/
@java.lang.Override
public boolean hasMediaBundle() {
return mediatypeCase_ == 4;
}
/**
*
* Immutable. A ZIP archive media the content of which contains HTML5 assets.
*
*
* .google.ads.googleads.v10.resources.MediaBundle media_bundle = 4 [(.google.api.field_behavior) = IMMUTABLE];
* @return The mediaBundle.
*/
@java.lang.Override
public com.google.ads.googleads.v10.resources.MediaBundle getMediaBundle() {
if (mediaBundleBuilder_ == null) {
if (mediatypeCase_ == 4) {
return (com.google.ads.googleads.v10.resources.MediaBundle) mediatype_;
}
return com.google.ads.googleads.v10.resources.MediaBundle.getDefaultInstance();
} else {
if (mediatypeCase_ == 4) {
return mediaBundleBuilder_.getMessage();
}
return com.google.ads.googleads.v10.resources.MediaBundle.getDefaultInstance();
}
}
/**
*
* Immutable. A ZIP archive media the content of which contains HTML5 assets.
*
*
* .google.ads.googleads.v10.resources.MediaBundle media_bundle = 4 [(.google.api.field_behavior) = IMMUTABLE];
*/
public Builder setMediaBundle(com.google.ads.googleads.v10.resources.MediaBundle value) {
if (mediaBundleBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
mediatype_ = value;
onChanged();
} else {
mediaBundleBuilder_.setMessage(value);
}
mediatypeCase_ = 4;
return this;
}
/**
*
* Immutable. A ZIP archive media the content of which contains HTML5 assets.
*
*
* .google.ads.googleads.v10.resources.MediaBundle media_bundle = 4 [(.google.api.field_behavior) = IMMUTABLE];
*/
public Builder setMediaBundle(
com.google.ads.googleads.v10.resources.MediaBundle.Builder builderForValue) {
if (mediaBundleBuilder_ == null) {
mediatype_ = builderForValue.build();
onChanged();
} else {
mediaBundleBuilder_.setMessage(builderForValue.build());
}
mediatypeCase_ = 4;
return this;
}
/**
*
* Immutable. A ZIP archive media the content of which contains HTML5 assets.
*
*
* .google.ads.googleads.v10.resources.MediaBundle media_bundle = 4 [(.google.api.field_behavior) = IMMUTABLE];
*/
public Builder mergeMediaBundle(com.google.ads.googleads.v10.resources.MediaBundle value) {
if (mediaBundleBuilder_ == null) {
if (mediatypeCase_ == 4 &&
mediatype_ != com.google.ads.googleads.v10.resources.MediaBundle.getDefaultInstance()) {
mediatype_ = com.google.ads.googleads.v10.resources.MediaBundle.newBuilder((com.google.ads.googleads.v10.resources.MediaBundle) mediatype_)
.mergeFrom(value).buildPartial();
} else {
mediatype_ = value;
}
onChanged();
} else {
if (mediatypeCase_ == 4) {
mediaBundleBuilder_.mergeFrom(value);
} else {
mediaBundleBuilder_.setMessage(value);
}
}
mediatypeCase_ = 4;
return this;
}
/**
*
* Immutable. A ZIP archive media the content of which contains HTML5 assets.
*
*
* .google.ads.googleads.v10.resources.MediaBundle media_bundle = 4 [(.google.api.field_behavior) = IMMUTABLE];
*/
public Builder clearMediaBundle() {
if (mediaBundleBuilder_ == null) {
if (mediatypeCase_ == 4) {
mediatypeCase_ = 0;
mediatype_ = null;
onChanged();
}
} else {
if (mediatypeCase_ == 4) {
mediatypeCase_ = 0;
mediatype_ = null;
}
mediaBundleBuilder_.clear();
}
return this;
}
/**
*
* Immutable. A ZIP archive media the content of which contains HTML5 assets.
*
*
* .google.ads.googleads.v10.resources.MediaBundle media_bundle = 4 [(.google.api.field_behavior) = IMMUTABLE];
*/
public com.google.ads.googleads.v10.resources.MediaBundle.Builder getMediaBundleBuilder() {
return getMediaBundleFieldBuilder().getBuilder();
}
/**
*
* Immutable. A ZIP archive media the content of which contains HTML5 assets.
*
*
* .google.ads.googleads.v10.resources.MediaBundle media_bundle = 4 [(.google.api.field_behavior) = IMMUTABLE];
*/
@java.lang.Override
public com.google.ads.googleads.v10.resources.MediaBundleOrBuilder getMediaBundleOrBuilder() {
if ((mediatypeCase_ == 4) && (mediaBundleBuilder_ != null)) {
return mediaBundleBuilder_.getMessageOrBuilder();
} else {
if (mediatypeCase_ == 4) {
return (com.google.ads.googleads.v10.resources.MediaBundle) mediatype_;
}
return com.google.ads.googleads.v10.resources.MediaBundle.getDefaultInstance();
}
}
/**
*
* Immutable. A ZIP archive media the content of which contains HTML5 assets.
*
*
* .google.ads.googleads.v10.resources.MediaBundle media_bundle = 4 [(.google.api.field_behavior) = IMMUTABLE];
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v10.resources.MediaBundle, com.google.ads.googleads.v10.resources.MediaBundle.Builder, com.google.ads.googleads.v10.resources.MediaBundleOrBuilder>
getMediaBundleFieldBuilder() {
if (mediaBundleBuilder_ == null) {
if (!(mediatypeCase_ == 4)) {
mediatype_ = com.google.ads.googleads.v10.resources.MediaBundle.getDefaultInstance();
}
mediaBundleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v10.resources.MediaBundle, com.google.ads.googleads.v10.resources.MediaBundle.Builder, com.google.ads.googleads.v10.resources.MediaBundleOrBuilder>(
(com.google.ads.googleads.v10.resources.MediaBundle) mediatype_,
getParentForChildren(),
isClean());
mediatype_ = null;
}
mediatypeCase_ = 4;
onChanged();;
return mediaBundleBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v10.resources.MediaAudio, com.google.ads.googleads.v10.resources.MediaAudio.Builder, com.google.ads.googleads.v10.resources.MediaAudioOrBuilder> audioBuilder_;
/**
*
* Output only. Encapsulates an Audio.
*
*
* .google.ads.googleads.v10.resources.MediaAudio audio = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return Whether the audio field is set.
*/
@java.lang.Override
public boolean hasAudio() {
return mediatypeCase_ == 10;
}
/**
*
* Output only. Encapsulates an Audio.
*
*
* .google.ads.googleads.v10.resources.MediaAudio audio = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return The audio.
*/
@java.lang.Override
public com.google.ads.googleads.v10.resources.MediaAudio getAudio() {
if (audioBuilder_ == null) {
if (mediatypeCase_ == 10) {
return (com.google.ads.googleads.v10.resources.MediaAudio) mediatype_;
}
return com.google.ads.googleads.v10.resources.MediaAudio.getDefaultInstance();
} else {
if (mediatypeCase_ == 10) {
return audioBuilder_.getMessage();
}
return com.google.ads.googleads.v10.resources.MediaAudio.getDefaultInstance();
}
}
/**
*
* Output only. Encapsulates an Audio.
*
*
* .google.ads.googleads.v10.resources.MediaAudio audio = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
public Builder setAudio(com.google.ads.googleads.v10.resources.MediaAudio value) {
if (audioBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
mediatype_ = value;
onChanged();
} else {
audioBuilder_.setMessage(value);
}
mediatypeCase_ = 10;
return this;
}
/**
*
* Output only. Encapsulates an Audio.
*
*
* .google.ads.googleads.v10.resources.MediaAudio audio = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
public Builder setAudio(
com.google.ads.googleads.v10.resources.MediaAudio.Builder builderForValue) {
if (audioBuilder_ == null) {
mediatype_ = builderForValue.build();
onChanged();
} else {
audioBuilder_.setMessage(builderForValue.build());
}
mediatypeCase_ = 10;
return this;
}
/**
*
* Output only. Encapsulates an Audio.
*
*
* .google.ads.googleads.v10.resources.MediaAudio audio = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
public Builder mergeAudio(com.google.ads.googleads.v10.resources.MediaAudio value) {
if (audioBuilder_ == null) {
if (mediatypeCase_ == 10 &&
mediatype_ != com.google.ads.googleads.v10.resources.MediaAudio.getDefaultInstance()) {
mediatype_ = com.google.ads.googleads.v10.resources.MediaAudio.newBuilder((com.google.ads.googleads.v10.resources.MediaAudio) mediatype_)
.mergeFrom(value).buildPartial();
} else {
mediatype_ = value;
}
onChanged();
} else {
if (mediatypeCase_ == 10) {
audioBuilder_.mergeFrom(value);
} else {
audioBuilder_.setMessage(value);
}
}
mediatypeCase_ = 10;
return this;
}
/**
*
* Output only. Encapsulates an Audio.
*
*
* .google.ads.googleads.v10.resources.MediaAudio audio = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
public Builder clearAudio() {
if (audioBuilder_ == null) {
if (mediatypeCase_ == 10) {
mediatypeCase_ = 0;
mediatype_ = null;
onChanged();
}
} else {
if (mediatypeCase_ == 10) {
mediatypeCase_ = 0;
mediatype_ = null;
}
audioBuilder_.clear();
}
return this;
}
/**
*
* Output only. Encapsulates an Audio.
*
*
* .google.ads.googleads.v10.resources.MediaAudio audio = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
public com.google.ads.googleads.v10.resources.MediaAudio.Builder getAudioBuilder() {
return getAudioFieldBuilder().getBuilder();
}
/**
*
* Output only. Encapsulates an Audio.
*
*
* .google.ads.googleads.v10.resources.MediaAudio audio = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
@java.lang.Override
public com.google.ads.googleads.v10.resources.MediaAudioOrBuilder getAudioOrBuilder() {
if ((mediatypeCase_ == 10) && (audioBuilder_ != null)) {
return audioBuilder_.getMessageOrBuilder();
} else {
if (mediatypeCase_ == 10) {
return (com.google.ads.googleads.v10.resources.MediaAudio) mediatype_;
}
return com.google.ads.googleads.v10.resources.MediaAudio.getDefaultInstance();
}
}
/**
*
* Output only. Encapsulates an Audio.
*
*
* .google.ads.googleads.v10.resources.MediaAudio audio = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v10.resources.MediaAudio, com.google.ads.googleads.v10.resources.MediaAudio.Builder, com.google.ads.googleads.v10.resources.MediaAudioOrBuilder>
getAudioFieldBuilder() {
if (audioBuilder_ == null) {
if (!(mediatypeCase_ == 10)) {
mediatype_ = com.google.ads.googleads.v10.resources.MediaAudio.getDefaultInstance();
}
audioBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v10.resources.MediaAudio, com.google.ads.googleads.v10.resources.MediaAudio.Builder, com.google.ads.googleads.v10.resources.MediaAudioOrBuilder>(
(com.google.ads.googleads.v10.resources.MediaAudio) mediatype_,
getParentForChildren(),
isClean());
mediatype_ = null;
}
mediatypeCase_ = 10;
onChanged();;
return audioBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v10.resources.MediaVideo, com.google.ads.googleads.v10.resources.MediaVideo.Builder, com.google.ads.googleads.v10.resources.MediaVideoOrBuilder> videoBuilder_;
/**
*
* Immutable. Encapsulates a Video.
*
*
* .google.ads.googleads.v10.resources.MediaVideo video = 11 [(.google.api.field_behavior) = IMMUTABLE];
* @return Whether the video field is set.
*/
@java.lang.Override
public boolean hasVideo() {
return mediatypeCase_ == 11;
}
/**
*
* Immutable. Encapsulates a Video.
*
*
* .google.ads.googleads.v10.resources.MediaVideo video = 11 [(.google.api.field_behavior) = IMMUTABLE];
* @return The video.
*/
@java.lang.Override
public com.google.ads.googleads.v10.resources.MediaVideo getVideo() {
if (videoBuilder_ == null) {
if (mediatypeCase_ == 11) {
return (com.google.ads.googleads.v10.resources.MediaVideo) mediatype_;
}
return com.google.ads.googleads.v10.resources.MediaVideo.getDefaultInstance();
} else {
if (mediatypeCase_ == 11) {
return videoBuilder_.getMessage();
}
return com.google.ads.googleads.v10.resources.MediaVideo.getDefaultInstance();
}
}
/**
*
* Immutable. Encapsulates a Video.
*
*
* .google.ads.googleads.v10.resources.MediaVideo video = 11 [(.google.api.field_behavior) = IMMUTABLE];
*/
public Builder setVideo(com.google.ads.googleads.v10.resources.MediaVideo value) {
if (videoBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
mediatype_ = value;
onChanged();
} else {
videoBuilder_.setMessage(value);
}
mediatypeCase_ = 11;
return this;
}
/**
*
* Immutable. Encapsulates a Video.
*
*
* .google.ads.googleads.v10.resources.MediaVideo video = 11 [(.google.api.field_behavior) = IMMUTABLE];
*/
public Builder setVideo(
com.google.ads.googleads.v10.resources.MediaVideo.Builder builderForValue) {
if (videoBuilder_ == null) {
mediatype_ = builderForValue.build();
onChanged();
} else {
videoBuilder_.setMessage(builderForValue.build());
}
mediatypeCase_ = 11;
return this;
}
/**
*
* Immutable. Encapsulates a Video.
*
*
* .google.ads.googleads.v10.resources.MediaVideo video = 11 [(.google.api.field_behavior) = IMMUTABLE];
*/
public Builder mergeVideo(com.google.ads.googleads.v10.resources.MediaVideo value) {
if (videoBuilder_ == null) {
if (mediatypeCase_ == 11 &&
mediatype_ != com.google.ads.googleads.v10.resources.MediaVideo.getDefaultInstance()) {
mediatype_ = com.google.ads.googleads.v10.resources.MediaVideo.newBuilder((com.google.ads.googleads.v10.resources.MediaVideo) mediatype_)
.mergeFrom(value).buildPartial();
} else {
mediatype_ = value;
}
onChanged();
} else {
if (mediatypeCase_ == 11) {
videoBuilder_.mergeFrom(value);
} else {
videoBuilder_.setMessage(value);
}
}
mediatypeCase_ = 11;
return this;
}
/**
*
* Immutable. Encapsulates a Video.
*
*
* .google.ads.googleads.v10.resources.MediaVideo video = 11 [(.google.api.field_behavior) = IMMUTABLE];
*/
public Builder clearVideo() {
if (videoBuilder_ == null) {
if (mediatypeCase_ == 11) {
mediatypeCase_ = 0;
mediatype_ = null;
onChanged();
}
} else {
if (mediatypeCase_ == 11) {
mediatypeCase_ = 0;
mediatype_ = null;
}
videoBuilder_.clear();
}
return this;
}
/**
*
* Immutable. Encapsulates a Video.
*
*
* .google.ads.googleads.v10.resources.MediaVideo video = 11 [(.google.api.field_behavior) = IMMUTABLE];
*/
public com.google.ads.googleads.v10.resources.MediaVideo.Builder getVideoBuilder() {
return getVideoFieldBuilder().getBuilder();
}
/**
*
* Immutable. Encapsulates a Video.
*
*
* .google.ads.googleads.v10.resources.MediaVideo video = 11 [(.google.api.field_behavior) = IMMUTABLE];
*/
@java.lang.Override
public com.google.ads.googleads.v10.resources.MediaVideoOrBuilder getVideoOrBuilder() {
if ((mediatypeCase_ == 11) && (videoBuilder_ != null)) {
return videoBuilder_.getMessageOrBuilder();
} else {
if (mediatypeCase_ == 11) {
return (com.google.ads.googleads.v10.resources.MediaVideo) mediatype_;
}
return com.google.ads.googleads.v10.resources.MediaVideo.getDefaultInstance();
}
}
/**
*
* Immutable. Encapsulates a Video.
*
*
* .google.ads.googleads.v10.resources.MediaVideo video = 11 [(.google.api.field_behavior) = IMMUTABLE];
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v10.resources.MediaVideo, com.google.ads.googleads.v10.resources.MediaVideo.Builder, com.google.ads.googleads.v10.resources.MediaVideoOrBuilder>
getVideoFieldBuilder() {
if (videoBuilder_ == null) {
if (!(mediatypeCase_ == 11)) {
mediatype_ = com.google.ads.googleads.v10.resources.MediaVideo.getDefaultInstance();
}
videoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v10.resources.MediaVideo, com.google.ads.googleads.v10.resources.MediaVideo.Builder, com.google.ads.googleads.v10.resources.MediaVideoOrBuilder>(
(com.google.ads.googleads.v10.resources.MediaVideo) mediatype_,
getParentForChildren(),
isClean());
mediatype_ = null;
}
mediatypeCase_ = 11;
onChanged();;
return videoBuilder_;
}
@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.resources.MediaFile)
}
// @@protoc_insertion_point(class_scope:google.ads.googleads.v10.resources.MediaFile)
private static final com.google.ads.googleads.v10.resources.MediaFile DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.ads.googleads.v10.resources.MediaFile();
}
public static com.google.ads.googleads.v10.resources.MediaFile getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public MediaFile 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.resources.MediaFile getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy