Class NativeStyle (0.58.0)

public final class NativeStyle extends GeneratedMessage implements NativeStyleOrBuilder

Used to define the look and feel of native ads, for both web and apps. Native styles determine how native creatives look for a segment of inventory.

Protobuf type google.ads.admanager.v1.NativeStyle

Static Fields

CREATIVE_TEMPLATE_FIELD_NUMBER

public static final int CREATIVE_TEMPLATE_FIELD_NUMBER
Field Value
Type Description
int

CSS_SNIPPET_FIELD_NUMBER

public static final int CSS_SNIPPET_FIELD_NUMBER
Field Value
Type Description
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
Type Description
int

HTML_SNIPPET_FIELD_NUMBER

public static final int HTML_SNIPPET_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

SIZE_FIELD_NUMBER

public static final int SIZE_FIELD_NUMBER
Field Value
Type Description
int

STATUS_FIELD_NUMBER

public static final int STATUS_FIELD_NUMBER
Field Value
Type Description
int

TARGETING_FIELD_NUMBER

public static final int TARGETING_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static NativeStyle getDefaultInstance()
Returns
Type Description
NativeStyle

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static NativeStyle.Builder newBuilder()
Returns
Type Description
NativeStyle.Builder

newBuilder(NativeStyle prototype)

public static NativeStyle.Builder newBuilder(NativeStyle prototype)
Parameter
Name Description
prototype NativeStyle
Returns
Type Description
NativeStyle.Builder

parseDelimitedFrom(InputStream input)

public static NativeStyle parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
NativeStyle
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static NativeStyle parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
NativeStyle
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static NativeStyle parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
NativeStyle
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static NativeStyle parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
NativeStyle
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static NativeStyle parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
NativeStyle
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static NativeStyle parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
NativeStyle
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static NativeStyle parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
NativeStyle
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static NativeStyle parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
NativeStyle
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static NativeStyle parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
NativeStyle
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static NativeStyle parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
NativeStyle
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static NativeStyle parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
NativeStyle
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static NativeStyle parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
NativeStyle
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<NativeStyle> parser()
Returns
Type Description
Parser<NativeStyle>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getCreativeTemplate()

public String getCreativeTemplate()

Required. Immutable. The creative template this native style is associated with. Format: "networks/{network_code}/creativeTemplates/{creative_template}"

optional string creative_template = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The creativeTemplate.

getCreativeTemplateBytes()

public ByteString getCreativeTemplateBytes()

Required. Immutable. The creative template this native style is associated with. Format: "networks/{network_code}/creativeTemplates/{creative_template}"

optional string creative_template = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for creativeTemplate.

getCssSnippet()

public String getCssSnippet()

Optional. The CSS snippet of the native style, with placeholders for the associated variables.

optional string css_snippet = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The cssSnippet.

getCssSnippetBytes()

public ByteString getCssSnippetBytes()

Optional. The CSS snippet of the native style, with placeholders for the associated variables.

optional string css_snippet = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for cssSnippet.

getDefaultInstanceForType()

public NativeStyle getDefaultInstanceForType()
Returns
Type Description
NativeStyle

getDisplayName()

public String getDisplayName()

Required. The display name of the native style. This attribute has a maximum length of 255 characters.

optional string display_name = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Required. The display name of the native style. This attribute has a maximum length of 255 characters.

optional string display_name = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for displayName.

getHtmlSnippet()

public String getHtmlSnippet()

Optional. The HTML snippet of the native style with placeholders for the associated variables.

optional string html_snippet = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The htmlSnippet.

getHtmlSnippetBytes()

public ByteString getHtmlSnippetBytes()

Optional. The HTML snippet of the native style with placeholders for the associated variables.

optional string html_snippet = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for htmlSnippet.

getName()

public String getName()

Identifier. The resource name of the NativeStyle. Format: networks/{network_code}/nativeStyles/{native_style_id}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Identifier. The resource name of the NativeStyle. Format: networks/{network_code}/nativeStyles/{native_style_id}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
ByteString

The bytes for name.

getParserForType()

public Parser<NativeStyle> getParserForType()
Returns
Type Description
Parser<NativeStyle>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getSize()

public Size getSize()

Required. The size of the native style.

.google.ads.admanager.v1.Size size = 12 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Size

The size.

getSizeOrBuilder()

public SizeOrBuilder getSizeOrBuilder()

Required. The size of the native style.

.google.ads.admanager.v1.Size size = 12 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
SizeOrBuilder

getStatus()

public NativeStyleStatusEnum.NativeStyleStatus getStatus()

Output only. The status of the native style.

optional .google.ads.admanager.v1.NativeStyleStatusEnum.NativeStyleStatus status = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
NativeStyleStatusEnum.NativeStyleStatus

The status.

getStatusValue()

public int getStatusValue()

Output only. The status of the native style.

optional .google.ads.admanager.v1.NativeStyleStatusEnum.NativeStyleStatus status = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for status.

getTargeting()

public Targeting getTargeting()

Optional. The targeting criteria for this native style.

.google.ads.admanager.v1.Targeting targeting = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Targeting

The targeting.

getTargetingOrBuilder()

public TargetingOrBuilder getTargetingOrBuilder()

Optional. The targeting criteria for this native style.

.google.ads.admanager.v1.Targeting targeting = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
TargetingOrBuilder

hasCreativeTemplate()

public boolean hasCreativeTemplate()

Required. Immutable. The creative template this native style is associated with. Format: "networks/{network_code}/creativeTemplates/{creative_template}"

optional string creative_template = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }

Returns
Type Description
boolean

Whether the creativeTemplate field is set.

hasCssSnippet()

public boolean hasCssSnippet()

Optional. The CSS snippet of the native style, with placeholders for the associated variables.

optional string css_snippet = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the cssSnippet field is set.

hasDisplayName()

public boolean hasDisplayName()

Required. The display name of the native style. This attribute has a maximum length of 255 characters.

optional string display_name = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the displayName field is set.

hasHtmlSnippet()

public boolean hasHtmlSnippet()

Optional. The HTML snippet of the native style with placeholders for the associated variables.

optional string html_snippet = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the htmlSnippet field is set.

hasSize()

public boolean hasSize()

Required. The size of the native style.

.google.ads.admanager.v1.Size size = 12 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the size field is set.

hasStatus()

public boolean hasStatus()

Output only. The status of the native style.

optional .google.ads.admanager.v1.NativeStyleStatusEnum.NativeStyleStatus status = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the status field is set.

hasTargeting()

public boolean hasTargeting()

Optional. The targeting criteria for this native style.

.google.ads.admanager.v1.Targeting targeting = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the targeting field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public NativeStyle.Builder newBuilderForType()
Returns
Type Description
NativeStyle.Builder

newBuilderForType(AbstractMessage.BuilderParent parent)

protected NativeStyle.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
NativeStyle.Builder
Overrides

toBuilder()

public NativeStyle.Builder toBuilder()
Returns
Type Description
NativeStyle.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException