Class Spec.Builder (0.5.0)

public static final class Spec.Builder extends GeneratedMessageV3.Builder<Spec.Builder> implements SpecOrBuilder

Represents a spec associated with an API version in the API Hub. Note that specs of various types can be uploaded, however parsing of details is supported for OpenAPI spec currently.

Protobuf type google.cloud.apihub.v1.Spec

Implements

SpecOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Spec.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Spec.Builder
Overrides

build()

public Spec build()
Returns
Type Description
Spec

buildPartial()

public Spec buildPartial()
Returns
Type Description
Spec

clear()

public Spec.Builder clear()
Returns
Type Description
Spec.Builder
Overrides

clearAttributes()

public Spec.Builder clearAttributes()
Returns
Type Description
Spec.Builder

clearContents()

public Spec.Builder clearContents()

Optional. Input only. The contents of the uploaded spec.

.google.cloud.apihub.v1.SpecContents contents = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
Spec.Builder

clearCreateTime()

public Spec.Builder clearCreateTime()

Output only. The time at which the spec was created.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Spec.Builder

clearDetails()

public Spec.Builder clearDetails()

Output only. Details parsed from the spec.

.google.cloud.apihub.v1.SpecDetails details = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Spec.Builder

clearDisplayName()

public Spec.Builder clearDisplayName()

Required. The display name of the spec. This can contain the file name of the spec.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Spec.Builder

This builder for chaining.

clearDocumentation()

public Spec.Builder clearDocumentation()

Optional. The documentation of the spec. For OpenAPI spec, this will be populated from externalDocs in OpenAPI spec.

.google.cloud.apihub.v1.Documentation documentation = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Spec.Builder

clearField(Descriptors.FieldDescriptor field)

public Spec.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Spec.Builder
Overrides

clearLintResponse()

public Spec.Builder clearLintResponse()

Optional. The lint response for the spec.

.google.cloud.apihub.v1.LintResponse lint_response = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Spec.Builder

clearName()

public Spec.Builder clearName()

Identifier. The name of the spec.

Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
Spec.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Spec.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Spec.Builder
Overrides

clearParsingMode()

public Spec.Builder clearParsingMode()

Optional. Input only. Enum specifying the parsing mode for OpenAPI Specification (OAS) parsing.

.google.cloud.apihub.v1.Spec.ParsingMode parsing_mode = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
Spec.Builder

This builder for chaining.

clearSourceUri()

public Spec.Builder clearSourceUri()

Optional. The URI of the spec source in case file is uploaded from an external version control system.

string source_uri = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Spec.Builder

This builder for chaining.

clearSpecType()

public Spec.Builder clearSpecType()

Required. The type of spec. The value should be one of the allowed values defined for projects/{project}/locations/{location}/attributes/system-spec-type attribute. The number of values for this attribute will be based on the cardinality of the attribute. The same can be retrieved via GetAttribute API.

Note, this field is mandatory if content is provided.

.google.cloud.apihub.v1.AttributeValues spec_type = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Spec.Builder

clearUpdateTime()

public Spec.Builder clearUpdateTime()

Output only. The time at which the spec was last updated.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Spec.Builder

clone()

public Spec.Builder clone()
Returns
Type Description
Spec.Builder
Overrides

containsAttributes(String key)

public boolean containsAttributes(String key)

Optional. The list of user defined attributes associated with the spec. 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 = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
boolean

getAttributes() (deprecated)

public Map<String,AttributeValues> getAttributes()

Use #getAttributesMap() instead.

Returns
Type Description
Map<String,AttributeValues>

getAttributesCount()

public int getAttributesCount()

Optional. The list of user defined attributes associated with the spec. 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 = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getAttributesMap()

public Map<String,AttributeValues> getAttributesMap()

Optional. The list of user defined attributes associated with the spec. 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 = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Map<String,AttributeValues>

getAttributesOrDefault(String key, AttributeValues defaultValue)

public AttributeValues getAttributesOrDefault(String key, AttributeValues defaultValue)

Optional. The list of user defined attributes associated with the spec. 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 = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
defaultValue AttributeValues
Returns
Type Description
AttributeValues

getAttributesOrThrow(String key)

