#[non_exhaustive]pub struct Schema {
pub name: String,
pub type: Type,
pub definition: String,
pub revision_id: String,
pub revision_create_time: Option<Timestamp>,
pub configuration: Option<Configuration>,
/* private fields */
}Expand description
A schema resource.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
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.
configuration: Option<Configuration>The configuration of the schema.
This field is mutually exclusive with the definition field above, meaning
either definition or one of the fields below can be set in a valid Schema
object.
Implementations§
Source§impl Schema
impl Schema
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>);Sourcepub fn set_configuration<T: Into<Option<Configuration>>>(self, v: T) -> Self
pub fn set_configuration<T: Into<Option<Configuration>>>(self, v: T) -> Self
Sets the value of configuration.
Note that all the setters affecting configuration are mutually
exclusive.
§Example
use google_cloud_pubsub::model::CompiledProtoSchema;
let x = Schema::new().set_configuration(Some(
google_cloud_pubsub::model::schema::Configuration::CompiledProtoSchema(CompiledProtoSchema::default().into())));Sourcepub fn compiled_proto_schema(&self) -> Option<&Box<CompiledProtoSchema>>
pub fn compiled_proto_schema(&self) -> Option<&Box<CompiledProtoSchema>>
The value of configuration
if it holds a CompiledProtoSchema, None if the field is not set or
holds a different branch.
Sourcepub fn set_compiled_proto_schema<T: Into<Box<CompiledProtoSchema>>>(
self,
v: T,
) -> Self
pub fn set_compiled_proto_schema<T: Into<Box<CompiledProtoSchema>>>( self, v: T, ) -> Self
Sets the value of configuration
to hold a CompiledProtoSchema.
Note that all the setters affecting configuration are
mutually exclusive.
§Example
use google_cloud_pubsub::model::CompiledProtoSchema;
let x = Schema::new().set_compiled_proto_schema(CompiledProtoSchema::default()/* use setters */);
assert!(x.compiled_proto_schema().is_some());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 UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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