Package com.google.cloud.apihub.v1
Class Definition.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Definition.Builder>
com.google.cloud.apihub.v1.Definition.Builder
- All Implemented Interfaces:
DefinitionOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- Definition
public static final class Definition.Builder
extends com.google.protobuf.GeneratedMessage.Builder<Definition.Builder>
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-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()Output only.Identifier.Output only.Output only.Output only.Output only.booleancontainsAttributes(String key) Optional.Deprecated.intOptional.Optional.getAttributesOrDefault(String key, AttributeValues defaultValue) Optional.Optional.com.google.protobuf.TimestampOutput only.com.google.protobuf.Timestamp.BuilderOutput only.com.google.protobuf.TimestampOrBuilderOutput only.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorDeprecated.getName()Identifier.com.google.protobuf.ByteStringIdentifier.Output only.Output only.Output only.getSpec()Output only.com.google.protobuf.ByteStringOutput only.getType()Output only.intOutput only.com.google.protobuf.TimestampOutput only.com.google.protobuf.Timestamp.BuilderOutput only.com.google.protobuf.TimestampOrBuilderOutput only.booleanOutput only.booleanOutput only.booleanOutput only.protected com.google.protobuf.GeneratedMessage.FieldAccessorTableprotected com.google.protobuf.MapFieldReflectionAccessorinternalGetMapFieldReflection(int number) protected com.google.protobuf.MapFieldReflectionAccessorinternalGetMutableMapFieldReflection(int number) final booleanmergeCreateTime(com.google.protobuf.Timestamp value) Output only.mergeFrom(Definition other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeSchema(Schema value) Output only.mergeUpdateTime(com.google.protobuf.Timestamp value) Output only.putAllAttributes(Map<String, AttributeValues> values) Optional.putAttributes(String key, AttributeValues value) Optional.Optional.removeAttributes(String key) Optional.setCreateTime(com.google.protobuf.Timestamp value) Output only.setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) Output only.Identifier.setNameBytes(com.google.protobuf.ByteString value) Identifier.Output only.setSchema(Schema.Builder builderForValue) Output only.Output only.setSpecBytes(com.google.protobuf.ByteString value) Output only.setType(Definition.Type value) Output only.setTypeValue(int value) Output only.setUpdateTime(com.google.protobuf.Timestamp value) Output only.setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) Output only.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
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.Builder<Definition.Builder>
-
internalGetMutableMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number) - Overrides:
internalGetMutableMapFieldReflectionin classcom.google.protobuf.GeneratedMessage.Builder<Definition.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<Definition.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<Definition.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<Definition.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Definition.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<Definition.Builder>
-
mergeFrom
public Definition.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Definition.Builder>- Throws:
IOException
-
getValueCase
- Specified by:
getValueCasein interfaceDefinitionOrBuilder
-
clearValue
-
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.
-
setSchema
Output only. The value of a schema definition.
.google.cloud.apihub.v1.Schema schema = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
setSchema
Output only. The value of a schema definition.
.google.cloud.apihub.v1.Schema schema = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
mergeSchema
Output only. The value of a schema definition.
.google.cloud.apihub.v1.Schema schema = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
clearSchema
Output only. The value of a schema definition.
.google.cloud.apihub.v1.Schema schema = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
getSchemaBuilder
Output only. The value of a schema definition.
.google.cloud.apihub.v1.Schema schema = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
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.
-
setName
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];- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
clearName
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];- Returns:
- This builder for chaining.
-
setNameBytes
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];- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
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.
-
setSpec
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) = { ... }- Parameters:
value- The spec to set.- Returns:
- This builder for chaining.
-
clearSpec
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) = { ... }- Returns:
- This builder for chaining.
-
setSpecBytes
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) = { ... }- Parameters:
value- The bytes for spec to set.- Returns:
- This builder for chaining.
-
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.
-
setTypeValue
Output only. The type of the definition.
.google.cloud.apihub.v1.Definition.Type type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The enum numeric value on the wire for type to set.- Returns:
- This builder for chaining.
-
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.
-
setType
Output only. The type of the definition.
.google.cloud.apihub.v1.Definition.Type type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The type to set.- Returns:
- This builder for chaining.
-
clearType
Output only. The type of the definition.
.google.cloud.apihub.v1.Definition.Type type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];- Returns:
- This builder for chaining.
-
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.
-
setCreateTime
Output only. The time at which the definition was created.
.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
setCreateTime
Output only. The time at which the definition was created.
.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
mergeCreateTime
Output only. The time at which the definition was created.
.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
clearCreateTime
Output only. The time at which the definition was created.
.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
getCreateTimeBuilder
public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder()Output only. The time at which the definition was created.
.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
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.
-
setUpdateTime
Output only. The time at which the definition was last updated.
.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
setUpdateTime
Output only. The time at which the definition was last updated.
.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
mergeUpdateTime
Output only. The time at which the definition was last updated.
.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
clearUpdateTime
Output only. The time at which the definition was last updated.
.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
getUpdateTimeBuilder
public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder()Output only. The time at which the definition was last updated.
.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
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
-
clearAttributes
-
removeAttributes
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]; -
getMutableAttributes
Deprecated.Use alternate mutation accessors instead. -
putAttributes
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]; -
putAllAttributes
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]; -
putAttributesBuilderIfAbsent
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];
-