// Copyright 2016 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.api.ads.adwords.jaxws.v201607.cm; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.bind.annotation.XmlType; /** * * Represents some kind of media. * * * <p>Java class for Media complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * <complexType name="Media"> * <complexContent> * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * <sequence> * <element name="mediaId" type="{http://www.w3.org/2001/XMLSchema}long" minOccurs="0"/> * <element name="type" type="{https://adwords.google.com/api/adwords/cm/v201607}Media.MediaType" minOccurs="0"/> * <element name="referenceId" type="{http://www.w3.org/2001/XMLSchema}long" minOccurs="0"/> * <element name="dimensions" type="{https://adwords.google.com/api/adwords/cm/v201607}Media_Size_DimensionsMapEntry" maxOccurs="unbounded" minOccurs="0"/> * <element name="urls" type="{https://adwords.google.com/api/adwords/cm/v201607}Media_Size_StringMapEntry" maxOccurs="unbounded" minOccurs="0"/> * <element name="mimeType" type="{https://adwords.google.com/api/adwords/cm/v201607}Media.MimeType" minOccurs="0"/> * <element name="sourceUrl" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * <element name="name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * <element name="fileSize" type="{http://www.w3.org/2001/XMLSchema}long" minOccurs="0"/> * <element name="creationTime" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * <element name="Media.Type" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * </sequence> * </restriction> * </complexContent> * </complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Media", propOrder = { "mediaId", "type", "referenceId", "dimensions", "urls", "mimeType", "sourceUrl", "name", "fileSize", "creationTime", "mediaType" }) @XmlSeeAlso({ Audio.class, Video.class, Image.class, MediaBundle.class }) public class Media { protected Long mediaId; @XmlSchemaType(name = "string") protected MediaMediaType type; protected Long referenceId; protected List<MediaSizeDimensionsMapEntry> dimensions; protected List<MediaSizeStringMapEntry> urls; @XmlSchemaType(name = "string") protected MediaMimeType mimeType; protected String sourceUrl; protected String name; protected Long fileSize; protected String creationTime; @XmlElement(name = "Media.Type") protected String mediaType; /** * Gets the value of the mediaId property. * * @return * possible object is * {@link Long } * */ public Long getMediaId() { return mediaId; } /** * Sets the value of the mediaId property. * * @param value * allowed object is * {@link Long } * */ public void setMediaId(Long value) { this.mediaId = value; } /** * Gets the value of the type property. * * @return * possible object is * {@link MediaMediaType } * */ public MediaMediaType getType() { return type; } /** * Sets the value of the type property. * * @param value * allowed object is * {@link MediaMediaType } * */ public void setType(MediaMediaType value) { this.type = value; } /** * Gets the value of the referenceId property. * * @return * possible object is * {@link Long } * */ public Long getReferenceId() { return referenceId; } /** * Sets the value of the referenceId property. * * @param value * allowed object is * {@link Long } * */ public void setReferenceId(Long value) { this.referenceId = value; } /** * Gets the value of the dimensions property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the dimensions property. * * <p> * For example, to add a new item, do as follows: * <pre> * getDimensions().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link MediaSizeDimensionsMapEntry } * * */ public List<MediaSizeDimensionsMapEntry> getDimensions() { if (dimensions == null) { dimensions = new ArrayList<MediaSizeDimensionsMapEntry>(); } return this.dimensions; } /** * Gets the value of the urls property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the urls property. * * <p> * For example, to add a new item, do as follows: * <pre> * getUrls().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link MediaSizeStringMapEntry } * * */ public List<MediaSizeStringMapEntry> getUrls() { if (urls == null) { urls = new ArrayList<MediaSizeStringMapEntry>(); } return this.urls; } /** * Gets the value of the mimeType property. * * @return * possible object is * {@link MediaMimeType } * */ public MediaMimeType getMimeType() { return mimeType; } /** * Sets the value of the mimeType property. * * @param value * allowed object is * {@link MediaMimeType } * */ public void setMimeType(MediaMimeType value) { this.mimeType = value; } /** * Gets the value of the sourceUrl property. * * @return * possible object is * {@link String } * */ public String getSourceUrl() { return sourceUrl; } /** * Sets the value of the sourceUrl property. * * @param value * allowed object is * {@link String } * */ public void setSourceUrl(String value) { this.sourceUrl = value; } /** * Gets the value of the name property. * * @return * possible object is * {@link String } * */ public String getName() { return name; } /** * Sets the value of the name property. * * @param value * allowed object is * {@link String } * */ public void setName(String value) { this.name = value; } /** * Gets the value of the fileSize property. * * @return * possible object is * {@link Long } * */ public Long getFileSize() { return fileSize; } /** * Sets the value of the fileSize property. * * @param value * allowed object is * {@link Long } * */ public void setFileSize(Long value) { this.fileSize = value; } /** * Gets the value of the creationTime property. * * @return * possible object is * {@link String } * */ public String getCreationTime() { return creationTime; } /** * Sets the value of the creationTime property. * * @param value * allowed object is * {@link String } * */ public void setCreationTime(String value) { this.creationTime = value; } /** * Gets the value of the mediaType property. * * @return * possible object is * {@link String } * */ public String getMediaType() { return mediaType; } /** * Sets the value of the mediaType property. * * @param value * allowed object is * {@link String } * */ public void setMediaType(String value) { this.mediaType = value; } }