Class ApiSpec.Builder (0.15.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.events.cloud.apigeeregistry.v1.ApiSpec

Implements

ApiSpecOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public ApiSpec build()
Returns
Type Description
ApiSpec

buildPartial()

public ApiSpec buildPartial()
Returns
Type Description
ApiSpec

clear()

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

clearAnnotations()

public ApiSpec.Builder clearAnnotations()
Returns
Type Description
ApiSpec.Builder

clearCreateTime()

public ApiSpec.Builder clearCreateTime()

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

.google.protobuf.Timestamp create_time = 5;

Returns
Type Description
ApiSpec.Builder

clearDescription()

public ApiSpec.Builder clearDescription()

A detailed description.

string description = 3;

Returns
Type Description
ApiSpec.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public ApiSpec.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
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
Type Description
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;

Returns
Type Description
ApiSpec.Builder

This builder for chaining.

clearLabels()

public ApiSpec.Builder clearLabels()
Returns
Type Description
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
Type Description
ApiSpec.Builder

This builder for chaining.

clearName()

public ApiSpec.Builder clearName()

Resource name.

string name = 1;

Returns
Type Description
ApiSpec.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public ApiSpec.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
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;

Returns
Type Description
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;

Returns
Type Description
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;

Returns
Type Description
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;

Returns
Type Description
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
Type Description
ApiSpec.Builder

This builder for chaining.

clone()

public ApiSpec.Builder clone()
Returns
Type Description
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
Name Description
key String
Returns
Type Description
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
Name Description
key String
Returns
Type Description
boolean

getAnnotations()

public Map<String,String> getAnnotations()

Use #getAnnotationsMap() instead.

Returns
Type Description
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
Type Description
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
Type Description
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
Name Description
key String
defaultValue String
Returns
Type Description
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
Name Description
key String
Returns
Type Description
String

getCreateTime()

public Timestamp getCreateTime()

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

.google.protobuf.Timestamp create_time = 5;

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

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

.google.protobuf.Timestamp create_time = 5;

Returns
Type Description
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

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

.google.protobuf.Timestamp create_time = 5;

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public ApiSpec getDefaultInstanceForType()
Returns
Type Description
ApiSpec

getDescription()

public String getDescription()

A detailed description.

string description = 3;

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

A detailed description.

string description = 3;

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

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

getFilename()

public String getFilename()

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

string filename = 2;

Returns
Type Description
String

The filename.

getFilenameBytes()

public ByteString getFilenameBytes()

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

string filename = 2;

Returns
Type Description
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;

Returns
Type Description
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;

Returns
Type Description
ByteString

The bytes for hash.

getLabels()

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
Type Description
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
Type Description
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
Type Description
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
Name Description
key String
defaultValue String
Returns
Type Description
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
Name Description
key String
Returns
Type Description
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
Type Description
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
Type Description
ByteString

The bytes for mimeType.

getMutableAnnotations()

public Map<String,String> getMutableAnnotations()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

getMutableLabels()

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

getName()

public String getName()

Resource name.

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Resource name.

string name = 1;

Returns
Type Description
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;

Returns
Type Description
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;

Returns
Type Description
Builder

getRevisionCreateTimeOrBuilder()

public TimestampOrBuilder getRevisionCreateTimeOrBuilder()

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

.google.protobuf.Timestamp revision_create_time = 6;

Returns
Type Description
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;

Returns
Type Description
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;

Returns
Type Description
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;

Returns
Type Description
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;

Returns
Type Description
Builder

getRevisionUpdateTimeOrBuilder()

public TimestampOrBuilder getRevisionUpdateTimeOrBuilder()

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

.google.protobuf.Timestamp revision_update_time = 7;

Returns
Type Description
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;

Returns
Type Description
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
Type Description
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
Type Description
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;

Returns
Type Description
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;

Returns
Type Description
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;

Returns
Type Description
boolean

Whether the revisionUpdateTime field is set.

internalGetFieldAccessorTable()

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

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
Name Description
number int
Returns
Type Description
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
Name Description
number int
Returns
Type Description
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
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;

Parameter
Name Description
value Timestamp
Returns
Type Description
ApiSpec.Builder

mergeFrom(ApiSpec other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public ApiSpec.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
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;

Parameter
Name Description
value Timestamp
Returns
Type Description
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;

Parameter
Name Description
value Timestamp
Returns
Type Description
ApiSpec.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ApiSpec.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
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
Name Description
values Map<String,String>
Returns
Type Description
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
Name Description
values Map<String,String>
Returns
Type Description
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
Name Description
key String
value String
Returns
Type Description
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
Name Description
key String
value String
Returns
Type Description
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
Name Description
key String
Returns
Type Description
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
Name Description
key String
Returns
Type Description
ApiSpec.Builder

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;

Parameter
Name Description
value Timestamp
Returns
Type Description
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;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
ApiSpec.Builder

setDescription(String value)

public ApiSpec.Builder setDescription(String value)

A detailed description.

string description = 3;

Parameter
Name Description
value String

The description to set.

Returns
Type Description
ApiSpec.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public ApiSpec.Builder setDescriptionBytes(ByteString value)

A detailed description.

string description = 3;

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
ApiSpec.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public ApiSpec.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
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
Name Description
value String

The filename to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for filename to set.

Returns
Type Description
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;

Parameter
Name Description
value String

The hash to set.

Returns
Type Description
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;

Parameter
Name Description
value ByteString

The bytes for hash to set.

Returns
Type Description
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
Name Description
value String

The mimeType to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for mimeType to set.

Returns
Type Description
ApiSpec.Builder

This builder for chaining.

setName(String value)

public ApiSpec.Builder setName(String value)

Resource name.

string name = 1;

Parameter
Name Description
value String

The name to set.

Returns
Type Description
ApiSpec.Builder

This builder for chaining.

setNameBytes(ByteString value)

public ApiSpec.Builder setNameBytes(ByteString value)

Resource name.

string name = 1;

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
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
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
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;

Parameter
Name Description
value Timestamp
Returns
Type Description
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;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
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;

Parameter
Name Description
value String

The revisionId to set.

Returns
Type Description
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;

Parameter
Name Description
value ByteString

The bytes for revisionId to set.

Returns
Type Description
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;

Parameter
Name Description
value Timestamp
Returns
Type Description
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;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
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;

Parameter
Name Description
value int

The sizeBytes to set.

Returns
Type Description
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
Name Description
value String

The sourceUri to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for sourceUri to set.

Returns
Type Description
ApiSpec.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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