#[non_exhaustive]pub struct Schema {
pub name: String,
pub schema: Option<Schema>,
/* private fields */
}Available on crate features
data-store-service or schema-service only.Expand description
Defines the structure and layout of a type of document data.
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: StringImmutable. The full resource name of the schema, in the format of
projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}.
This field must be a UTF-8 encoded string with a length limit of 1024 characters.
schema: Option<Schema>Schema representation. One of
struct_schema or
json_schema should be
provided otherwise an INVALID_ARGUMENT error is thrown.
Implementations§
Source§impl Schema
impl Schema
pub fn new() -> Self
Sourcepub fn set_schema<T: Into<Option<Schema>>>(self, v: T) -> Self
pub fn set_schema<T: Into<Option<Schema>>>(self, v: T) -> Self
Sourcepub fn struct_schema(&self) -> Option<&Box<Struct>>
pub fn struct_schema(&self) -> Option<&Box<Struct>>
The value of schema
if it holds a StructSchema, None if the field is not set or
holds a different branch.
Sourcepub fn set_struct_schema<T: Into<Box<Struct>>>(self, v: T) -> Self
pub fn set_struct_schema<T: Into<Box<Struct>>>(self, v: T) -> Self
Sourcepub fn json_schema(&self) -> Option<&String>
pub fn json_schema(&self) -> Option<&String>
The value of schema
if it holds a JsonSchema, None if the field is not set or
holds a different branch.
Sourcepub fn set_json_schema<T: Into<String>>(self, v: T) -> Self
pub fn set_json_schema<T: Into<String>>(self, v: T) -> Self
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