Class CustomField.Builder (0.5.0)

public static final class CustomField.Builder extends GeneratedMessageV3.Builder<CustomField.Builder> implements CustomFieldOrBuilder

The CustomField resource.

Protobuf type google.ads.admanager.v1.CustomField

Static Methods

getDescriptor()

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

Methods

addAllOptions(Iterable<? extends CustomFieldOption> values)

public CustomField.Builder addAllOptions(Iterable<? extends CustomFieldOption> values)

Optional. The drop-down options for the CustomField.

Only applicable for CustomField with the drop-down data type.

repeated .google.ads.admanager.v1.CustomFieldOption options = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<? extends com.google.ads.admanager.v1.CustomFieldOption>
Returns
Type Description
CustomField.Builder

addOptions(CustomFieldOption value)

public CustomField.Builder addOptions(CustomFieldOption value)

Optional. The drop-down options for the CustomField.

Only applicable for CustomField with the drop-down data type.

repeated .google.ads.admanager.v1.CustomFieldOption options = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value CustomFieldOption
Returns
Type Description
CustomField.Builder

addOptions(CustomFieldOption.Builder builderForValue)

public CustomField.Builder addOptions(CustomFieldOption.Builder builderForValue)

Optional. The drop-down options for the CustomField.

Only applicable for CustomField with the drop-down data type.

repeated .google.ads.admanager.v1.CustomFieldOption options = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue CustomFieldOption.Builder
Returns
Type Description
CustomField.Builder

addOptions(int index, CustomFieldOption value)

public CustomField.Builder addOptions(int index, CustomFieldOption value)

Optional. The drop-down options for the CustomField.

Only applicable for CustomField with the drop-down data type.

repeated .google.ads.admanager.v1.CustomFieldOption options = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value CustomFieldOption
Returns
Type Description
CustomField.Builder

addOptions(int index, CustomFieldOption.Builder builderForValue)

public CustomField.Builder addOptions(int index, CustomFieldOption.Builder builderForValue)

Optional. The drop-down options for the CustomField.

Only applicable for CustomField with the drop-down data type.

repeated .google.ads.admanager.v1.CustomFieldOption options = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue CustomFieldOption.Builder
Returns
Type Description
CustomField.Builder

addOptionsBuilder()

public CustomFieldOption.Builder addOptionsBuilder()

Optional. The drop-down options for the CustomField.

Only applicable for CustomField with the drop-down data type.

repeated .google.ads.admanager.v1.CustomFieldOption options = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CustomFieldOption.Builder

addOptionsBuilder(int index)

public CustomFieldOption.Builder addOptionsBuilder(int index)

Optional. The drop-down options for the CustomField.

Only applicable for CustomField with the drop-down data type.

repeated .google.ads.admanager.v1.CustomFieldOption options = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
CustomFieldOption.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public CustomField.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
CustomField.Builder
Overrides

build()

public CustomField build()
Returns
Type Description
CustomField

buildPartial()

public CustomField buildPartial()
Returns
Type Description
CustomField

clear()

public CustomField.Builder clear()
Returns
Type Description
CustomField.Builder
Overrides

clearCustomFieldId()

public CustomField.Builder clearCustomFieldId()

Output only. CustomField ID.

int64 custom_field_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
CustomField.Builder

This builder for chaining.

clearDataType()

public CustomField.Builder clearDataType()

Required. The data type of the CustomField.

.google.ads.admanager.v1.CustomFieldDataTypeEnum.CustomFieldDataType data_type = 8 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CustomField.Builder

This builder for chaining.

clearDescription()

public CustomField.Builder clearDescription()

Optional. The description of the CustomField.

This value has a maximum length of 511 characters.

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

Returns
Type Description
CustomField.Builder

This builder for chaining.

clearDisplayName()

public CustomField.Builder clearDisplayName()

Required. The display name of the CustomField.

This value has a maximum length of 127 characters.

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

Returns
Type Description
CustomField.Builder

This builder for chaining.

clearEntityType()

public CustomField.Builder clearEntityType()

Required. The type of entity the CustomField can be applied to.

.google.ads.admanager.v1.CustomFieldEntityTypeEnum.CustomFieldEntityType entity_type = 7 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CustomField.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public CustomField.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
CustomField.Builder
Overrides