public AttributeValues getAttributesOrThrow(String key)

Optional. The list of user defined attributes associated with the spec. 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 = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
AttributeValues

getContents()

public SpecContents getContents()

Optional. Input only. The contents of the uploaded spec.

.google.cloud.apihub.v1.SpecContents contents = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
SpecContents

The contents.

getContentsBuilder()

public SpecContents.Builder getContentsBuilder()

Optional. Input only. The contents of the uploaded spec.

.google.cloud.apihub.v1.SpecContents contents = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
SpecContents.Builder

getContentsOrBuilder()

public SpecContentsOrBuilder getContentsOrBuilder()

Optional. Input only. The contents of the uploaded spec.

.google.cloud.apihub.v1.SpecContents contents = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
SpecContentsOrBuilder

getCreateTime()

public Timestamp getCreateTime()

Output only. The time at which the spec was created.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. The time at which the spec was created.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. The time at which the spec was created.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public Spec getDefaultInstanceForType()
Returns
Type Description
Spec

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getDetails()

public SpecDetails getDetails()

Output only. Details parsed from the spec.

.google.cloud.apihub.v1.SpecDetails details = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
SpecDetails

The details.

getDetailsBuilder()

public SpecDetails.Builder getDetailsBuilder()

Output only. Details parsed from the spec.

.google.cloud.apihub.v1.SpecDetails details = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
SpecDetails.Builder

getDetailsOrBuilder()

public SpecDetailsOrBuilder getDetailsOrBuilder()

Output only. Details parsed from the spec.

.google.cloud.apihub.v1.SpecDetails details = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
SpecDetailsOrBuilder

getDisplayName()

public String getDisplayName()

Required. The display name of the spec. This can contain the file name of the spec.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Required. The display name of the spec. This can contain the file name of the spec.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for displayName.

getDocumentation()

public Documentation getDocumentation()

Optional. The documentation of the spec. For OpenAPI spec, this will be populated from externalDocs in OpenAPI spec.

.google.cloud.apihub.v1.Documentation documentation = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Documentation

The documentation.

getDocumentationBuilder()

public Documentation.Builder getDocumentationBuilder()

Optional. The documentation of the spec. For OpenAPI spec, this will be populated from externalDocs in OpenAPI spec.

.google.cloud.apihub.v1.Documentation documentation = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Documentation.Builder

getDocumentationOrBuilder()

public DocumentationOrBuilder getDocumentationOrBuilder()

Optional. The documentation of the spec. For OpenAPI spec, this will be populated from externalDocs in OpenAPI spec.

.google.cloud.apihub.v1.Documentation documentation = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
DocumentationOrBuilder

getLintResponse()

public LintResponse getLintResponse()

Optional. The lint response for the spec.

.google.cloud.apihub.v1.LintResponse lint_response = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
LintResponse

The lintResponse.

getLintResponseBuilder()

public LintResponse.Builder getLintResponseBuilder()

Optional. The lint response for the spec.

.google.cloud.apihub.v1.LintResponse lint_response = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
LintResponse.Builder

getLintResponseOrBuilder()

public LintResponseOrBuilder getLintResponseOrBuilder()

Optional. The lint response for the spec.

.google.cloud.apihub.v1.LintResponse lint_response = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
LintResponseOrBuilder

getMutableAttributes() (deprecated)

public Map<String,AttributeValues> getMutableAttributes()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,AttributeValues>

getName()

public String getName()

Identifier. The name of the spec.

Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Identifier. The name of the spec.

Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
ByteString

The bytes for name.

getParsingMode()

public Spec.ParsingMode getParsingMode()

Optional. Input only. Enum specifying the parsing mode for OpenAPI Specification (OAS) parsing.

.google.cloud.apihub.v1.Spec.ParsingMode parsing_mode = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
Spec.ParsingMode

The parsingMode.

getParsingModeValue()

public int getParsingModeValue()

Optional. Input only. Enum specifying the parsing mode for OpenAPI Specification (OAS) parsing.

.google.cloud.apihub.v1.Spec.ParsingMode parsing_mode = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for parsingMode.

getSourceUri()

public String getSourceUri()

Optional. The URI of the spec source in case file is uploaded from an external version control system.

string source_uri = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The sourceUri.

