public static final class NativeStyle.Builder extends GeneratedMessage.Builder<NativeStyle.Builder> implements NativeStyleOrBuilderUsed 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
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > NativeStyle.BuilderImplements
NativeStyleOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
build()
public NativeStyle build()| Returns | |
|---|---|
| Type | Description |
NativeStyle |
|
buildPartial()
public NativeStyle buildPartial()| Returns | |
|---|---|
| Type | Description |
NativeStyle |
|
clear()
public NativeStyle.Builder clear()| Returns | |
|---|---|
| Type | Description |
NativeStyle.Builder |
|
clearCreativeTemplate()
public NativeStyle.Builder clearCreativeTemplate()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 |
NativeStyle.Builder |
This builder for chaining. |
clearCssSnippet()
public NativeStyle.Builder clearCssSnippet()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 |
NativeStyle.Builder |
This builder for chaining. |
clearDisplayName()
public NativeStyle.Builder clearDisplayName()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 |
NativeStyle.Builder |
This builder for chaining. |
clearHtmlSnippet()
public NativeStyle.Builder clearHtmlSnippet()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 |
NativeStyle.Builder |
This builder for chaining. |
clearName()
public NativeStyle.Builder clearName() 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 |
NativeStyle.Builder |
This builder for chaining. |
clearSize()
public NativeStyle.Builder clearSize()Required. The size of the native style.
.google.ads.admanager.v1.Size size = 12 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
NativeStyle.Builder |
|
clearStatus()
public NativeStyle.Builder clearStatus()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 |
NativeStyle.Builder |
This builder for chaining. |
clearTargeting()
public NativeStyle.Builder clearTargeting()Optional. The targeting criteria for this native style.
.google.ads.admanager.v1.Targeting targeting = 9 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
NativeStyle.Builder |
|
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 |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
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. |
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. |
getSizeBuilder()
public Size.Builder getSizeBuilder()Required. The size of the native style.
.google.ads.admanager.v1.Size size = 12 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
Size.Builder |
|
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. |
getTargetingBuilder()
public Targeting.Builder getTargetingBuilder()Optional. The targeting criteria for this native style.
.google.ads.admanager.v1.Targeting targeting = 9 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
Targeting.Builder |
|
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. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(NativeStyle other)
public NativeStyle.Builder mergeFrom(NativeStyle other)| Parameter | |
|---|---|
| Name | Description |
other |
NativeStyle |
| Returns | |
|---|---|
| Type | Description |
NativeStyle.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public NativeStyle.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
NativeStyle.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public NativeStyle.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
NativeStyle.Builder |
|
mergeSize(Size value)
public NativeStyle.Builder mergeSize(Size value)Required. The size of the native style.
.google.ads.admanager.v1.Size size = 12 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
Size |
| Returns | |
|---|---|
| Type | Description |
NativeStyle.Builder |
|
mergeTargeting(Targeting value)
public NativeStyle.Builder mergeTargeting(Targeting value)Optional. The targeting criteria for this native style.
.google.ads.admanager.v1.Targeting targeting = 9 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
Targeting |
| Returns | |
|---|---|
| Type | Description |
NativeStyle.Builder |
|
setCreativeTemplate(String value)
public NativeStyle.Builder setCreativeTemplate(String value)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) = { ... }
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe creativeTemplate to set. |
| Returns | |
|---|---|
| Type | Description |
NativeStyle.Builder |
This builder for chaining. |
setCreativeTemplateBytes(ByteString value)
public NativeStyle.Builder setCreativeTemplateBytes(ByteString value)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) = { ... }
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for creativeTemplate to set. |
| Returns | |
|---|---|
| Type | Description |
NativeStyle.Builder |
This builder for chaining. |
setCssSnippet(String value)
public NativeStyle.Builder setCssSnippet(String value)Optional. The CSS snippet of the native style, with placeholders for the associated variables.
optional string css_snippet = 5 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe cssSnippet to set. |
| Returns | |
|---|---|
| Type | Description |
NativeStyle.Builder |
This builder for chaining. |
setCssSnippetBytes(ByteString value)
public NativeStyle.Builder setCssSnippetBytes(ByteString value)Optional. The CSS snippet of the native style, with placeholders for the associated variables.
optional string css_snippet = 5 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for cssSnippet to set. |
| Returns | |
|---|---|
| Type | Description |
NativeStyle.Builder |
This builder for chaining. |
setDisplayName(String value)
public NativeStyle.Builder setDisplayName(String value)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];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe displayName to set. |
| Returns | |
|---|---|
| Type | Description |
NativeStyle.Builder |
This builder for chaining. |
setDisplayNameBytes(ByteString value)
public NativeStyle.Builder setDisplayNameBytes(ByteString value)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];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for displayName to set. |
| Returns | |
|---|---|
| Type | Description |
NativeStyle.Builder |
This builder for chaining. |
setHtmlSnippet(String value)
public NativeStyle.Builder setHtmlSnippet(String value)Optional. The HTML snippet of the native style with placeholders for the associated variables.
optional string html_snippet = 4 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe htmlSnippet to set. |
| Returns | |
|---|---|
| Type | Description |
NativeStyle.Builder |
This builder for chaining. |
setHtmlSnippetBytes(ByteString value)
public NativeStyle.Builder setHtmlSnippetBytes(ByteString value)Optional. The HTML snippet of the native style with placeholders for the associated variables.
optional string html_snippet = 4 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for htmlSnippet to set. |
| Returns | |
|---|---|
| Type | Description |
NativeStyle.Builder |
This builder for chaining. |
setName(String value)
public NativeStyle.Builder setName(String value) Identifier. The resource name of the NativeStyle.
Format: networks/{network_code}/nativeStyles/{native_style_id}
string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe name to set. |
| Returns | |
|---|---|
| Type | Description |
NativeStyle.Builder |
This builder for chaining. |
setNameBytes(ByteString value)
public NativeStyle.Builder setNameBytes(ByteString value) Identifier. The resource name of the NativeStyle.
Format: networks/{network_code}/nativeStyles/{native_style_id}
string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for name to set. |
| Returns | |
|---|---|
| Type | Description |
NativeStyle.Builder |
This builder for chaining. |
setSize(Size value)
public NativeStyle.Builder setSize(Size value)Required. The size of the native style.
.google.ads.admanager.v1.Size size = 12 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
Size |
| Returns | |
|---|---|
| Type | Description |
NativeStyle.Builder |
|
setSize(Size.Builder builderForValue)
public NativeStyle.Builder setSize(Size.Builder builderForValue)Required. The size of the native style.
.google.ads.admanager.v1.Size size = 12 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
Size.Builder |
| Returns | |
|---|---|
| Type | Description |
NativeStyle.Builder |
|
setStatus(NativeStyleStatusEnum.NativeStyleStatus value)
public NativeStyle.Builder setStatus(NativeStyleStatusEnum.NativeStyleStatus value)Output only. The status of the native style.
optional .google.ads.admanager.v1.NativeStyleStatusEnum.NativeStyleStatus status = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
NativeStyleStatusEnum.NativeStyleStatusThe status to set. |
| Returns | |
|---|---|
| Type | Description |
NativeStyle.Builder |
This builder for chaining. |
setStatusValue(int value)
public NativeStyle.Builder setStatusValue(int value)Output only. The status of the native style.
optional .google.ads.admanager.v1.NativeStyleStatusEnum.NativeStyleStatus status = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
intThe enum numeric value on the wire for status to set. |
| Returns | |
|---|---|
| Type | Description |
NativeStyle.Builder |
This builder for chaining. |
setTargeting(Targeting value)
public NativeStyle.Builder setTargeting(Targeting value)Optional. The targeting criteria for this native style.
.google.ads.admanager.v1.Targeting targeting = 9 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
Targeting |
| Returns | |
|---|---|
| Type | Description |
NativeStyle.Builder |
|
setTargeting(Targeting.Builder builderForValue)
public NativeStyle.Builder setTargeting(Targeting.Builder builderForValue)Optional. The targeting criteria for this native style.
.google.ads.admanager.v1.Targeting targeting = 9 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
Targeting.Builder |
| Returns | |
|---|---|
| Type | Description |
NativeStyle.Builder |
|