clearName()

public CustomField.Builder clearName()

Identifier. The resource name of the CustomField. Format: networks/{network_code}/customFields/{custom_field_id}

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

Returns
Type Description
CustomField.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public CustomField.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
CustomField.Builder
Overrides

clearOptions()

public CustomField.Builder clearOptions()

Optional. The drop-down options for the CustomField.

Only applicable for CustomField with the drop-down data type.

repeated .google.ads.admanager.v1.CustomFieldOption options = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CustomField.Builder

clearStatus()

public CustomField.Builder clearStatus()

Output only. The status of the CustomField.

.google.ads.admanager.v1.CustomFieldStatusEnum.CustomFieldStatus status = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
CustomField.Builder

This builder for chaining.

clearVisibility()

public CustomField.Builder clearVisibility()

Required. The visibility of the CustomField.

.google.ads.admanager.v1.CustomFieldVisibilityEnum.CustomFieldVisibility visibility = 9 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CustomField.Builder

This builder for chaining.

clone()

public CustomField.Builder clone()
Returns
Type Description
CustomField.Builder
Overrides

getCustomFieldId()

public long getCustomFieldId()

Output only. CustomField ID.

int64 custom_field_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
long

The customFieldId.

getDataType()

public CustomFieldDataTypeEnum.CustomFieldDataType getDataType()

Required. The data type of the CustomField.

.google.ads.admanager.v1.CustomFieldDataTypeEnum.CustomFieldDataType data_type = 8 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CustomFieldDataTypeEnum.CustomFieldDataType

The dataType.

getDataTypeValue()

public int getDataTypeValue()

Required. The data type of the CustomField.

.google.ads.admanager.v1.CustomFieldDataTypeEnum.CustomFieldDataType data_type = 8 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for dataType.

getDefaultInstanceForType()

public CustomField getDefaultInstanceForType()
Returns
Type Description
CustomField

getDescription()

public String getDescription()

Optional. The description of the CustomField.

This value has a maximum length of 511 characters.

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

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. The description of the CustomField.

This value has a maximum length of 511 characters.

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

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getDisplayName()

public String getDisplayName()

Required. The display name of the CustomField.

This value has a maximum length of 127 characters.

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 CustomField.

This value has a maximum length of 127 characters.

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

Returns
Type Description
ByteString

The bytes for displayName.

getEntityType()

public CustomFieldEntityTypeEnum.CustomFieldEntityType getEntityType()

Required. The type of entity the CustomField can be applied to.

.google.ads.admanager.v1.CustomFieldEntityTypeEnum.CustomFieldEntityType entity_type = 7 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CustomFieldEntityTypeEnum.CustomFieldEntityType

The entityType.

getEntityTypeValue()

public int getEntityTypeValue()

Required. The type of entity the CustomField can be applied to.

.google.ads.admanager.v1.CustomFieldEntityTypeEnum.CustomFieldEntityType entity_type = 7 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for entityType.

getName()

public String getName()

