Class ApiSpec.Builder (0.13.0)

public static final class ApiSpec.Builder extends GeneratedMessageV3.Builder<ApiSpec.Builder> implements ApiSpecOrBuilder

Describes a version of an API in a structured way. ApiSpecs provide formal descriptions that consumers can use to use a version. ApiSpec resources are intended to be fully-resolved descriptions of an ApiVersion. When specs consist of multiple files, these should be bundled together (e.g., in a zip archive) and stored as a unit. Multiple specs can exist to provide representations in different API description formats. Synchronization of these representations would be provided by tooling and background services.

Protobuf type google.cloud.apigeeregistry.v1.ApiSpec

Implements

ApiSpecOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ApiSpec.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ApiSpec.Builder
Overrides

build()

public ApiSpec build()
Returns
TypeDescription
ApiSpec

buildPartial()

public ApiSpec buildPartial()
Returns
TypeDescription
ApiSpec

clear()

public ApiSpec.Builder clear()
Returns
TypeDescription
ApiSpec.Builder
Overrides

clearAnnotations()

public ApiSpec.Builder clearAnnotations()
Returns
TypeDescription
ApiSpec.Builder

clearContents()

public ApiSpec.Builder clearContents()

Input only. The contents of the spec. Provided by API callers when specs are created or updated. To access the contents of a spec, use GetApiSpecContents.

bytes contents = 12 [(.google.api.field_behavior) = INPUT_ONLY];

Returns
TypeDescription
ApiSpec.Builder

This builder for chaining.

clearCreateTime()

public ApiSpec.Builder clearCreateTime()

Output only. Creation timestamp; when the spec resource was created.

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

Returns
TypeDescription
ApiSpec.Builder

clearDescription()

public ApiSpec.Builder clearDescription()

A detailed description.

string description = 3;

Returns
TypeDescription
ApiSpec.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public ApiSpec.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
ApiSpec.Builder
Overrides

clearFilename()

public ApiSpec.Builder clearFilename()

A possibly-hierarchical name used to refer to the spec from other specs.

string filename = 2;

Returns
TypeDescription
ApiSpec.Builder

This builder for chaining.

clearHash()

public ApiSpec.Builder clearHash()

Output only. A SHA-256 hash of the spec's contents. If the spec is gzipped, this is the hash of the uncompressed spec.

string hash = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ApiSpec.Builder

This builder for chaining.

clearLabels()

public ApiSpec.Builder clearLabels()
Returns
TypeDescription
ApiSpec.Builder

clearMimeType()

public ApiSpec.Builder clearMimeType()

