# Interface CustomFieldOrBuilder (0.52.0)

0.52.0 (latest) 0.50.0 0.47.0 0.46.0 0.44.0 0.42.0 0.41.0 0.40.0 0.39.0 0.37.0 0.35.0 0.34.0 0.33.0 0.32.0 0.31.0 0.29.0 0.27.0 0.26.0 0.23.0 0.22.0 0.21.0 0.19.0 0.18.0 0.17.0 0.16.0 0.15.0 0.14.0 0.13.0 0.12.0 0.11.0 0.10.0 0.8.0 0.7.0 0.6.0 0.5.0 0.4.0 0.3.0 0.2.0 0.1.0

    public interface CustomFieldOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### getCustomFieldId() (deprecated)

    public abstract long getCustomFieldId()

**Deprecated.** *google.ads.admanager.v1.CustomField.custom_field_id is deprecated. See
google/ads/admanager/v1/custom_field_messages.proto;l=44*

Output only. Deprecated: Unique ID of the CustomField.

`
optional int64 custom_field_id = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The customFieldId. |

### getDataType()

    public abstract CustomFieldDataTypeEnum.CustomFieldDataType getDataType()

Required. The data type of the `CustomField`.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/ad-manager/latest/com.google.ads.admanager.v1.CustomFieldDataTypeEnum.CustomFieldDataType` | The dataType. |

### getDataTypeValue()

    public abstract int getDataTypeValue()

Required. The data type of the `CustomField`.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for dataType. |

### getDescription()

    public abstract String getDescription()

Optional. A description of the custom field. The maximum length is 511
characters.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The description. |

### getDescriptionBytes()

    public abstract ByteString getDescriptionBytes()

Optional. A description of the custom field. The maximum length is 511
characters.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for description. |

### getDisplayName()

    public abstract String getDisplayName()

Required. Name of the CustomField. The max length is 127 characters.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The displayName. |

### getDisplayNameBytes()

    public abstract ByteString getDisplayNameBytes()

Required. Name of the CustomField. The max length is 127 characters.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for displayName. |

### getEntityType()

    public abstract CustomFieldEntityTypeEnum.CustomFieldEntityType getEntityType()

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

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/ad-manager/latest/com.google.ads.admanager.v1.CustomFieldEntityTypeEnum.CustomFieldEntityType` | The entityType. |

### getEntityTypeValue()

    public abstract int getEntityTypeValue()

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

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for entityType. |

### getName()

    public abstract String getName()

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

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The name. |

### getNameBytes()

    public abstract ByteString getNameBytes()

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

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for name. |

### getOptions(int index)

    public abstract 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` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/ad-manager/latest/com.google.ads.admanager.v1.CustomFieldOption` |   |

### getOptionsCount()

    public abstract 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** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getOptionsList()

    public abstract 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** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.cloud.google.com/java/docs/reference/ad-manager/latest/com.google.ads.admanager.v1.CustomFieldOption>` |   |

### getOptionsOrBuilder(int index)

    public abstract 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` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/ad-manager/latest/com.google.ads.admanager.v1.CustomFieldOptionOrBuilder` |   |

### getOptionsOrBuilderList()

    public abstract 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** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<? extends com.google.ads.admanager.v1.CustomFieldOptionOrBuilder>` |   |

### getStatus()

    public abstract CustomFieldStatusEnum.CustomFieldStatus getStatus()

Output only. The status of the `CustomField`.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/ad-manager/latest/com.google.ads.admanager.v1.CustomFieldStatusEnum.CustomFieldStatus` | The status. |

### getStatusValue()

    public abstract int getStatusValue()

Output only. The status of the `CustomField`.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for status. |

### getVisibility()

    public abstract CustomFieldVisibilityEnum.CustomFieldVisibility getVisibility()

Required. The visibility of the `CustomField`.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/ad-manager/latest/com.google.ads.admanager.v1.CustomFieldVisibilityEnum.CustomFieldVisibility` | The visibility. |

### getVisibilityValue()

    public abstract int getVisibilityValue()

Required. The visibility of the `CustomField`.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for visibility. |

### hasCustomFieldId() (deprecated)

    public abstract boolean hasCustomFieldId()

**Deprecated.** *google.ads.admanager.v1.CustomField.custom_field_id is deprecated. See
google/ads/admanager/v1/custom_field_messages.proto;l=44*

Output only. Deprecated: Unique ID of the CustomField.

`
optional int64 custom_field_id = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the customFieldId field is set. |

### hasDataType()

    public abstract boolean hasDataType()

Required. The data type of the `CustomField`.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the dataType field is set. |

### hasDescription()

    public abstract boolean hasDescription()

Optional. A description of the custom field. The maximum length is 511
characters.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the description field is set. |

### hasDisplayName()

    public abstract boolean hasDisplayName()

Required. Name of the CustomField. The max length is 127 characters.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the displayName field is set. |

### hasEntityType()

    public abstract boolean hasEntityType()

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

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the entityType field is set. |

### hasStatus()

    public abstract boolean hasStatus()

Output only. The status of the `CustomField`.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the status field is set. |

### hasVisibility()

    public abstract boolean hasVisibility()

Required. The visibility of the `CustomField`.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the visibility field is set. |