Identifier. The resource name of the CustomField. Format: networks/{network_code}/customFields/{custom_field_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 CustomField. Format: networks/{network_code}/customFields/{custom_field_id}

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

Returns
Type Description
ByteString

The bytes for name.

getOptions(int index)

public CustomFieldOption getOptions(int index)

Optional. The drop-down options for the CustomField.

Only applicable for CustomField with the drop-down data type.

repeated .google.ads.admanager.v1.CustomFieldOption options = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
CustomFieldOption

getOptionsBuilder(int index)

public CustomFieldOption.Builder getOptionsBuilder(int index)

Optional. The drop-down options for the CustomField.

Only applicable for CustomField with the drop-down data type.

repeated .google.ads.admanager.v1.CustomFieldOption options = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
CustomFieldOption.Builder

getOptionsBuilderList()

public List<CustomFieldOption.Builder> getOptionsBuilderList()

Optional. The drop-down options for the CustomField.

Only applicable for CustomField with the drop-down data type.

repeated .google.ads.admanager.v1.CustomFieldOption options = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Builder>

getOptionsCount()

public int getOptionsCount()

Optional. The drop-down options for the CustomField.

Only applicable for CustomField with the drop-down data type.

repeated .google.ads.admanager.v1.CustomFieldOption options = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getOptionsList()

public List<CustomFieldOption> getOptionsList()

Optional. The drop-down options for the CustomField.

Only applicable for CustomField with the drop-down data type.

repeated .google.ads.admanager.v1.CustomFieldOption options = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<CustomFieldOption>

getOptionsOrBuilder(int index)

public CustomFieldOptionOrBuilder getOptionsOrBuilder(int index)

Optional. The drop-down options for the CustomField.

Only applicable for CustomField with the drop-down data type.

repeated .google.ads.admanager.v1.CustomFieldOption options = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
CustomFieldOptionOrBuilder

getOptionsOrBuilderList()

public List<? extends CustomFieldOptionOrBuilder> getOptionsOrBuilderList()

Optional. The drop-down options for the CustomField.

Only applicable for CustomField with the drop-down data type.

repeated .google.ads.admanager.v1.CustomFieldOption options = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.ads.admanager.v1.CustomFieldOptionOrBuilder>

getStatus()

public CustomFieldStatusEnum.CustomFieldStatus getStatus()

Output only. The status of the CustomField.

.google.ads.admanager.v1.CustomFieldStatusEnum.CustomFieldStatus status = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
CustomFieldStatusEnum.CustomFieldStatus

The status.

getStatusValue()

public int getStatusValue()

Output only. The status of the CustomField.

.google.ads.admanager.v1.CustomFieldStatusEnum.CustomFieldStatus status = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for status.

getVisibility()

public CustomFieldVisibilityEnum.CustomFieldVisibility getVisibility()

Required. The visibility of the CustomField.

.google.ads.admanager.v1.CustomFieldVisibilityEnum.CustomFieldVisibility visibility = 9 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CustomFieldVisibilityEnum.CustomFieldVisibility

The visibility.

getVisibilityValue()

public int getVisibilityValue()

Required. The visibility of the CustomField.

.google.ads.admanager.v1.CustomFieldVisibilityEnum.CustomFieldVisibility visibility = 9 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for visibility.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CustomField other)

public CustomField.Builder mergeFrom(CustomField other)
Parameter
Name Description
other CustomField
Returns
Type Description
CustomField.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public CustomField.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CustomField.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public CustomField.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
CustomField.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final CustomField.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
CustomField.Builder
Overrides

removeOptions(int index)

public CustomField.Builder removeOptions(int index)

Optional. The drop-down options for the CustomField.

Only applicable for CustomField with the drop-down data type.

repeated .google.ads.admanager.v1.CustomFieldOption options = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
CustomField.Builder

setCustomFieldId(long value)

public CustomField.Builder setCustomFieldId(long value)

Output only. CustomField ID.

int64 custom_field_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value long

The customFieldId to set.

Returns
Type Description
CustomField.Builder

This builder for chaining.

setDataType(CustomFieldDataTypeEnum.CustomFieldDataType value)

public CustomField.Builder setDataType(CustomFieldDataTypeEnum.CustomFieldDataType value)

Required. The data type of the CustomField.

.google.ads.admanager.v1.CustomFieldDataTypeEnum.CustomFieldDataType data_type = 8 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value CustomFieldDataTypeEnum.CustomFieldDataType

The dataType to set.

Returns
Type Description
CustomField.Builder

This builder for chaining.

setDataTypeValue(int value)

public CustomField.Builder setDataTypeValue(int value)

Required. The data type of the CustomField.

.google.ads.admanager.v1.CustomFieldDataTypeEnum.CustomFieldDataType data_type = 8 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

The enum numeric value on the wire for dataType to set.

Returns
Type Description
CustomField.Builder

This builder for chaining.

setDescription(String value)

public CustomField.Builder setDescription(String value)

Optional. The description of the CustomField.

This value has a maximum length of 511 characters.

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

Parameter
Name Description
value String

The description to set.

Returns
Type Description
CustomField.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public CustomField.Builder setDescriptionBytes(ByteString value)

Optional. The description of the CustomField.

This value has a maximum length of 511 characters.

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

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
CustomField.Builder

This builder for chaining.

setDisplayName(String value)

public CustomField.Builder setDisplayName(String value)

Required. The display name of the CustomField.

This value has a maximum length of 127 characters.

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

