// 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.dfp.jaxws.v201608; 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.XmlSchemaType; import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.bind.annotation.XmlType; /** * * A {@code Creative} represents the media for the ad being served. * * * <p>Java class for Creative complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * <complexType name="Creative"> * <complexContent> * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * <sequence> * <element name="advertiserId" type="{http://www.w3.org/2001/XMLSchema}long" minOccurs="0"/> * <element name="id" type="{http://www.w3.org/2001/XMLSchema}long" minOccurs="0"/> * <element name="name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * <element name="size" type="{https://www.google.com/apis/ads/publisher/v201608}Size" minOccurs="0"/> * <element name="previewUrl" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * <element name="policyViolations" type="{https://www.google.com/apis/ads/publisher/v201608}CreativePolicyViolation" maxOccurs="unbounded" minOccurs="0"/> * <element name="appliedLabels" type="{https://www.google.com/apis/ads/publisher/v201608}AppliedLabel" maxOccurs="unbounded" minOccurs="0"/> * <element name="lastModifiedDateTime" type="{https://www.google.com/apis/ads/publisher/v201608}DateTime" minOccurs="0"/> * <element name="customFieldValues" type="{https://www.google.com/apis/ads/publisher/v201608}BaseCustomFieldValue" maxOccurs="unbounded" minOccurs="0"/> * </sequence> * </restriction> * </complexContent> * </complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Creative", propOrder = { "advertiserId", "id", "name", "size", "previewUrl", "policyViolations", "appliedLabels", "lastModifiedDateTime", "customFieldValues" }) @XmlSeeAlso({ VastRedirectCreative.class, UnsupportedCreative.class, ClickTrackingCreative.class, ThirdPartyCreative.class, ProgrammaticCreative.class, LegacyDfpCreative.class, TemplateCreative.class, InternalRedirectCreative.class, BaseRichMediaStudioCreative.class, BaseDynamicAllocationCreative.class, HasDestinationUrlCreative.class, Html5Creative.class }) public abstract class Creative { protected Long advertiserId; protected Long id; protected String name; protected Size size; protected String previewUrl; @XmlSchemaType(name = "string") protected List<CreativePolicyViolation> policyViolations; protected List<AppliedLabel> appliedLabels; protected DateTime lastModifiedDateTime; protected List<BaseCustomFieldValue> customFieldValues; /** * Gets the value of the advertiserId property. * * @return * possible object is * {@link Long } * */ public Long getAdvertiserId() { return advertiserId; } /** * Sets the value of the advertiserId property. * * @param value * allowed object is * {@link Long } * */ public void setAdvertiserId(Long value) { this.advertiserId = value; } /** * Gets the value of the id property. * * @return * possible object is * {@link Long } * */ public Long getId() { return id; } /** * Sets the value of the id property. * * @param value * allowed object is * {@link Long } * */ public void setId(Long value) { this.id = 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 size property. * * @return * possible object is * {@link Size } * */ public Size getSize() { return size; } /** * Sets the value of the size property. * * @param value * allowed object is * {@link Size } * */ public void setSize(Size value) { this.size = value; } /** * Gets the value of the previewUrl property. * * @return * possible object is * {@link String } * */ public String getPreviewUrl() { return previewUrl; } /** * Sets the value of the previewUrl property. * * @param value * allowed object is * {@link String } * */ public void setPreviewUrl(String value) { this.previewUrl = value; } /** * Gets the value of the policyViolations 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 policyViolations property. * * <p> * For example, to add a new item, do as follows: * <pre> * getPolicyViolations().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link CreativePolicyViolation } * * */ public List<CreativePolicyViolation> getPolicyViolations() { if (policyViolations == null) { policyViolations = new ArrayList<CreativePolicyViolation>(); } return this.policyViolations; } /** * Gets the value of the appliedLabels 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 appliedLabels property. * * <p> * For example, to add a new item, do as follows: * <pre> * getAppliedLabels().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link AppliedLabel } * * */ public List<AppliedLabel> getAppliedLabels() { if (appliedLabels == null) { appliedLabels = new ArrayList<AppliedLabel>(); } return this.appliedLabels; } /** * Gets the value of the lastModifiedDateTime property. * * @return * possible object is * {@link DateTime } * */ public DateTime getLastModifiedDateTime() { return lastModifiedDateTime; } /** * Sets the value of the lastModifiedDateTime property. * * @param value * allowed object is * {@link DateTime } * */ public void setLastModifiedDateTime(DateTime value) { this.lastModifiedDateTime = value; } /** * Gets the value of the customFieldValues 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 customFieldValues property. * * <p> * For example, to add a new item, do as follows: * <pre> * getCustomFieldValues().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link BaseCustomFieldValue } * * */ public List<BaseCustomFieldValue> getCustomFieldValues() { if (customFieldValues == null) { customFieldValues = new ArrayList<BaseCustomFieldValue>(); } return this.customFieldValues; } }