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: Vec<u8>,
pub labels: HashMap<String, String>,
pub annotations: HashMap<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: Vec<u8>
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: HashMap<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: HashMap<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
.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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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