Class Definition

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.apihub.v1.Definition
All Implemented Interfaces:
DefinitionOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class Definition extends com.google.protobuf.GeneratedMessage implements DefinitionOrBuilder
 Represents a definition for example schema, request, response definitions
 contained in an API version.
 A definition is added/updated/deleted in an API version when a new spec is
 added or an existing spec is updated/deleted in a version. Currently,
 definition will be created only corresponding to OpenAPI spec as parsing is
 supported for OpenAPI spec. Also, within OpenAPI spec, only `schema` object
 is supported.
 
Protobuf type google.cloud.apihub.v1.Definition
See Also:
  • Field Details

  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • getValueCase

      public Definition.ValueCase getValueCase()
      Specified by:
      getValueCase in interface DefinitionOrBuilder
    • hasSchema

      public boolean hasSchema()
       Output only. The value of a schema definition.
       
      .google.cloud.apihub.v1.Schema schema = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasSchema in interface DefinitionOrBuilder
      Returns:
      Whether the schema field is set.
    • getSchema

      public Schema getSchema()
       Output only. The value of a schema definition.
       
      .google.cloud.apihub.v1.Schema schema = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getSchema in interface DefinitionOrBuilder
      Returns:
      The schema.
    • getSchemaOrBuilder

      public SchemaOrBuilder getSchemaOrBuilder()
       Output only. The value of a schema definition.
       
      .google.cloud.apihub.v1.Schema schema = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getSchemaOrBuilder in interface DefinitionOrBuilder
    • getName

      public String getName()
       Identifier. The name of the definition.
      
       Format:
       `projects/{project}/locations/{location}/apis/{api}/versions/{version}/definitions/{definition}`
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getName in interface DefinitionOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Identifier. The name of the definition.
      
       Format:
       `projects/{project}/locations/{location}/apis/{api}/versions/{version}/definitions/{definition}`
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getNameBytes in interface DefinitionOrBuilder
      Returns:
      The bytes for name.
    • getSpec

      public String getSpec()
       Output only. The name of the spec from where the definition was parsed.
       Format is
       `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}`
       
      string spec = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
      Specified by:
      getSpec in interface DefinitionOrBuilder
      Returns:
      The spec.
    • getSpecBytes

      public com.google.protobuf.ByteString getSpecBytes()
       Output only. The name of the spec from where the definition was parsed.
       Format is
       `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}`
       
      string spec = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
      Specified by:
      getSpecBytes in interface DefinitionOrBuilder
      Returns:
      The bytes for spec.
    • getTypeValue

      public int getTypeValue()
       Output only. The type of the definition.
       
      .google.cloud.apihub.v1.Definition.Type type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getTypeValue in interface DefinitionOrBuilder
      Returns:
      The enum numeric value on the wire for type.
    • getType

      public Definition.Type getType()
       Output only. The type of the definition.
       
      .google.cloud.apihub.v1.Definition.Type type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getType in interface DefinitionOrBuilder
      Returns:
      The type.
    • hasCreateTime

      public boolean hasCreateTime()
       Output only. The time at which the definition was created.
       
      .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasCreateTime in interface DefinitionOrBuilder
      Returns:
      Whether the createTime field is set.
    • getCreateTime

      public com.google.protobuf.Timestamp getCreateTime()
       Output only. The time at which the definition was created.
       
      .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTime in interface DefinitionOrBuilder
      Returns:
      The createTime.
    • getCreateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
       Output only. The time at which the definition was created.
       
      .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTimeOrBuilder in interface DefinitionOrBuilder
    • hasUpdateTime

      public boolean hasUpdateTime()
       Output only. The time at which the definition was last updated.
       
      .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasUpdateTime in interface DefinitionOrBuilder
      Returns:
      Whether the updateTime field is set.
    • getUpdateTime

      public com.google.protobuf.Timestamp getUpdateTime()
       Output only. The time at which the definition was last updated.
       
      .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTime in interface DefinitionOrBuilder
      Returns:
      The updateTime.
    • getUpdateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()
       Output only. The time at which the definition was last updated.
       
      .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTimeOrBuilder in interface DefinitionOrBuilder
    • getAttributesCount

      public int getAttributesCount()
      Description copied from interface: DefinitionOrBuilder
       Optional. The list of user defined attributes associated with the
       definition resource. The key is the attribute name. It will be of the
       format: `projects/{project}/locations/{location}/attributes/{attribute}`.
       The value is the attribute values associated with the resource.
       
      map<string, .google.cloud.apihub.v1.AttributeValues> attributes = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAttributesCount in interface DefinitionOrBuilder
    • containsAttributes

      public boolean containsAttributes(String key)
       Optional. The list of user defined attributes associated with the
       definition resource. The key is the attribute name. It will be of the
       format: `projects/{project}/locations/{location}/attributes/{attribute}`.
       The value is the attribute values associated with the resource.
       
      map<string, .google.cloud.apihub.v1.AttributeValues> attributes = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      containsAttributes in interface DefinitionOrBuilder
    • getAttributes

      @Deprecated public Map<String,AttributeValues> getAttributes()
      Deprecated.
      Use getAttributesMap() instead.
      Specified by:
      getAttributes in interface DefinitionOrBuilder
    • getAttributesMap

      public Map<String,AttributeValues> getAttributesMap()
       Optional. The list of user defined attributes associated with the
       definition resource. The key is the attribute name. It will be of the
       format: `projects/{project}/locations/{location}/attributes/{attribute}`.
       The value is the attribute values associated with the resource.
       
      map<string, .google.cloud.apihub.v1.AttributeValues> attributes = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAttributesMap in interface DefinitionOrBuilder
    • getAttributesOrDefault

      public AttributeValues getAttributesOrDefault(String key, AttributeValues defaultValue)
       Optional. The list of user defined attributes associated with the
       definition resource. The key is the attribute name. It will be of the
       format: `projects/{project}/locations/{location}/attributes/{attribute}`.
       The value is the attribute values associated with the resource.
       
      map<string, .google.cloud.apihub.v1.AttributeValues> attributes = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAttributesOrDefault in interface DefinitionOrBuilder
    • getAttributesOrThrow

      public AttributeValues getAttributesOrThrow(String key)
       Optional. The list of user defined attributes associated with the
       definition resource. The key is the attribute name. It will be of the
       format: `projects/{project}/locations/{location}/attributes/{attribute}`.
       The value is the attribute values associated with the resource.
       
      map<string, .google.cloud.apihub.v1.AttributeValues> attributes = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAttributesOrThrow in interface DefinitionOrBuilder
    • 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 Definition parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Definition parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Definition parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Definition parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Definition parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Definition parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

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

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

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

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

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

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

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

      public static Definition.Builder newBuilder()
    • newBuilder

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

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

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

      public static Definition getDefaultInstance()
    • parser

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

      public com.google.protobuf.Parser<Definition> 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 Definition getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder