public class AdUnitSize extends Object
AdUnitSize represents the size of an ad in an ad unit. This also represents
the environment and companions of a particular ad in an ad unit. In most cases, it is
a simple size with just a width and a height (sometimes representing an aspect ratio).
Java class for AdUnitSize complex type.
The following schema fragment specifies the expected content contained within this class.
<complexType name="AdUnitSize">
<complexContent>
<restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
<sequence>
<element name="size" type="{https://www.google.com/apis/ads/publisher/v201802}Size" minOccurs="0"/>
<element name="environmentType" type="{https://www.google.com/apis/ads/publisher/v201802}EnvironmentType" minOccurs="0"/>
<element name="companions" type="{https://www.google.com/apis/ads/publisher/v201802}AdUnitSize" maxOccurs="unbounded" minOccurs="0"/>
<element name="fullDisplayString" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
</sequence>
</restriction>
</complexContent>
</complexType>
| Modifier and Type | Field and Description |
|---|---|
protected List<AdUnitSize> |
companions |
protected EnvironmentType |
environmentType |
protected String |
fullDisplayString |
protected Size |
size |
| Constructor and Description |
|---|
AdUnitSize() |
| Modifier and Type | Method and Description |
|---|---|
List<AdUnitSize> |
getCompanions()
Gets the value of the companions property.
|
EnvironmentType |
getEnvironmentType()
Gets the value of the environmentType property.
|
String |
getFullDisplayString()
Gets the value of the fullDisplayString property.
|
Size |
getSize()
Gets the value of the size property.
|
void |
setEnvironmentType(EnvironmentType value)
Sets the value of the environmentType property.
|
void |
setFullDisplayString(String value)
Sets the value of the fullDisplayString property.
|
void |
setSize(Size value)
Sets the value of the size property.
|
protected Size size
protected EnvironmentType environmentType
protected List<AdUnitSize> companions
protected String fullDisplayString
public void setSize(Size value)
value - allowed object is
Sizepublic EnvironmentType getEnvironmentType()
EnvironmentTypepublic void setEnvironmentType(EnvironmentType value)
value - allowed object is
EnvironmentTypepublic List<AdUnitSize> getCompanions()
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 set method for the companions property.
For example, to add a new item, do as follows:
getCompanions().add(newItem);
Objects of the following type(s) are allowed in the list
AdUnitSize
public String getFullDisplayString()
StringCopyright © 2018. All Rights Reserved.