#[non_exhaustive]pub struct Schema {
pub name: String,
pub schema: Option<Schema>,
/* private fields */
}Expand description
Defines the structure and layout of a type of document data.
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: 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
Sets the value of schema.
Note that all the setters affecting schema are mutually
exclusive.
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
Sets the value of schema
to hold a StructSchema.
Note that all the setters affecting schema are
mutually exclusive.
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
Sets the value of schema
to hold a JsonSchema.
Note that all the setters affecting schema are
mutually exclusive.