getSourceUriBytes()

public ByteString getSourceUriBytes()

Optional. The URI of the spec source in case file is uploaded from an external version control system.

string source_uri = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for sourceUri.

getSpecType()

public AttributeValues getSpecType()

Required. The type of spec. The value should be one of the allowed values defined for projects/{project}/locations/{location}/attributes/system-spec-type attribute. The number of values for this attribute will be based on the cardinality of the attribute. The same can be retrieved via GetAttribute API.

Note, this field is mandatory if content is provided.

.google.cloud.apihub.v1.AttributeValues spec_type = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
AttributeValues

The specType.

getSpecTypeBuilder()

public AttributeValues.Builder getSpecTypeBuilder()

Required. The type of spec. The value should be one of the allowed values defined for projects/{project}/locations/{location}/attributes/system-spec-type attribute. The number of values for this attribute will be based on the cardinality of the attribute. The same can be retrieved via GetAttribute API.

Note, this field is mandatory if content is provided.

.google.cloud.apihub.v1.AttributeValues spec_type = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
AttributeValues.Builder

getSpecTypeOrBuilder()

public AttributeValuesOrBuilder getSpecTypeOrBuilder()

Required. The type of spec. The value should be one of the allowed values defined for projects/{project}/locations/{location}/attributes/system-spec-type attribute. The number of values for this attribute will be based on the cardinality of the attribute. The same can be retrieved via GetAttribute API.

Note, this field is mandatory if content is provided.

.google.cloud.apihub.v1.AttributeValues spec_type = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
AttributeValuesOrBuilder

getUpdateTime()

public Timestamp getUpdateTime()

Output only. The time at which the spec was last updated.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeBuilder()

public Timestamp.Builder getUpdateTimeBuilder()

Output only. The time at which the spec was last updated.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. The time at which the spec was last updated.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

hasContents()

public boolean hasContents()

Optional. Input only. The contents of the uploaded spec.

.google.cloud.apihub.v1.SpecContents contents = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
boolean

Whether the contents field is set.

hasCreateTime()

public boolean hasCreateTime()

Output only. The time at which the spec was created.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

hasDetails()

public boolean hasDetails()

Output only. Details parsed from the spec.

.google.cloud.apihub.v1.SpecDetails details = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the details field is set.

hasDocumentation()

public boolean hasDocumentation()

Optional. The documentation of the spec. For OpenAPI spec, this will be populated from externalDocs in OpenAPI spec.

.google.cloud.apihub.v1.Documentation documentation = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the documentation field is set.

hasLintResponse()

public boolean hasLintResponse()

Optional. The lint response for the spec.

.google.cloud.apihub.v1.LintResponse lint_response = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the lintResponse field is set.

hasSpecType()

public boolean hasSpecType()

Required. The type of spec. The value should be one of the allowed values defined for projects/{project}/locations/{location}/attributes/system-spec-type attribute. The number of values for this attribute will be based on the cardinality of the attribute. The same can be retrieved via GetAttribute API.

Note, this field is mandatory if content is provided.

.google.cloud.apihub.v1.AttributeValues spec_type = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the specType field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. The time at which the spec was last updated.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the updateTime field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeContents(SpecContents value)

public Spec.Builder mergeContents(SpecContents value)

Optional. Input only. The contents of the uploaded spec.

.google.cloud.apihub.v1.SpecContents contents = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY];

Parameter
Name Description
value SpecContents
Returns
Type Description
Spec.Builder

mergeCreateTime(Timestamp value)

public Spec.Builder mergeCreateTime(Timestamp value)

Output only. The time at which the spec was created.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Spec.Builder

mergeDetails(SpecDetails value)

public Spec.Builder mergeDetails(SpecDetails value)

Output only. Details parsed from the spec.

.google.cloud.apihub.v1.SpecDetails details = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value SpecDetails
Returns
Type Description
Spec.Builder

mergeDocumentation(Documentation value)

public Spec.Builder mergeDocumentation(Documentation value)

Optional. The documentation of the spec. For OpenAPI spec, this will be populated from externalDocs in OpenAPI spec.

.google.cloud.apihub.v1.Documentation documentation = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Documentation
Returns
Type Description
Spec.Builder

