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:
  • 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:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • getName

      public String 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:
      getName in interface AttributeOrBuilder
      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:
      getNameBytes in interface AttributeOrBuilder
      Returns:
      The bytes for name.
    • getDisplayName

      public String getDisplayName()
       Required. The display name of the attribute.
       
      string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getDisplayName in interface AttributeOrBuilder
      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:
      getDisplayNameBytes in interface AttributeOrBuilder
      Returns:
      The bytes for displayName.
    • getDescription

      public String getDescription()
       Optional. The description of the attribute.
       
      string description = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDescription in interface AttributeOrBuilder
      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:
      getDescriptionBytes in interface AttributeOrBuilder
      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:
      getDefinitionTypeValue in interface AttributeOrBuilder
      Returns:
      The enum numeric value on the wire for definitionType.
    • 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];
      Specified by:
      getDefinitionType in interface AttributeOrBuilder
      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:
      getScopeValue in interface AttributeOrBuilder
      Returns:
      The enum numeric value on the wire for scope.
    • 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];
      Specified by:
      getScope in interface AttributeOrBuilder
      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:
      getDataTypeValue in interface AttributeOrBuilder
      Returns:
      The enum numeric value on the wire for dataType.
    • 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];
      Specified by:
      getDataType in interface AttributeOrBuilder
      Returns:
      The dataType.
    • 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];
      Specified by:
      getAllowedValuesList in interface AttributeOrBuilder
    • 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];
      Specified by:
      getAllowedValuesOrBuilderList in interface AttributeOrBuilder
    • 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:
      getAllowedValuesCount in interface AttributeOrBuilder
    • getAllowedValues

      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];
      Specified by:
      getAllowedValues in interface AttributeOrBuilder
    • getAllowedValuesOrBuilder

      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];
      Specified by:
      getAllowedValuesOrBuilder in interface AttributeOrBuilder
    • 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:
      getCardinality in interface AttributeOrBuilder
      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:
      getMandatory in interface AttributeOrBuilder
      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:
      hasCreateTime in interface AttributeOrBuilder
      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:
      getCreateTime in interface AttributeOrBuilder
      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:
      getCreateTimeOrBuilder in interface AttributeOrBuilder
    • 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:
      hasUpdateTime in interface AttributeOrBuilder
      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:
      getUpdateTime in interface AttributeOrBuilder
      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:
      getUpdateTimeOrBuilder in interface AttributeOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.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

      public static Attribute parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Attribute parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Attribute parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Attribute parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Attribute parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Attribute parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public Attribute.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static Attribute.Builder newBuilder()
    • newBuilder

      public static Attribute.Builder newBuilder(Attribute prototype)
    • toBuilder

      public Attribute.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected Attribute.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static Attribute getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<Attribute> parser()
    • getParserForType

      public com.google.protobuf.Parser<Attribute> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public Attribute getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder