Struct google_api_proto::google::cloud::apigeeregistry::v1::ApiSpec
source · pub struct ApiSpec {Show 14 fields
pub name: String,
pub filename: String,
pub description: String,
pub revision_id: String,
pub create_time: Option<Timestamp>,
pub revision_create_time: Option<Timestamp>,
pub revision_update_time: Option<Timestamp>,
pub mime_type: String,
pub size_bytes: i32,
pub hash: String,
pub source_uri: String,
pub contents: Bytes,
pub labels: BTreeMap<String, String>,
pub annotations: BTreeMap<String, String>,
}
Expand description
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.
Fields§
§name: String
Resource name.
filename: String
A possibly-hierarchical name used to refer to the spec from other specs.
description: String
A detailed description.
revision_id: String
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.
create_time: Option<Timestamp>
Output only. Creation timestamp; when the spec resource was created.
revision_create_time: Option<Timestamp>
Output only. Revision creation timestamp; when the represented revision was created.
revision_update_time: Option<Timestamp>
Output only. Last update timestamp: when the represented revision was last modified.
mime_type: String
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”).
size_bytes: i32
Output only. The size of the spec file in bytes. If the spec is gzipped, this is the size of the uncompressed spec.
hash: String
Output only. A SHA-256 hash of the spec’s contents. If the spec is gzipped, this is the hash of the uncompressed spec.
source_uri: String
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.
contents: Bytes
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.
labels: BTreeMap<String, String>
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.
annotations: BTreeMap<String, String>
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.
Trait Implementations§
source§impl Message for ApiSpec
impl Message for ApiSpec
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for ApiSpec
impl PartialEq for ApiSpec
impl StructuralPartialEq for ApiSpec
Auto Trait Implementations§
impl !Freeze for ApiSpec
impl RefUnwindSafe for ApiSpec
impl Send for ApiSpec
impl Sync for ApiSpec
impl Unpin for ApiSpec
impl UnwindSafe for ApiSpec
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request