mergeFrom(Spec other)

public Spec.Builder mergeFrom(Spec other)
Parameter
Name Description
other Spec
Returns
Type Description
Spec.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Spec.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Spec.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Spec.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Spec.Builder
Overrides

mergeLintResponse(LintResponse value)

public Spec.Builder mergeLintResponse(LintResponse value)

Optional. The lint response for the spec.

.google.cloud.apihub.v1.LintResponse lint_response = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value LintResponse
Returns
Type Description
Spec.Builder

mergeSpecType(AttributeValues value)

public Spec.Builder mergeSpecType(AttributeValues value)

Required. The type of spec. The value should be one of the allowed values defined for projects/{project}/locations/{location}/attributes/system-spec-type attribute. The number of values for this attribute will be based on the cardinality of the attribute. The same can be retrieved via GetAttribute API.

Note, this field is mandatory if content is provided.

.google.cloud.apihub.v1.AttributeValues spec_type = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value AttributeValues
Returns
Type Description
Spec.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Spec.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Spec.Builder
Overrides

mergeUpdateTime(Timestamp value)

public Spec.Builder mergeUpdateTime(Timestamp value)

Output only. The time at which the spec was last updated.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Spec.Builder

putAllAttributes(Map<String,AttributeValues> values)

public Spec.Builder putAllAttributes(Map<String,AttributeValues> values)

Optional. The list of user defined attributes associated with the spec. 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 = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Map<String,AttributeValues>
Returns
Type Description
Spec.Builder

putAttributes(String key, AttributeValues value)

public Spec.Builder putAttributes(String key, AttributeValues value)

Optional. The list of user defined attributes associated with the spec. 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 = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
value AttributeValues
Returns
Type Description
Spec.Builder

putAttributesBuilderIfAbsent(String key)

public AttributeValues.Builder putAttributesBuilderIfAbsent(String key)

Optional. The list of user defined attributes associated with the spec. 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 = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
AttributeValues.Builder

removeAttributes(String key)

public Spec.Builder removeAttributes(String key)

Optional. The list of user defined attributes associated with the spec. 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 = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
Spec.Builder

setContents(SpecContents value)

public Spec.Builder setContents(SpecContents value)

Optional. Input only. The contents of the uploaded spec.

.google.cloud.apihub.v1.SpecContents contents = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY];

Parameter
Name Description
value SpecContents
Returns
Type Description
Spec.Builder

setContents(SpecContents.Builder builderForValue)

public Spec.Builder setContents(SpecContents.Builder builderForValue)

Optional. Input only. The contents of the uploaded spec.

.google.cloud.apihub.v1.SpecContents contents = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY];

Parameter
Name Description
builderForValue SpecContents.Builder
Returns
Type Description
Spec.Builder

setCreateTime(Timestamp value)

public Spec.Builder setCreateTime(Timestamp value)

Output only. The time at which the spec was created.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Spec.Builder

setCreateTime(Timestamp.Builder builderForValue)

public Spec.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. The time at which the spec was created.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Spec.Builder

setDetails(SpecDetails value)

public Spec.Builder setDetails(SpecDetails value)

Output only. Details parsed from the spec.

.google.cloud.apihub.v1.SpecDetails details = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value SpecDetails
Returns
Type Description
Spec.Builder

setDetails(SpecDetails.Builder builderForValue)

public Spec.Builder setDetails(SpecDetails.Builder builderForValue)

Output only. Details parsed from the spec.

.google.cloud.apihub.v1.SpecDetails details = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue SpecDetails.Builder
Returns
Type Description
Spec.Builder

setDisplayName(String value)

public Spec.Builder setDisplayName(String value)

Required. The display name of the spec. This can contain the file name of the spec.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The displayName to set.

Returns
Type Description
Spec.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public Spec.Builder setDisplayNameBytes(ByteString value)

Required. The display name of the spec. This can contain the file name of the spec.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
Spec.Builder

This builder for chaining.

setDocumentation(Documentation value)

public Spec.Builder setDocumentation(Documentation value)

Optional. The documentation of the spec. For OpenAPI spec, this will be populated from externalDocs in OpenAPI spec.

