Package com.google.cloud.apihub.v1
Class Attribute
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.apihub.v1.Attribute
- All Implemented Interfaces:
AttributeOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
@Generated
public final class Attribute
extends com.google.protobuf.GeneratedMessage
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- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThe value that can be assigned to the attribute when the data type is enum.static interfacestatic final classAn attribute in the API Hub.static enumEnumeration of attribute's data type.static enumEnumeration of attribute definition types.static enumEnumeration for the scope of the attribute representing the resource in the API Hub to which the attribute can be linked.Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message, T extends Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage
com.google.protobuf.AbstractMessage.BuilderParentNested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleangetAllowedValues(int index) Optional.intOptional.Optional.getAllowedValuesOrBuilder(int index) Optional.List<? extends Attribute.AllowedValueOrBuilder>Optional.intOptional.com.google.protobuf.TimestampOutput only.com.google.protobuf.TimestampOrBuilderOutput only.Required.intRequired.static AttributeOutput only.intOutput only.Optional.com.google.protobuf.ByteStringOptional.static final com.google.protobuf.Descriptors.DescriptorRequired.com.google.protobuf.ByteStringRequired.booleanOutput only.getName()Identifier.com.google.protobuf.ByteStringIdentifier.com.google.protobuf.Parser<Attribute>getScope()Required.intRequired.intcom.google.protobuf.TimestampOutput only.com.google.protobuf.TimestampOrBuilderOutput only.booleanOutput only.inthashCode()booleanOutput only.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanstatic Attribute.Builderstatic Attribute.BuildernewBuilder(Attribute prototype) protected Attribute.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static AttributeparseDelimitedFrom(InputStream input) static AttributeparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static AttributeparseFrom(byte[] data) static AttributeparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static AttributeparseFrom(com.google.protobuf.ByteString data) static AttributeparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static AttributeparseFrom(com.google.protobuf.CodedInputStream input) static AttributeparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static AttributeparseFrom(InputStream input) static AttributeparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static AttributeparseFrom(ByteBuffer data) static AttributeparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<Attribute>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessage
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER- See Also:
-
DISPLAY_NAME_FIELD_NUMBER
public static final int DISPLAY_NAME_FIELD_NUMBER- See Also:
-
DESCRIPTION_FIELD_NUMBER
public static final int DESCRIPTION_FIELD_NUMBER- See Also:
-
DEFINITION_TYPE_FIELD_NUMBER
public static final int DEFINITION_TYPE_FIELD_NUMBER- See Also:
-
SCOPE_FIELD_NUMBER
public static final int SCOPE_FIELD_NUMBER- See Also:
-
DATA_TYPE_FIELD_NUMBER
public static final int DATA_TYPE_FIELD_NUMBER- See Also:
-
ALLOWED_VALUES_FIELD_NUMBER
public static final int ALLOWED_VALUES_FIELD_NUMBER- See Also:
-
CARDINALITY_FIELD_NUMBER
public static final int CARDINALITY_FIELD_NUMBER- See Also:
-
MANDATORY_FIELD_NUMBER
public static final int MANDATORY_FIELD_NUMBER- See Also:
-
CREATE_TIME_FIELD_NUMBER
public static final int CREATE_TIME_FIELD_NUMBER- See Also:
-
UPDATE_TIME_FIELD_NUMBER
public static final int UPDATE_TIME_FIELD_NUMBER- See Also:
-
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage
-
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];- Specified by:
getNamein interfaceAttributeOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.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];- Specified by:
getNameBytesin interfaceAttributeOrBuilder- Returns:
- The bytes for name.
-
getDisplayName
Required. The display name of the attribute.
string display_name = 2 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getDisplayNamein interfaceAttributeOrBuilder- Returns:
- The displayName.
-
getDisplayNameBytes
public com.google.protobuf.ByteString getDisplayNameBytes()Required. The display name of the attribute.
string display_name = 2 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getDisplayNameBytesin interfaceAttributeOrBuilder- Returns:
- The bytes for displayName.
-
getDescription
Optional. The description of the attribute.
string description = 3 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getDescriptionin interfaceAttributeOrBuilder- Returns:
- The description.
-
getDescriptionBytes
public com.google.protobuf.ByteString getDescriptionBytes()Optional. The description of the attribute.
string description = 3 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getDescriptionBytesin interfaceAttributeOrBuilder- Returns:
- The bytes for description.
-
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];- Specified by:
getDefinitionTypeValuein interfaceAttributeOrBuilder- Returns:
- The enum numeric value on the wire for 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];- Specified by:
getDefinitionTypein interfaceAttributeOrBuilder- Returns:
- The definitionType.
-
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];- Specified by:
getScopeValuein interfaceAttributeOrBuilder- Returns:
- The enum numeric value on the wire for 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];- Specified by:
getScopein interfaceAttributeOrBuilder- Returns:
- The scope.
-
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];- Specified by:
getDataTypeValuein interfaceAttributeOrBuilder- Returns:
- The enum numeric value on the wire for 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];- Specified by:
getDataTypein interfaceAttributeOrBuilder- Returns:
- The dataType.
-
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];- Specified by:
getAllowedValuesListin interfaceAttributeOrBuilder
-
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];- Specified by:
getAllowedValuesOrBuilderListin interfaceAttributeOrBuilder
-
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];- Specified by:
getAllowedValuesCountin interfaceAttributeOrBuilder
-
getAllowedValues
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];- Specified by:
getAllowedValuesin interfaceAttributeOrBuilder
-
getAllowedValuesOrBuilder
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];- Specified by:
getAllowedValuesOrBuilderin interfaceAttributeOrBuilder
-
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];- Specified by:
getCardinalityin interfaceAttributeOrBuilder- Returns:
- The cardinality.
-
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];- Specified by:
getMandatoryin interfaceAttributeOrBuilder- Returns:
- The mandatory.
-
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];- Specified by:
hasCreateTimein interfaceAttributeOrBuilder- Returns:
- Whether the createTime field is set.
-
getCreateTime
public com.google.protobuf.Timestamp getCreateTime()Output only. The time at which the attribute was created.
.google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getCreateTimein interfaceAttributeOrBuilder- Returns:
- The createTime.
-
getCreateTimeOrBuilder
public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()Output only. The time at which the attribute was created.
.google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getCreateTimeOrBuilderin interfaceAttributeOrBuilder
-
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];- Specified by:
hasUpdateTimein interfaceAttributeOrBuilder- Returns:
- Whether the updateTime field is set.
-
getUpdateTime
public com.google.protobuf.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];- Specified by:
getUpdateTimein interfaceAttributeOrBuilder- Returns:
- The updateTime.
-
getUpdateTimeOrBuilder
public com.google.protobuf.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];- Specified by:
getUpdateTimeOrBuilderin interfaceAttributeOrBuilder
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static Attribute parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Attribute parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Attribute parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Attribute parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Attribute parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Attribute parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Attribute parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static Attribute parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Attribute parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected Attribute.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-