A style (format) descriptor for this spec that is specified as a Media Type (https://en.wikipedia.org/wiki/Media_type). Possible values include application/vnd.apigee.proto, application/vnd.apigee.openapi, and application/vnd.apigee.graphql, with possible suffixes representing compression types. These hypothetical names are defined in the vendor tree defined in RFC6838 (https://tools.ietf.org/html/rfc6838) and are not final. Content types can specify compression. Currently only GZip compression is supported (indicated with "+gzip").

string mime_type = 8;

Returns
TypeDescription
ApiSpec.Builder

This builder for chaining.

clearName()

public ApiSpec.Builder clearName()

Resource name.

string name = 1;

Returns
TypeDescription
ApiSpec.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public ApiSpec.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
ApiSpec.Builder
Overrides

clearRevisionCreateTime()

public ApiSpec.Builder clearRevisionCreateTime()

Output only. Revision creation timestamp; when the represented revision was created.

.google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ApiSpec.Builder

clearRevisionId()

public ApiSpec.Builder clearRevisionId()

Output only. Immutable. The revision ID of the spec. A new revision is committed whenever the spec contents are changed. The format is an 8-character hexadecimal string.

string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ApiSpec.Builder

This builder for chaining.

clearRevisionUpdateTime()

public ApiSpec.Builder clearRevisionUpdateTime()

Output only. Last update timestamp: when the represented revision was last modified.

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

Returns
TypeDescription
ApiSpec.Builder

clearSizeBytes()

public ApiSpec.Builder clearSizeBytes()

Output only. The size of the spec file in bytes. If the spec is gzipped, this is the size of the uncompressed spec.

int32 size_bytes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ApiSpec.Builder

This builder for chaining.

clearSourceUri()

public ApiSpec.Builder clearSourceUri()

The original source URI of the spec (if one exists). This is an external location that can be used for reference purposes but which may not be authoritative since this external resource may change after the spec is retrieved.

string source_uri = 11;

Returns
TypeDescription
ApiSpec.Builder

This builder for chaining.

clone()

public ApiSpec.Builder clone()
Returns
TypeDescription
ApiSpec.Builder
Overrides

containsAnnotations(String key)

public boolean containsAnnotations(String key)

Annotations attach non-identifying metadata to resources. Annotation keys and values are less restricted than those of labels, but should be generally used for small values of broad interest. Larger, topic- specific metadata should be stored in Artifacts.

map<string, string> annotations = 15;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

containsLabels(String key)

public boolean containsLabels(String key)

Labels attach identifying metadata to resources. Identifying metadata can be used to filter list operations. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. No more than 64 user labels can be associated with one resource (System labels are excluded). See https://goo.gl/xmQnxf for more information and examples of labels. System reserved label keys are prefixed with apigeeregistry.googleapis.com/ and cannot be changed.

map<string, string> labels = 14;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getAnnotations()

public Map<String,String> getAnnotations()

Use #getAnnotationsMap() instead.

Returns
TypeDescription
Map<String,String>

getAnnotationsCount()

public int getAnnotationsCount()

Annotations attach non-identifying metadata to resources. Annotation keys and values are less restricted than those of labels, but should be generally used for small values of broad interest. Larger, topic- specific metadata should be stored in Artifacts.

map<string, string> annotations = 15;

Returns
TypeDescription
int

getAnnotationsMap()

public Map<String,String> getAnnotationsMap()

Annotations attach non-identifying metadata to resources. Annotation keys and values are less restricted than those of labels, but should be generally used for small values of broad interest. Larger, topic- specific metadata should be stored in Artifacts.

map<string, string> annotations = 15;

Returns
TypeDescription
Map<String,String>

getAnnotationsOrDefault(String key, String defaultValue)

public String getAnnotationsOrDefault(String key, String defaultValue)

Annotations attach non-identifying metadata to resources. Annotation keys and values are less restricted than those of labels, but should be generally used for small values of broad interest. Larger, topic- specific metadata should be stored in Artifacts.

map<string, string> annotations = 15;

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getAnnotationsOrThrow(String key)

public String getAnnotationsOrThrow(String key)

Annotations attach non-identifying metadata to resources. Annotation keys and values are less restricted than those of labels, but should be generally used for small values of broad interest. Larger, topic- specific metadata should be stored in Artifacts.

map<string, string> annotations = 15;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getContents()

public ByteString getContents()

Input only. The contents of the spec. Provided by API callers when specs are created or updated. To access the contents of a spec, use GetApiSpecContents.

bytes contents = 12 [(.google.api.field_behavior) = INPUT_ONLY];

Returns
TypeDescription
ByteString

The contents.

getCreateTime()

public Timestamp getCreateTime()

Output only. Creation timestamp; when the spec resource was created.

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

Returns
TypeDescription
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. Creation timestamp; when the spec resource was created.

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

Returns
TypeDescription
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. Creation timestamp; when the spec resource was created.

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

Returns
TypeDescription
TimestampOrBuilder

getDefaultInstanceForType()

public ApiSpec getDefaultInstanceForType()
Returns
TypeDescription
ApiSpec

getDescription()

public String getDescription()

A detailed description.

string description = 3;

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

A detailed description.

string description = 3;

Returns
TypeDescription
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getFilename()

public String getFilename()

A possibly-hierarchical name used to refer to the spec from other specs.

string filename = 2;

Returns
TypeDescription
String

The filename.

getFilenameBytes()

public ByteString getFilenameBytes()

A possibly-hierarchical name used to refer to the spec from other specs.

string filename = 2;

Returns
TypeDescription
ByteString

The bytes for filename.

getHash()

public String getHash()

Output only. A SHA-256 hash of the spec's contents. If the spec is gzipped, this is the hash of the uncompressed spec.

string hash = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
String

The hash.

getHashBytes()

public ByteString getHashBytes()

Output only. A SHA-256 hash of the spec's contents. If the spec is gzipped, this is the hash of the uncompressed spec.

string hash = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ByteString

The bytes for hash.

getLabels()

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
TypeDescription
Map<String,String>

getLabelsCount()

public int getLabelsCount()

Labels attach identifying metadata to resources. Identifying metadata can be used to filter list operations. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. No more than 64 user labels can be associated with one resource (System labels are excluded). See https://goo.gl/xmQnxf for more information and examples of labels. System reserved label keys are prefixed with apigeeregistry.googleapis.com/ and cannot be changed.

map<string, string> labels = 14;

Returns
TypeDescription
int

getLabelsMap()

public Map<String,String> getLabelsMap()

Labels attach identifying metadata to resources. Identifying metadata can be used to filter list operations. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. No more than 64 user labels can be associated with one resource (System labels are excluded). See https://goo.gl/xmQnxf for more information and examples of labels. System reserved label keys are prefixed with apigeeregistry.googleapis.com/ and cannot be changed.

map<string, string> labels = 14;

Returns
TypeDescription
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

public String getLabelsOrDefault(String key, String defaultValue)

Labels attach identifying metadata to resources. Identifying metadata can be used to filter list operations. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. No more than 64 user labels can be associated with one resource (System labels are excluded). See https://goo.gl/xmQnxf for more information and examples of labels. System reserved label keys are prefixed with apigeeregistry.googleapis.com/ and cannot be changed.

map<string, string> labels = 14;

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

Labels attach identifying metadata to resources. Identifying metadata can be used to filter list operations. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. No more than 64 user labels can be associated with one resource (System labels are excluded). See https://goo.gl/xmQnxf for more information and examples of labels. System reserved label keys are prefixed with apigeeregistry.googleapis.com/ and cannot be changed.

map<string, string> labels = 14;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getMimeType()

public String getMimeType()

A style (format) descriptor for this spec that is specified as a Media Type (https://en.wikipedia.org/wiki/Media_type). Possible values include application/vnd.apigee.proto, application/vnd.apigee.openapi, and application/vnd.apigee.graphql, with possible suffixes representing compression types. These hypothetical names are defined in the vendor tree defined in RFC6838 (https://tools.ietf.org/html/rfc6838) and are not final. Content types can specify compression. Currently only GZip compression is supported (indicated with "+gzip").

string mime_type = 8;

Returns
TypeDescription
String

The mimeType.

getMimeTypeBytes()

public ByteString getMimeTypeBytes()

A style (format) descriptor for this spec that is specified as a Media Type (https://en.wikipedia.org/wiki/Media_type). Possible values include application/vnd.apigee.proto, application/vnd.apigee.openapi, and application/vnd.apigee.graphql, with possible suffixes representing compression types. These hypothetical names are defined in the vendor tree defined in RFC6838 (https://tools.ietf.org/html/rfc6838) and are not final. Content types can specify compression. Currently only GZip compression is supported (indicated with "+gzip").

string mime_type = 8;

Returns
TypeDescription
ByteString

The bytes for mimeType.

getMutableAnnotations()

public Map<String,String> getMutableAnnotations()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,String>

getMutableLabels()

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,String>

getName()

public String getName()

Resource name.

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Resource name.

string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.

getRevisionCreateTime()

public Timestamp getRevisionCreateTime()

Output only. Revision creation timestamp; when the represented revision was created.

.google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Timestamp

The revisionCreateTime.

getRevisionCreateTimeBuilder()

public Timestamp.Builder getRevisionCreateTimeBuilder()

Output only. Revision creation timestamp; when the represented revision was created.

.google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Builder

getRevisionCreateTimeOrBuilder()

public TimestampOrBuilder getRevisionCreateTimeOrBuilder()

Output only. Revision creation timestamp; when the represented revision was created.

.google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
TimestampOrBuilder

getRevisionId()

public String getRevisionId()

Output only. Immutable. The revision ID of the spec. A new revision is committed whenever the spec contents are changed. The format is an 8-character hexadecimal string.

string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
String

The revisionId.

getRevisionIdBytes()

public ByteString getRevisionIdBytes()

Output only. Immutable. The revision ID of the spec. A new revision is committed whenever the spec contents are changed. The format is an 8-character hexadecimal string.

string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ByteString

The bytes for revisionId.

getRevisionUpdateTime()

public Timestamp getRevisionUpdateTime()

Output only. Last update timestamp: when the represented revision was last modified.

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

Returns
TypeDescription
Timestamp

The revisionUpdateTime.

getRevisionUpdateTimeBuilder()

public Timestamp.Builder getRevisionUpdateTimeBuilder()

Output only. Last update timestamp: when the represented revision was last modified.

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

Returns
TypeDescription
Builder

getRevisionUpdateTimeOrBuilder()

public TimestampOrBuilder getRevisionUpdateTimeOrBuilder()

Output only. Last update timestamp: when the represented revision was last modified.

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

Returns
TypeDescription
TimestampOrBuilder

getSizeBytes()

public int getSizeBytes()

Output only. The size of the spec file in bytes. If the spec is gzipped, this is the size of the uncompressed spec.

int32 size_bytes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
int

The sizeBytes.

getSourceUri()

public String getSourceUri()

The original source URI of the spec (if one exists). This is an external location that can be used for reference purposes but which may not be authoritative since this external resource may change after the spec is retrieved.

string source_uri = 11;

Returns
TypeDescription
String

The sourceUri.

getSourceUriBytes()

public ByteString getSourceUriBytes()

The original source URI of the spec (if one exists). This is an external location that can be used for reference purposes but which may not be authoritative since this external resource may change after the spec is retrieved.

string source_uri = 11;

Returns
TypeDescription
ByteString

The bytes for sourceUri.

hasCreateTime()

public boolean hasCreateTime()

Output only. Creation timestamp; when the spec resource was created.

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

Returns
TypeDescription
boolean

Whether the createTime field is set.

hasRevisionCreateTime()

public boolean hasRevisionCreateTime()

Output only. Revision creation timestamp; when the represented revision was created.

.google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the revisionCreateTime field is set.

hasRevisionUpdateTime()

public boolean hasRevisionUpdateTime()

Output only. Last update timestamp: when the represented revision was last modified.

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

Returns
TypeDescription
boolean

Whether the revisionUpdateTime field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeCreateTime(Timestamp value)

public ApiSpec.Builder mergeCreateTime(Timestamp value)

Output only. Creation timestamp; when the spec resource was created.

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

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
ApiSpec.Builder

mergeFrom(ApiSpec other)

public ApiSpec.Builder mergeFrom(ApiSpec other)
Parameter
NameDescription
otherApiSpec
Returns
TypeDescription
ApiSpec.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ApiSpec.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ApiSpec.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public ApiSpec.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
ApiSpec.Builder
Overrides

mergeRevisionCreateTime(Timestamp value)

public ApiSpec.Builder mergeRevisionCreateTime(Timestamp value)

Output only. Revision creation timestamp; when the represented revision was created.

.google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
ApiSpec.Builder

mergeRevisionUpdateTime(Timestamp value)

public ApiSpec.Builder mergeRevisionUpdateTime(Timestamp value)

Output only. Last update timestamp: when the represented revision was last modified.

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

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
ApiSpec.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ApiSpec.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ApiSpec.Builder
Overrides

putAllAnnotations(Map<String,String> values)

public ApiSpec.Builder putAllAnnotations(Map<String,String> values)

Annotations attach non-identifying metadata to resources. Annotation keys and values are less restricted than those of labels, but should be generally used for small values of broad interest. Larger, topic- specific metadata should be stored in Artifacts.

map<string, string> annotations = 15;

Parameter
NameDescription
valuesMap<String,String>
Returns
TypeDescription
ApiSpec.Builder

putAllLabels(Map<String,String> values)

public ApiSpec.Builder putAllLabels(Map<String,String> values)

Labels attach identifying metadata to resources. Identifying metadata can be used to filter list operations. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. No more than 64 user labels can be associated with one resource (System labels are excluded). See https://goo.gl/xmQnxf for more information and examples of labels. System reserved label keys are prefixed with apigeeregistry.googleapis.com/ and cannot be changed.

map<string, string> labels = 14;

Parameter
NameDescription
valuesMap<String,String>
Returns
TypeDescription
ApiSpec.Builder

putAnnotations(String key, String value)

public ApiSpec.Builder putAnnotations(String key, String value)

Annotations attach non-identifying metadata to resources. Annotation keys and values are less restricted than those of labels, but should be generally used for small values of broad interest. Larger, topic- specific metadata should be stored in Artifacts.

map<string, string> annotations = 15;

Parameters
NameDescription
keyString
valueString
Returns
TypeDescription
ApiSpec.Builder

putLabels(String key, String value)

public ApiSpec.Builder putLabels(String key, String value)

Labels attach identifying metadata to resources. Identifying metadata can be used to filter list operations. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. No more than 64 user labels can be associated with one resource (System labels are excluded). See https://goo.gl/xmQnxf for more information and examples of labels. System reserved label keys are prefixed with apigeeregistry.googleapis.com/ and cannot be changed.

map<string, string> labels = 14;

Parameters
NameDescription
keyString
valueString
Returns
TypeDescription
ApiSpec.Builder

removeAnnotations(String key)

public ApiSpec.Builder removeAnnotations(String key)

Annotations attach non-identifying metadata to resources. Annotation keys and values are less restricted than those of labels, but should be generally used for small values of broad interest. Larger, topic- specific metadata should be stored in Artifacts.

map<string, string> annotations = 15;

Parameter
NameDescription
keyString
Returns
TypeDescription
ApiSpec.Builder

removeLabels(String key)

public ApiSpec.Builder removeLabels(String key)

Labels attach identifying metadata to resources. Identifying metadata can be used to filter list operations. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. No more than 64 user labels can be associated with one resource (System labels are excluded). See https://goo.gl/xmQnxf for more information and examples of labels. System reserved label keys are prefixed with apigeeregistry.googleapis.com/ and cannot be changed.

map<string, string> labels = 14;

Parameter
NameDescription
keyString
Returns
TypeDescription
ApiSpec.Builder

setContents(ByteString value)

public ApiSpec.Builder setContents(ByteString value)

Input only. The contents of the spec. Provided by API callers when specs are created or updated. To access the contents of a spec, use GetApiSpecContents.

bytes contents = 12 [(.google.api.field_behavior) = INPUT_ONLY];

Parameter
NameDescription
valueByteString

The contents to set.

Returns
TypeDescription
ApiSpec.Builder

This builder for chaining.

setCreateTime(Timestamp value)

public ApiSpec.Builder setCreateTime(Timestamp value)

Output only. Creation timestamp; when the spec resource was created.

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

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
ApiSpec.Builder

setCreateTime(Timestamp.Builder builderForValue)

public ApiSpec.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. Creation timestamp; when the spec resource was created.

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

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
ApiSpec.Builder

setDescription(String value)

public ApiSpec.Builder setDescription(String value)

A detailed description.

string description = 3;

Parameter
NameDescription
valueString

The description to set.

Returns
TypeDescription
ApiSpec.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public ApiSpec.Builder setDescriptionBytes(ByteString value)

A detailed description.

string description = 3;

Parameter
NameDescription
valueByteString

The bytes for description to set.

Returns
TypeDescription
ApiSpec.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public ApiSpec.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ApiSpec.Builder
Overrides

setFilename(String value)

public ApiSpec.Builder setFilename(String value)

A possibly-hierarchical name used to refer to the spec from other specs.

string filename = 2;

Parameter
NameDescription
valueString

The filename to set.

Returns
TypeDescription
ApiSpec.Builder

This builder for chaining.

setFilenameBytes(ByteString value)

public ApiSpec.Builder setFilenameBytes(ByteString value)

A possibly-hierarchical name used to refer to the spec from other specs.

string filename = 2;

Parameter
NameDescription
valueByteString

The bytes for filename to set.

Returns
TypeDescription
ApiSpec.Builder

This builder for chaining.

setHash(String value)

public ApiSpec.Builder setHash(String value)

Output only. A SHA-256 hash of the spec's contents. If the spec is gzipped, this is the hash of the uncompressed spec.

string hash = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueString

The hash to set.

Returns
TypeDescription
ApiSpec.Builder

This builder for chaining.

setHashBytes(ByteString value)

public ApiSpec.Builder setHashBytes(ByteString value)

Output only. A SHA-256 hash of the spec's contents. If the spec is gzipped, this is the hash of the uncompressed spec.

string hash = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueByteString

The bytes for hash to set.

Returns
TypeDescription
ApiSpec.Builder

This builder for chaining.

setMimeType(String value)

public ApiSpec.Builder setMimeType(String value)

A style (format) descriptor for this spec that is specified as a Media Type (https://en.wikipedia.org/wiki/Media_type). Possible values include application/vnd.apigee.proto, application/vnd.apigee.openapi, and application/vnd.apigee.graphql, with possible suffixes representing compression types. These hypothetical names are defined in the vendor tree defined in RFC6838 (https://tools.ietf.org/html/rfc6838) and are not final. Content types can specify compression. Currently only GZip compression is supported (indicated with "+gzip").

string mime_type = 8;

Parameter
NameDescription
valueString

The mimeType to set.

Returns
TypeDescription
ApiSpec.Builder

This builder for chaining.

setMimeTypeBytes(ByteString value)

public ApiSpec.Builder setMimeTypeBytes(ByteString value)

A style (format) descriptor for this spec that is specified as a Media Type (https://en.wikipedia.org/wiki/Media_type). Possible values include application/vnd.apigee.proto, application/vnd.apigee.openapi, and application/vnd.apigee.graphql, with possible suffixes representing compression types. These hypothetical names are defined in the vendor tree defined in RFC6838 (https://tools.ietf.org/html/rfc6838) and are not final. Content types can specify compression. Currently only GZip compression is supported (indicated with "+gzip").

string mime_type = 8;

Parameter
NameDescription
valueByteString

The bytes for mimeType to set.

Returns
TypeDescription
ApiSpec.Builder

This builder for chaining.

setName(String value)

public ApiSpec.Builder setName(String value)

Resource name.

string name = 1;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
ApiSpec.Builder

This builder for chaining.

setNameBytes(ByteString value)

public ApiSpec.Builder setNameBytes(ByteString value)

Resource name.

string name = 1;

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
ApiSpec.Builder

This builder for chaining.

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

public ApiSpec.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
ApiSpec.Builder
Overrides

setRevisionCreateTime(Timestamp value)

public ApiSpec.Builder setRevisionCreateTime(Timestamp value)

Output only. Revision creation timestamp; when the represented revision was created.

.google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
ApiSpec.Builder

setRevisionCreateTime(Timestamp.Builder builderForValue)

public ApiSpec.Builder setRevisionCreateTime(Timestamp.Builder builderForValue)

Output only. Revision creation timestamp; when the represented revision was created.

.google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
ApiSpec.Builder

setRevisionId(String value)

public ApiSpec.Builder setRevisionId(String value)

Output only. Immutable. The revision ID of the spec. A new revision is committed whenever the spec contents are changed. The format is an 8-character hexadecimal string.

string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueString

The revisionId to set.

Returns
TypeDescription
ApiSpec.Builder

This builder for chaining.

setRevisionIdBytes(ByteString value)

public ApiSpec.Builder setRevisionIdBytes(ByteString value)

Output only. Immutable. The revision ID of the spec. A new revision is committed whenever the spec contents are changed. The format is an 8-character hexadecimal string.

string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueByteString

The bytes for revisionId to set.

Returns
TypeDescription
ApiSpec.Builder

This builder for chaining.

setRevisionUpdateTime(Timestamp value)

public ApiSpec.Builder setRevisionUpdateTime(Timestamp value)

Output only. Last update timestamp: when the represented revision was last modified.

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

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
ApiSpec.Builder

setRevisionUpdateTime(Timestamp.Builder builderForValue)

public ApiSpec.Builder setRevisionUpdateTime(Timestamp.Builder builderForValue)

Output only. Last update timestamp: when the represented revision was last modified.

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

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
ApiSpec.Builder

setSizeBytes(int value)

public ApiSpec.Builder setSizeBytes(int value)

Output only. The size of the spec file in bytes. If the spec is gzipped, this is the size of the uncompressed spec.

int32 size_bytes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueint

The sizeBytes to set.

Returns
TypeDescription
ApiSpec.Builder

This builder for chaining.

setSourceUri(String value)

public ApiSpec.Builder setSourceUri(String value)

The original source URI of the spec (if one exists). This is an external location that can be used for reference purposes but which may not be authoritative since this external resource may change after the spec is retrieved.

string source_uri = 11;

Parameter
NameDescription
valueString

The sourceUri to set.

Returns
TypeDescription
ApiSpec.Builder

This builder for chaining.

setSourceUriBytes(ByteString value)

public ApiSpec.Builder setSourceUriBytes(ByteString value)

The original source URI of the spec (if one exists). This is an external location that can be used for reference purposes but which may not be authoritative since this external resource may change after the spec is retrieved.

string source_uri = 11;

Parameter
NameDescription
valueByteString

The bytes for sourceUri to set.

Returns
TypeDescription
ApiSpec.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final ApiSpec.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ApiSpec.Builder
Overrides