public final class Attribute extends GeneratedMessageV3 implements AttributeOrBuilder
An attribute in the API Hub.
An attribute is a name value pair which can be attached to different
resources in the API hub based on the scope of the attribute. Attributes can
either be pre-defined by the API Hub or created by users.
Protobuf type google.cloud.apihub.v1.Attribute
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
ALLOWED_VALUES_FIELD_NUMBER
public static final int ALLOWED_VALUES_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
CARDINALITY_FIELD_NUMBER
public static final int CARDINALITY_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
CREATE_TIME_FIELD_NUMBER
public static final int CREATE_TIME_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
DATA_TYPE_FIELD_NUMBER
public static final int DATA_TYPE_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
DEFINITION_TYPE_FIELD_NUMBER
public static final int DEFINITION_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 |
|
MANDATORY_FIELD_NUMBER
public static final int MANDATORY_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
SCOPE_FIELD_NUMBER
public static final int SCOPE_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
UPDATE_TIME_FIELD_NUMBER
public static final int UPDATE_TIME_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
Static Methods
getDefaultInstance()
public static Attribute getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static Attribute.Builder newBuilder()
newBuilder(Attribute prototype)
public static Attribute.Builder newBuilder(Attribute prototype)
Parameter |
Name |
Description |
prototype |
Attribute
|
public static Attribute parseDelimitedFrom(InputStream input)
public static Attribute parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static Attribute parseFrom(byte[] data)
Parameter |
Name |
Description |
data |
byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Attribute parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static Attribute parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Attribute parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Attribute parseFrom(CodedInputStream input)
public static Attribute parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static Attribute parseFrom(InputStream input)
public static Attribute parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static Attribute parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Attribute parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<Attribute> parser()
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter |
Name |
Description |
obj |
Object
|
Overrides
getAllowedValues(int index)
public Attribute.AllowedValue getAllowedValues(int index)
Optional. The list of allowed values when the attribute value is of type
enum. This is required when the data_type of the attribute is ENUM. The
maximum number of allowed values of an attribute will be 1000.
repeated .google.cloud.apihub.v1.Attribute.AllowedValue allowed_values = 7 [(.google.api.field_behavior) = OPTIONAL];
Parameter |
Name |
Description |
index |
int
|
getAllowedValuesCount()
public int getAllowedValuesCount()
Optional. The list of allowed values when the attribute value is of type
enum. This is required when the data_type of the attribute is ENUM. The
maximum number of allowed values of an attribute will be 1000.
repeated .google.cloud.apihub.v1.Attribute.AllowedValue allowed_values = 7 [(.google.api.field_behavior) = OPTIONAL];
Returns |
Type |
Description |
int |
|
getAllowedValuesList()
public List<Attribute.AllowedValue> getAllowedValuesList()
Optional. The list of allowed values when the attribute value is of type
enum. This is required when the data_type of the attribute is ENUM. The
maximum number of allowed values of an attribute will be 1000.
repeated .google.cloud.apihub.v1.Attribute.AllowedValue allowed_values = 7 [(.google.api.field_behavior) = OPTIONAL];
getAllowedValuesOrBuilder(int index)
public Attribute.AllowedValueOrBuilder getAllowedValuesOrBuilder(int index)
Optional. The list of allowed values when the attribute value is of type
enum. This is required when the data_type of the attribute is ENUM. The
maximum number of allowed values of an attribute will be 1000.
repeated .google.cloud.apihub.v1.Attribute.AllowedValue allowed_values = 7 [(.google.api.field_behavior) = OPTIONAL];
Parameter |
Name |
Description |
index |
int
|
getAllowedValuesOrBuilderList()
public List<? extends Attribute.AllowedValueOrBuilder> getAllowedValuesOrBuilderList()
Optional. The list of allowed values when the attribute value is of type
enum. This is required when the data_type of the attribute is ENUM. The
maximum number of allowed values of an attribute will be 1000.
repeated .google.cloud.apihub.v1.Attribute.AllowedValue allowed_values = 7 [(.google.api.field_behavior) = OPTIONAL];
Returns |
Type |
Description |
List<? extends com.google.cloud.apihub.v1.Attribute.AllowedValueOrBuilder> |
|
getCardinality()
public int getCardinality()
Optional. The maximum number of values that the attribute can have when
associated with an API Hub resource. Cardinality 1 would represent a
single-valued attribute. It must not be less than 1 or greater than 20. If
not specified, the cardinality would be set to 1 by default and represent a
single-valued attribute.
int32 cardinality = 8 [(.google.api.field_behavior) = OPTIONAL];
Returns |
Type |
Description |
int |
The cardinality.
|
getCreateTime()
public Timestamp getCreateTime()
Output only. The time at which the attribute was created.
.google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
Type |
Description |
Timestamp |
The createTime.
|
getCreateTimeOrBuilder()
public TimestampOrBuilder getCreateTimeOrBuilder()
Output only. The time at which the attribute was created.
.google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
getDataType()
public Attribute.DataType getDataType()
Required. The type of the data of the attribute.
.google.cloud.apihub.v1.Attribute.DataType data_type = 6 [(.google.api.field_behavior) = REQUIRED];
getDataTypeValue()
public int getDataTypeValue()
Required. The type of the data of the attribute.
.google.cloud.apihub.v1.Attribute.DataType data_type = 6 [(.google.api.field_behavior) = REQUIRED];
Returns |
Type |
Description |
int |
The enum numeric value on the wire for dataType.
|
getDefaultInstanceForType()
public Attribute getDefaultInstanceForType()
getDefinitionType()
public Attribute.DefinitionType getDefinitionType()
Output only. The definition type of the attribute.
.google.cloud.apihub.v1.Attribute.DefinitionType definition_type = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
getDefinitionTypeValue()
public int getDefinitionTypeValue()
Output only. The definition type of the attribute.
.google.cloud.apihub.v1.Attribute.DefinitionType definition_type = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
Type |
Description |
int |
The enum numeric value on the wire for definitionType.
|
getDescription()
public String getDescription()
Optional. The description of the attribute.
string description = 3 [(.google.api.field_behavior) = OPTIONAL];
Returns |
Type |
Description |
String |
The description.
|
getDescriptionBytes()
public ByteString getDescriptionBytes()
Optional. The description of the attribute.
string description = 3 [(.google.api.field_behavior) = OPTIONAL];
Returns |
Type |
Description |
ByteString |
The bytes for description.
|
getDisplayName()
public String getDisplayName()
Required. The display name of the attribute.
string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
Returns |
Type |
Description |
String |
The displayName.
|
getDisplayNameBytes()
public ByteString getDisplayNameBytes()
Required. The display name of the attribute.
string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
Returns |
Type |
Description |
ByteString |
The bytes for displayName.
|
getMandatory()
public boolean getMandatory()
Output only. When mandatory is true, the attribute is mandatory for the
resource specified in the scope. Only System defined attributes can be
mandatory.
bool mandatory = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
Type |
Description |
boolean |
The mandatory.
|
getName()
Identifier. The name of the attribute in the API Hub.
Format:
projects/{project}/locations/{location}/attributes/{attribute}
string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
Returns |
Type |
Description |
String |
The name.
|
getNameBytes()
public ByteString getNameBytes()
Identifier. The name of the attribute in the API Hub.
Format:
projects/{project}/locations/{location}/attributes/{attribute}
string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
Returns |
Type |
Description |
ByteString |
The bytes for name.
|
getParserForType()
public Parser<Attribute> getParserForType()
Overrides
getScope()
public Attribute.Scope getScope()
Required. The scope of the attribute. It represents the resource in the API
Hub to which the attribute can be linked.
.google.cloud.apihub.v1.Attribute.Scope scope = 5 [(.google.api.field_behavior) = REQUIRED];
getScopeValue()
public int getScopeValue()
Required. The scope of the attribute. It represents the resource in the API
Hub to which the attribute can be linked.
.google.cloud.apihub.v1.Attribute.Scope scope = 5 [(.google.api.field_behavior) = REQUIRED];
Returns |
Type |
Description |
int |
The enum numeric value on the wire for scope.
|
getSerializedSize()
public int getSerializedSize()
Returns |
Type |
Description |
int |
|
Overrides
getUpdateTime()
public Timestamp getUpdateTime()
Output only. The time at which the attribute was last updated.
.google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
Type |
Description |
Timestamp |
The updateTime.
|
getUpdateTimeOrBuilder()
public TimestampOrBuilder getUpdateTimeOrBuilder()
Output only. The time at which the attribute was last updated.
.google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
hasCreateTime()
public boolean hasCreateTime()
Output only. The time at which the attribute was created.
.google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
Type |
Description |
boolean |
Whether the createTime field is set.
|
hasUpdateTime()
public boolean hasUpdateTime()
Output only. The time at which the attribute was last updated.
.google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
Type |
Description |
boolean |
Whether the updateTime field is set.
|
hashCode()
Returns |
Type |
Description |
int |
|
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public Attribute.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Attribute.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Returns |
Type |
Description |
Object |
|
Overrides
toBuilder()
public Attribute.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides