#[non_exhaustive]pub struct Schema {
pub name: String,
pub type: Type,
pub definition: String,
pub revision_id: String,
pub revision_create_time: Option<Timestamp>,
/* private fields */
}Expand description
A schema resource.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringRequired. Name of the schema.
Format is projects/{project}/schemas/{schema}.
type: TypeThe type of the schema definition.
definition: StringThe definition of the schema. This should contain a string representing
the full definition of the schema that is a valid schema definition of
the type specified in type.
revision_id: StringOutput only. Immutable. The revision ID of the schema.
revision_create_time: Option<Timestamp>Output only. The timestamp that the revision was created.
Implementations§
Source§impl Schema
impl Schema
pub fn new() -> Self
Sourcepub fn set_definition<T: Into<String>>(self, v: T) -> Self
pub fn set_definition<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_revision_id<T: Into<String>>(self, v: T) -> Self
pub fn set_revision_id<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_revision_create_time<T>(self, v: T) -> Self
pub fn set_revision_create_time<T>(self, v: T) -> Self
Sets the value of revision_create_time.
§Example
ⓘ
use wkt::Timestamp;
let x = Schema::new().set_revision_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_revision_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_revision_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of revision_create_time.
§Example
ⓘ
use wkt::Timestamp;
let x = Schema::new().set_or_clear_revision_create_time(Some(Timestamp::default()/* use setters */));
let x = Schema::new().set_or_clear_revision_create_time(None::<Timestamp>);Trait Implementations§
impl StructuralPartialEq for Schema
Auto Trait Implementations§
impl Freeze for Schema
impl RefUnwindSafe for Schema
impl Send for Schema
impl Sync for Schema
impl Unpin for Schema
impl UnwindSafe for Schema
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
Mutably borrows from an owned value. Read more
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>
Wrap the input message
T in a tonic::Request