Parameter
Name Description
value String

The displayName to set.

Returns
Type Description
CustomField.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public CustomField.Builder setDisplayNameBytes(ByteString value)

Required. The display name of the CustomField.

This value has a maximum length of 127 characters.

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

Parameter
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
CustomField.Builder

This builder for chaining.

setEntityType(CustomFieldEntityTypeEnum.CustomFieldEntityType value)

public CustomField.Builder setEntityType(CustomFieldEntityTypeEnum.CustomFieldEntityType value)

Required. The type of entity the CustomField can be applied to.

.google.ads.admanager.v1.CustomFieldEntityTypeEnum.CustomFieldEntityType entity_type = 7 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value CustomFieldEntityTypeEnum.CustomFieldEntityType

The entityType to set.

Returns
Type Description
CustomField.Builder

This builder for chaining.

setEntityTypeValue(int value)

public CustomField.Builder setEntityTypeValue(int value)

Required. The type of entity the CustomField can be applied to.

.google.ads.admanager.v1.CustomFieldEntityTypeEnum.CustomFieldEntityType entity_type = 7 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

The enum numeric value on the wire for entityType to set.

Returns
Type Description
CustomField.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public CustomField.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
CustomField.Builder
Overrides

setName(String value)

public CustomField.Builder setName(String value)

Identifier. The resource name of the CustomField. Format: networks/{network_code}/customFields/{custom_field_id}

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

Parameter
Name Description
value String

The name to set.

Returns
Type Description
CustomField.Builder

This builder for chaining.

setNameBytes(ByteString value)

public CustomField.Builder setNameBytes(ByteString value)

Identifier. The resource name of the CustomField. Format: networks/{network_code}/customFields/{custom_field_id}

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

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
CustomField.Builder

This builder for chaining.

setOptions(int index, CustomFieldOption value)

public CustomField.Builder setOptions(int index, CustomFieldOption value)

Optional. The drop-down options for the CustomField.

Only applicable for CustomField with the drop-down data type.

repeated .google.ads.admanager.v1.CustomFieldOption options = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value CustomFieldOption
Returns
Type Description
CustomField.Builder

setOptions(int index, CustomFieldOption.Builder builderForValue)

public CustomField.Builder setOptions(int index, CustomFieldOption.Builder builderForValue)

Optional. The drop-down options for the CustomField.

Only applicable for CustomField with the drop-down data type.

repeated .google.ads.admanager.v1.CustomFieldOption options = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue CustomFieldOption.Builder
Returns
Type Description
CustomField.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public CustomField.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
CustomField.Builder
Overrides

setStatus(CustomFieldStatusEnum.CustomFieldStatus value)

public CustomField.Builder setStatus(CustomFieldStatusEnum.CustomFieldStatus value)

Output only. The status of the CustomField.

.google.ads.admanager.v1.CustomFieldStatusEnum.CustomFieldStatus status = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value CustomFieldStatusEnum.CustomFieldStatus

The status to set.

Returns
Type Description
CustomField.Builder

This builder for chaining.

setStatusValue(int value)

public CustomField.Builder setStatusValue(int value)

Output only. The status of the CustomField.

.google.ads.admanager.v1.CustomFieldStatusEnum.CustomFieldStatus status = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

The enum numeric value on the wire for status to set.

Returns
Type Description
CustomField.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final CustomField.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
CustomField.Builder
Overrides

setVisibility(CustomFieldVisibilityEnum.CustomFieldVisibility value)

public CustomField.Builder setVisibility(CustomFieldVisibilityEnum.CustomFieldVisibility value)

Required. The visibility of the CustomField.

.google.ads.admanager.v1.CustomFieldVisibilityEnum.CustomFieldVisibility visibility = 9 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value CustomFieldVisibilityEnum.CustomFieldVisibility

The visibility to set.

Returns
Type Description
CustomField.Builder

This builder for chaining.

setVisibilityValue(int value)

public CustomField.Builder setVisibilityValue(int value)

Required. The visibility of the CustomField.

.google.ads.admanager.v1.CustomFieldVisibilityEnum.CustomFieldVisibility visibility = 9 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

The enum numeric value on the wire for visibility to set.

Returns
Type Description
CustomField.Builder

This builder for chaining.