.google.cloud.apihub.v1.Documentation documentation = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Documentation
Returns
Type Description
Spec.Builder

setDocumentation(Documentation.Builder builderForValue)

public Spec.Builder setDocumentation(Documentation.Builder builderForValue)

Optional. The documentation of the spec. For OpenAPI spec, this will be populated from externalDocs in OpenAPI spec.

.google.cloud.apihub.v1.Documentation documentation = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Documentation.Builder
Returns
Type Description
Spec.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Spec.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Spec.Builder
Overrides

setLintResponse(LintResponse value)

public Spec.Builder setLintResponse(LintResponse value)

Optional. The lint response for the spec.

.google.cloud.apihub.v1.LintResponse lint_response = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value LintResponse
Returns
Type Description
Spec.Builder

setLintResponse(LintResponse.Builder builderForValue)

public Spec.Builder setLintResponse(LintResponse.Builder builderForValue)

Optional. The lint response for the spec.

.google.cloud.apihub.v1.LintResponse lint_response = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue LintResponse.Builder
Returns
Type Description
Spec.Builder

setName(String value)

public Spec.Builder setName(String value)

Identifier. The name of the spec.

Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Spec.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Spec.Builder setNameBytes(ByteString value)

Identifier. The name of the spec.

Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Spec.Builder

This builder for chaining.

setParsingMode(Spec.ParsingMode value)

public Spec.Builder setParsingMode(Spec.ParsingMode value)

Optional. Input only. Enum specifying the parsing mode for OpenAPI Specification (OAS) parsing.

.google.cloud.apihub.v1.Spec.ParsingMode parsing_mode = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY];

Parameter
Name Description
value Spec.ParsingMode

The parsingMode to set.

Returns
Type Description
Spec.Builder

This builder for chaining.

setParsingModeValue(int value)

public Spec.Builder setParsingModeValue(int value)

Optional. Input only. Enum specifying the parsing mode for OpenAPI Specification (OAS) parsing.

.google.cloud.apihub.v1.Spec.ParsingMode parsing_mode = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY];

Parameter
Name Description
value int

The enum numeric value on the wire for parsingMode to set.

Returns
Type Description
Spec.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Spec.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Spec.Builder
Overrides

setSourceUri(String value)

public Spec.Builder setSourceUri(String value)

Optional. The URI of the spec source in case file is uploaded from an external version control system.

string source_uri = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The sourceUri to set.

Returns
Type Description
Spec.Builder

This builder for chaining.

setSourceUriBytes(ByteString value)

public Spec.Builder setSourceUriBytes(ByteString value)

Optional. The URI of the spec source in case file is uploaded from an external version control system.

string source_uri = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for sourceUri to set.

Returns
Type Description
Spec.Builder

This builder for chaining.

setSpecType(AttributeValues value)

public Spec.Builder setSpecType(AttributeValues value)

Required. The type of spec. The value should be one of the allowed values defined for projects/{project}/locations/{location}/attributes/system-spec-type attribute. The number of values for this attribute will be based on the cardinality of the attribute. The same can be retrieved via GetAttribute API.

Note, this field is mandatory if content is provided.

.google.cloud.apihub.v1.AttributeValues spec_type = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value AttributeValues
Returns
Type Description
Spec.Builder

setSpecType(AttributeValues.Builder builderForValue)

public Spec.Builder setSpecType(AttributeValues.Builder builderForValue)

Required. The type of spec. The value should be one of the allowed values defined for projects/{project}/locations/{location}/attributes/system-spec-type attribute. The number of values for this attribute will be based on the cardinality of the attribute. The same can be retrieved via GetAttribute API.

Note, this field is mandatory if content is provided.

.google.cloud.apihub.v1.AttributeValues spec_type = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue AttributeValues.Builder
Returns
Type Description
Spec.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final Spec.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Spec.Builder
Overrides

setUpdateTime(Timestamp value)

public Spec.Builder setUpdateTime(Timestamp value)

Output only. The time at which the spec was last updated.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Spec.Builder

setUpdateTime(Timestamp.Builder builderForValue)

public Spec.Builder setUpdateTime(Timestamp.Builder builderForValue)

Output only. The time at which the spec was last updated.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Spec.Builder