Package com.google.cloud.apihub.v1
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classRepresents a definition for example schema, request, response definitions contained in an API version.static enumEnumeration of definition types.static enumNested 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 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 TypeMethodDescriptionbooleancontainsAttributes(String key) Optional.booleanDeprecated.intOptional.Optional.getAttributesOrDefault(String key, AttributeValues defaultValue) Optional.Optional.com.google.protobuf.TimestampOutput only.com.google.protobuf.TimestampOrBuilderOutput only.static Definitionstatic final com.google.protobuf.Descriptors.DescriptorgetName()Identifier.com.google.protobuf.ByteStringIdentifier.com.google.protobuf.Parser<Definition>Output only.Output only.intgetSpec()Output only.com.google.protobuf.ByteStringOutput only.getType()Output only.intOutput only.com.google.protobuf.TimestampOutput only.com.google.protobuf.TimestampOrBuilderOutput only.booleanOutput only.inthashCode()booleanOutput only.booleanOutput only.protected com.google.protobuf.GeneratedMessage.FieldAccessorTableprotected com.google.protobuf.MapFieldReflectionAccessorinternalGetMapFieldReflection(int number) final booleanstatic Definition.Builderstatic Definition.BuildernewBuilder(Definition prototype) protected Definition.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static DefinitionparseDelimitedFrom(InputStream input) static DefinitionparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static DefinitionparseFrom(byte[] data) static DefinitionparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static DefinitionparseFrom(com.google.protobuf.ByteString data) static DefinitionparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static DefinitionparseFrom(com.google.protobuf.CodedInputStream input) static DefinitionparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static DefinitionparseFrom(InputStream input) static DefinitionparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static DefinitionparseFrom(ByteBuffer data) static DefinitionparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<Definition>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, 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
-
SCHEMA_FIELD_NUMBER
public static final int SCHEMA_FIELD_NUMBER- See Also:
-
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER- See Also:
-
SPEC_FIELD_NUMBER
public static final int SPEC_FIELD_NUMBER- See Also:
-
TYPE_FIELD_NUMBER
public static final int TYPE_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:
-
ATTRIBUTES_FIELD_NUMBER
public static final int ATTRIBUTES_FIELD_NUMBER- See Also:
-
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number) - Overrides:
internalGetMapFieldReflectionin classcom.google.protobuf.GeneratedMessage
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage
-
getValueCase
- Specified by:
getValueCasein interfaceDefinitionOrBuilder
-
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:
hasSchemain interfaceDefinitionOrBuilder- Returns:
- Whether the schema field is set.
-
getSchema
Output only. The value of a schema definition.
.google.cloud.apihub.v1.Schema schema = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getSchemain interfaceDefinitionOrBuilder- Returns:
- The schema.
-
getSchemaOrBuilder
Output only. The value of a schema definition.
.google.cloud.apihub.v1.Schema schema = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getSchemaOrBuilderin interfaceDefinitionOrBuilder
-
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:
getNamein interfaceDefinitionOrBuilder- 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:
getNameBytesin interfaceDefinitionOrBuilder- Returns:
- The bytes for name.
-
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:
getSpecin interfaceDefinitionOrBuilder- 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:
getSpecBytesin interfaceDefinitionOrBuilder- 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:
getTypeValuein interfaceDefinitionOrBuilder- Returns:
- The enum numeric value on the wire for 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:
getTypein interfaceDefinitionOrBuilder- 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:
hasCreateTimein interfaceDefinitionOrBuilder- 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:
getCreateTimein interfaceDefinitionOrBuilder- 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:
getCreateTimeOrBuilderin interfaceDefinitionOrBuilder
-
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:
hasUpdateTimein interfaceDefinitionOrBuilder- 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:
getUpdateTimein interfaceDefinitionOrBuilder- 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:
getUpdateTimeOrBuilderin interfaceDefinitionOrBuilder
-
getAttributesCount
public int getAttributesCount()Description copied from interface:DefinitionOrBuilderOptional. 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:
getAttributesCountin interfaceDefinitionOrBuilder
-
containsAttributes
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:
containsAttributesin interfaceDefinitionOrBuilder
-
getAttributes
Deprecated.UsegetAttributesMap()instead.- Specified by:
getAttributesin interfaceDefinitionOrBuilder
-
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:
getAttributesMapin interfaceDefinitionOrBuilder
-
getAttributesOrDefault
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:
getAttributesOrDefaultin interfaceDefinitionOrBuilder
-
getAttributesOrThrow
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:
getAttributesOrThrowin interfaceDefinitionOrBuilder
-
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 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
- Throws:
IOException
-
parseFrom
public static Definition parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static Definition parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Definition 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 Definition.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
-