Class CustomField (0.18.0)
Note: Some or all of the information on this page might not apply
to Trusted Cloud. For a list of services that are available in
Trusted Cloud, see Services available for
Trusted Cloud .
Version 0.18.0keyboard_arrow_down
public final class CustomField extends GeneratedMessageV3 implements CustomFieldOrBuilder
An additional, user-created field on an entity.
Protobuf type google.ads.admanager.v1.CustomField
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
CUSTOM_FIELD_ID_FIELD_NUMBER
public static final int CUSTOM_FIELD_ID_FIELD_NUMBER
Field Value
Type
Description
int
DATA_TYPE_FIELD_NUMBER
public static final int DATA_TYPE_FIELD_NUMBER
Field Value
Type
Description
int
DESCRIPTION_FIELD_NUMBER
public static final int DESCRIPTION_FIELD_NUMBER
Field Value
Type
Description
int
DISPLAY_NAME_FIELD_NUMBER
public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
Type
Description
int
ENTITY_TYPE_FIELD_NUMBER
public static final int ENTITY_TYPE_FIELD_NUMBER
Field Value
Type
Description
int
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
Field Value
Type
Description
int
OPTIONS_FIELD_NUMBER
public static final int OPTIONS_FIELD_NUMBER
Field Value
Type
Description
int
STATUS_FIELD_NUMBER
public static final int STATUS_FIELD_NUMBER
Field Value
Type
Description
int
VISIBILITY_FIELD_NUMBER
public static final int VISIBILITY_FIELD_NUMBER
Field Value
Type
Description
int
Static Methods
getDefaultInstance()
public static CustomField getDefaultInstance ()
getDescriptor()
public static final Descriptors . Descriptor getDescriptor ()
newBuilder()
public static CustomField . Builder newBuilder ()
newBuilder(CustomField prototype)
public static CustomField . Builder newBuilder ( CustomField prototype )
public static CustomField parseDelimitedFrom ( InputStream input )
public static CustomField parseDelimitedFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
parseFrom(byte[] data)
public static CustomField parseFrom ( byte [] data )
Parameter
Name
Description
data
byte []
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static CustomField parseFrom ( byte [] data , ExtensionRegistryLite extensionRegistry )
parseFrom(ByteString data)
public static CustomField parseFrom ( ByteString data )
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static CustomField parseFrom ( ByteString data , ExtensionRegistryLite extensionRegistry )
public static CustomField parseFrom ( CodedInputStream input )
public static CustomField parseFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
public static CustomField parseFrom ( InputStream input )
public static CustomField parseFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
parseFrom(ByteBuffer data)
public static CustomField parseFrom ( ByteBuffer data )
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static CustomField parseFrom ( ByteBuffer data , ExtensionRegistryLite extensionRegistry )
parser()
public static Parser<CustomField> parser ()
Methods
equals(Object obj)
public boolean equals ( Object obj )
Parameter
Name
Description
obj
Object
Overrides
getCustomFieldId()
public long getCustomFieldId ()
Output only. Unique ID of the CustomField. This value is readonly and is
assigned by Google.
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];
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 ()
getDescription()
public String getDescription ()
Optional. A description of the custom field. The maximum length is 511
characters.
string description = 4 [(.google.api.field_behavior) = OPTIONAL];
Returns
Type
Description
String
The description.
getDescriptionBytes()
public ByteString getDescriptionBytes ()
Optional. A description of the custom field. The maximum length is 511
characters.
string description = 4 [(.google.api.field_behavior) = OPTIONAL];
Returns
Type
Description
ByteString
The bytes for description.
getDisplayName()
public String getDisplayName ()
Required. Name of the CustomField. The max length is 127 characters.
string display_name = 3 [(.google.api.field_behavior) = REQUIRED];
Returns
Type
Description
String
The displayName.
getDisplayNameBytes()
public ByteString getDisplayNameBytes ()
Required. Name of the CustomField. The max length is 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];
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()
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
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];
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
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 >
getParserForType()
public Parser<CustomField> getParserForType ()
Overrides
getSerializedSize()
public int getSerializedSize ()
Returns
Type
Description
int
Overrides
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];
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];
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.
hashCode()
Returns
Type
Description
int
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Overrides
isInitialized()
public final boolean isInitialized ()
Overrides
newBuilderForType()
public CustomField . Builder newBuilderForType ()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected CustomField . Builder newBuilderForType ( GeneratedMessageV3 . BuilderParent parent )
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance ( GeneratedMessageV3 . UnusedPrivateParameter unused )
Returns
Type
Description
Object
Overrides
toBuilder()
public CustomField . Builder toBuilder ()
writeTo(CodedOutputStream output)
public void writeTo ( CodedOutputStream output )
Overrides
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-15 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-15 UTC."],[[["This page details the `CustomField` class within version 0.18.0 of the Google Ad Manager Java API, which is used to define additional, user-created fields for entities."],["`CustomField` extends `GeneratedMessageV3` and implements `CustomFieldOrBuilder`, inheriting a wide range of methods from these parent classes for data handling and manipulation."],["The `CustomField` class includes static methods for creating instances, parsing data from various sources, and accessing the default instance, alongside methods for managing custom field attributes like name, data type, and visibility."],["The page provides a comprehensive overview of the methods and fields available in the `CustomField` class, including those inherited from `AbstractMessage`, `AbstractMessageLite`, and `GeneratedMessageV3`."],["There are multiple versions of the `CustomField` class within the Google Ad Manager Java API, with version 0.19.0 being the latest, and this page details version 0.18.0, with access to documentation for version 0.1.0 all the way to 0.19.0."]]],[]]