Class MediaFile

  • All Implemented Interfaces:
    MediaFileOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, java.io.Serializable

    public final class MediaFile
    extends com.google.protobuf.GeneratedMessageV3
    implements MediaFileOrBuilder
     A media file.
     
    Protobuf type google.ads.googleads.v10.resources.MediaFile
    See Also:
    Serialized Form
    • Method Detail

      • newInstance

        protected java.lang.Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getUnknownFields

        public final com.google.protobuf.UnknownFieldSet getUnknownFields()
        Specified by:
        getUnknownFields in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getUnknownFields in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • getResourceName

        public java.lang.String getResourceName()
         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) = { ... }
        Specified by:
        getResourceName in interface MediaFileOrBuilder
        Returns:
        The resourceName.
      • getResourceNameBytes

        public com.google.protobuf.ByteString getResourceNameBytes()
         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) = { ... }
        Specified by:
        getResourceNameBytes in interface MediaFileOrBuilder
        Returns:
        The bytes for resourceName.
      • hasId

        public boolean hasId()
         Output only. The ID of the media file.
         
        optional int64 id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasId in interface MediaFileOrBuilder
        Returns:
        Whether the id field is set.
      • getId

        public long getId()
         Output only. The ID of the media file.
         
        optional int64 id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getId in interface MediaFileOrBuilder
        Returns:
        The id.
      • getTypeValue

        public int getTypeValue()
         Immutable. Type of the media file.
         
        .google.ads.googleads.v10.enums.MediaTypeEnum.MediaType type = 5 [(.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getTypeValue in interface MediaFileOrBuilder
        Returns:
        The enum numeric value on the wire for type.
      • getType

        public MediaTypeEnum.MediaType getType()
         Immutable. Type of the media file.
         
        .google.ads.googleads.v10.enums.MediaTypeEnum.MediaType type = 5 [(.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getType in interface MediaFileOrBuilder
        Returns:
        The type.
      • getMimeTypeValue

        public int getMimeTypeValue()
         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];
        Specified by:
        getMimeTypeValue in interface MediaFileOrBuilder
        Returns:
        The enum numeric value on the wire for mimeType.
      • getMimeType

        public MimeTypeEnum.MimeType getMimeType()
         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];
        Specified by:
        getMimeType in interface MediaFileOrBuilder
        Returns:
        The mimeType.
      • hasSourceUrl

        public boolean hasSourceUrl()
         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];
        Specified by:
        hasSourceUrl in interface MediaFileOrBuilder
        Returns:
        Whether the sourceUrl field is set.
      • getSourceUrl

        public java.lang.String getSourceUrl()
         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];
        Specified by:
        getSourceUrl in interface MediaFileOrBuilder
        Returns:
        The sourceUrl.
      • getSourceUrlBytes

        public com.google.protobuf.ByteString getSourceUrlBytes()
         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];
        Specified by:
        getSourceUrlBytes in interface MediaFileOrBuilder
        Returns:
        The bytes for sourceUrl.
      • hasName

        public boolean hasName()
         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];
        Specified by:
        hasName in interface MediaFileOrBuilder
        Returns:
        Whether the name field is set.
      • getName

        public java.lang.String getName()
         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];
        Specified by:
        getName in interface MediaFileOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         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];
        Specified by:
        getNameBytes in interface MediaFileOrBuilder
        Returns:
        The bytes for name.
      • hasFileSize

        public boolean hasFileSize()
         Output only. The size of the media file in bytes.
         
        optional int64 file_size = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasFileSize in interface MediaFileOrBuilder
        Returns:
        Whether the fileSize field is set.
      • getFileSize

        public long getFileSize()
         Output only. The size of the media file in bytes.
         
        optional int64 file_size = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getFileSize in interface MediaFileOrBuilder
        Returns:
        The fileSize.
      • hasImage

        public boolean hasImage()
         Immutable. Encapsulates an Image.
         
        .google.ads.googleads.v10.resources.MediaImage image = 3 [(.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        hasImage in interface MediaFileOrBuilder
        Returns:
        Whether the image field is set.
      • getImage

        public MediaImage getImage()
         Immutable. Encapsulates an Image.
         
        .google.ads.googleads.v10.resources.MediaImage image = 3 [(.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getImage in interface MediaFileOrBuilder
        Returns:
        The image.
      • hasMediaBundle

        public boolean hasMediaBundle()
         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];
        Specified by:
        hasMediaBundle in interface MediaFileOrBuilder
        Returns:
        Whether the mediaBundle field is set.
      • getMediaBundle

        public MediaBundle getMediaBundle()
         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];
        Specified by:
        getMediaBundle in interface MediaFileOrBuilder
        Returns:
        The mediaBundle.
      • getMediaBundleOrBuilder

        public MediaBundleOrBuilder getMediaBundleOrBuilder()
         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];
        Specified by:
        getMediaBundleOrBuilder in interface MediaFileOrBuilder
      • hasAudio

        public boolean hasAudio()
         Output only. Encapsulates an Audio.
         
        .google.ads.googleads.v10.resources.MediaAudio audio = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasAudio in interface MediaFileOrBuilder
        Returns:
        Whether the audio field is set.
      • getAudio

        public MediaAudio getAudio()
         Output only. Encapsulates an Audio.
         
        .google.ads.googleads.v10.resources.MediaAudio audio = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getAudio in interface MediaFileOrBuilder
        Returns:
        The audio.
      • getAudioOrBuilder

        public MediaAudioOrBuilder getAudioOrBuilder()
         Output only. Encapsulates an Audio.
         
        .google.ads.googleads.v10.resources.MediaAudio audio = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getAudioOrBuilder in interface MediaFileOrBuilder
      • hasVideo

        public boolean hasVideo()
         Immutable. Encapsulates a Video.
         
        .google.ads.googleads.v10.resources.MediaVideo video = 11 [(.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        hasVideo in interface MediaFileOrBuilder
        Returns:
        Whether the video field is set.
      • getVideo

        public MediaVideo getVideo()
         Immutable. Encapsulates a Video.
         
        .google.ads.googleads.v10.resources.MediaVideo video = 11 [(.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getVideo in interface MediaFileOrBuilder
        Returns:
        The video.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws java.io.IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        java.io.IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static MediaFile parseFrom​(java.nio.ByteBuffer data)
                                   throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static MediaFile parseFrom​(java.nio.ByteBuffer data,
                                          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                   throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static MediaFile parseFrom​(com.google.protobuf.ByteString data)
                                   throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static MediaFile parseFrom​(com.google.protobuf.ByteString data,
                                          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                   throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static MediaFile parseFrom​(byte[] data)
                                   throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static MediaFile parseFrom​(byte[] data,
                                          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                   throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static MediaFile parseFrom​(java.io.InputStream input)
                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static MediaFile parseFrom​(java.io.InputStream input,
                                          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • parseDelimitedFrom

        public static MediaFile parseDelimitedFrom​(java.io.InputStream input)
                                            throws java.io.IOException
        Throws:
        java.io.IOException
      • parseDelimitedFrom

        public static MediaFile parseDelimitedFrom​(java.io.InputStream input,
                                                   com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                            throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static MediaFile parseFrom​(com.google.protobuf.CodedInputStream input)
                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static MediaFile parseFrom​(com.google.protobuf.CodedInputStream input,
                                          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • newBuilderForType

        public MediaFile.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public MediaFile.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected MediaFile.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static MediaFile getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<MediaFile> parser()
      • getParserForType

        public com.google.protobuf.Parser<MediaFile> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public MediaFile getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder