Struct aws_sdk_keyspaces::model::schema_definition::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for SchemaDefinition
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn all_columns(self, input: ColumnDefinition) -> Self
pub fn all_columns(self, input: ColumnDefinition) -> Self
Appends an item to all_columns
.
To override the contents of this collection use set_all_columns
.
The regular columns of the table.
sourcepub fn set_all_columns(self, input: Option<Vec<ColumnDefinition>>) -> Self
pub fn set_all_columns(self, input: Option<Vec<ColumnDefinition>>) -> Self
The regular columns of the table.
Examples found in repository?
863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928
pub(crate) fn deser_structure_crate_model_schema_definition<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::SchemaDefinition>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::schema_definition::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"allColumns" => {
builder = builder.set_all_columns(
crate::json_deser::deser_list_com_amazonaws_keyspaces_column_definition_list(tokens)?
);
}
"partitionKeys" => {
builder = builder.set_partition_keys(
crate::json_deser::deser_list_com_amazonaws_keyspaces_partition_key_list(tokens)?
);
}
"clusteringKeys" => {
builder = builder.set_clustering_keys(
crate::json_deser::deser_list_com_amazonaws_keyspaces_clustering_key_list(tokens)?
);
}
"staticColumns" => {
builder = builder.set_static_columns(
crate::json_deser::deser_list_com_amazonaws_keyspaces_static_column_list(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn partition_keys(self, input: PartitionKey) -> Self
pub fn partition_keys(self, input: PartitionKey) -> Self
Appends an item to partition_keys
.
To override the contents of this collection use set_partition_keys
.
The columns that are part of the partition key of the table .
sourcepub fn set_partition_keys(self, input: Option<Vec<PartitionKey>>) -> Self
pub fn set_partition_keys(self, input: Option<Vec<PartitionKey>>) -> Self
The columns that are part of the partition key of the table .
Examples found in repository?
863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928
pub(crate) fn deser_structure_crate_model_schema_definition<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::SchemaDefinition>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::schema_definition::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"allColumns" => {
builder = builder.set_all_columns(
crate::json_deser::deser_list_com_amazonaws_keyspaces_column_definition_list(tokens)?
);
}
"partitionKeys" => {
builder = builder.set_partition_keys(
crate::json_deser::deser_list_com_amazonaws_keyspaces_partition_key_list(tokens)?
);
}
"clusteringKeys" => {
builder = builder.set_clustering_keys(
crate::json_deser::deser_list_com_amazonaws_keyspaces_clustering_key_list(tokens)?
);
}
"staticColumns" => {
builder = builder.set_static_columns(
crate::json_deser::deser_list_com_amazonaws_keyspaces_static_column_list(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn clustering_keys(self, input: ClusteringKey) -> Self
pub fn clustering_keys(self, input: ClusteringKey) -> Self
Appends an item to clustering_keys
.
To override the contents of this collection use set_clustering_keys
.
The columns that are part of the clustering key of the table.
sourcepub fn set_clustering_keys(self, input: Option<Vec<ClusteringKey>>) -> Self
pub fn set_clustering_keys(self, input: Option<Vec<ClusteringKey>>) -> Self
The columns that are part of the clustering key of the table.
Examples found in repository?
863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928
pub(crate) fn deser_structure_crate_model_schema_definition<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::SchemaDefinition>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::schema_definition::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"allColumns" => {
builder = builder.set_all_columns(
crate::json_deser::deser_list_com_amazonaws_keyspaces_column_definition_list(tokens)?
);
}
"partitionKeys" => {
builder = builder.set_partition_keys(
crate::json_deser::deser_list_com_amazonaws_keyspaces_partition_key_list(tokens)?
);
}
"clusteringKeys" => {
builder = builder.set_clustering_keys(
crate::json_deser::deser_list_com_amazonaws_keyspaces_clustering_key_list(tokens)?
);
}
"staticColumns" => {
builder = builder.set_static_columns(
crate::json_deser::deser_list_com_amazonaws_keyspaces_static_column_list(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn static_columns(self, input: StaticColumn) -> Self
pub fn static_columns(self, input: StaticColumn) -> Self
Appends an item to static_columns
.
To override the contents of this collection use set_static_columns
.
The columns that have been defined as STATIC
. Static columns store values that are shared by all rows in the same partition.
sourcepub fn set_static_columns(self, input: Option<Vec<StaticColumn>>) -> Self
pub fn set_static_columns(self, input: Option<Vec<StaticColumn>>) -> Self
The columns that have been defined as STATIC
. Static columns store values that are shared by all rows in the same partition.
Examples found in repository?
863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928
pub(crate) fn deser_structure_crate_model_schema_definition<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::SchemaDefinition>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::schema_definition::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"allColumns" => {
builder = builder.set_all_columns(
crate::json_deser::deser_list_com_amazonaws_keyspaces_column_definition_list(tokens)?
);
}
"partitionKeys" => {
builder = builder.set_partition_keys(
crate::json_deser::deser_list_com_amazonaws_keyspaces_partition_key_list(tokens)?
);
}
"clusteringKeys" => {
builder = builder.set_clustering_keys(
crate::json_deser::deser_list_com_amazonaws_keyspaces_clustering_key_list(tokens)?
);
}
"staticColumns" => {
builder = builder.set_static_columns(
crate::json_deser::deser_list_com_amazonaws_keyspaces_static_column_list(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn build(self) -> SchemaDefinition
pub fn build(self) -> SchemaDefinition
Consumes the builder and constructs a SchemaDefinition
.
Examples found in repository?
863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928
pub(crate) fn deser_structure_crate_model_schema_definition<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::SchemaDefinition>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::schema_definition::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"allColumns" => {
builder = builder.set_all_columns(
crate::json_deser::deser_list_com_amazonaws_keyspaces_column_definition_list(tokens)?
);
}
"partitionKeys" => {
builder = builder.set_partition_keys(
crate::json_deser::deser_list_com_amazonaws_keyspaces_partition_key_list(tokens)?
);
}
"clusteringKeys" => {
builder = builder.set_clustering_keys(
crate::json_deser::deser_list_com_amazonaws_keyspaces_clustering_key_list(tokens)?
);
}
"staticColumns" => {
builder = builder.set_static_columns(
crate::json_deser::deser_list_com_amazonaws_keyspaces_static_column_list(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}