Class TargetingPreset (0.54.0)

public final class TargetingPreset extends GeneratedMessage implements TargetingPresetOrBuilder

User-defined preset targeting criteria.

Protobuf type google.ads.admanager.v1.TargetingPreset

Static Fields

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_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 TargetingPreset getDefaultInstance()
Returns
Type Description
TargetingPreset

getDescriptor()

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

newBuilder()

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

newBuilder(TargetingPreset prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getDefaultInstanceForType()

public TargetingPreset getDefaultInstanceForType()
Returns
Type Description
TargetingPreset

getDisplayName()

public String getDisplayName()

Required. The name of the TargetingPreset. 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 name of the TargetingPreset. 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.

getName()

public String getName()

Identifier. The resource name of the TargetingPreset. Format: networks/{network_code}/targetingPresets/{targeting_preset_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 TargetingPreset. Format: networks/{network_code}/targetingPresets/{targeting_preset_id}

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

Returns
Type Description
ByteString

The bytes for name.

getParserForType()

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

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getStatus()

public TargetingPresetStatusEnum.TargetingPresetStatus getStatus()

Output only. The status of the TargetingPreset.

optional .google.ads.admanager.v1.TargetingPresetStatusEnum.TargetingPresetStatus status = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TargetingPresetStatusEnum.TargetingPresetStatus

The status.

getStatusValue()

public int getStatusValue()

Output only. The status of the TargetingPreset.

optional .google.ads.admanager.v1.TargetingPresetStatusEnum.TargetingPresetStatus status = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for status.

getTargeting()

public Targeting getTargeting()

Required. Contains the targeting criteria for the TargetingPreset. If not provided, empty targeting will be used as a default.

optional .google.ads.admanager.v1.Targeting targeting = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Targeting

The targeting.

getTargetingOrBuilder()

public TargetingOrBuilder getTargetingOrBuilder()

Required. Contains the targeting criteria for the TargetingPreset. If not provided, empty targeting will be used as a default.

optional .google.ads.admanager.v1.Targeting targeting = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
TargetingOrBuilder

hasDisplayName()

public boolean hasDisplayName()

Required. The name of the TargetingPreset. 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.

hasStatus()

public boolean hasStatus()

Output only. The status of the TargetingPreset.

optional .google.ads.admanager.v1.TargetingPresetStatusEnum.TargetingPresetStatus status = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the status field is set.

hasTargeting()

public boolean hasTargeting()

Required. Contains the targeting criteria for the TargetingPreset. If not provided, empty targeting will be used as a default.

optional .google.ads.admanager.v1.Targeting targeting = 4 [(.google.api.field_behavior) = REQUIRED];

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 TargetingPreset.Builder newBuilderForType()
Returns
Type Description
TargetingPreset.Builder

newBuilderForType(AbstractMessage.BuilderParent parent)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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