#[allow(dead_code)]
pub fn to_dafny(
value: &aws_sdk_dynamodb::operation::query::QueryInput,
) -> ::dafny_runtime::Rc<
crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::QueryInput,
> {
::dafny_runtime::Rc::new(crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::QueryInput::QueryInput {
TableName: crate::standard_library_conversions::ostring_to_dafny(&value.table_name) .Extract(),
IndexName: crate::standard_library_conversions::ostring_to_dafny(&value.index_name),
Select: ::dafny_runtime::Rc::new(match &value.select {
Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::select::to_dafny(x.clone()) },
None => crate::_Wrappers_Compile::Option::None { }
})
,
AttributesToGet: ::dafny_runtime::Rc::new(match &value.attributes_to_get {
Some(x) => crate::r#_Wrappers_Compile::Option::Some { value :
::dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(x,
|e| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&e),
)
},
None => crate::r#_Wrappers_Compile::Option::None {}
})
,
Limit: crate::standard_library_conversions::oint_to_dafny(value.limit),
ConsistentRead: crate::standard_library_conversions::obool_to_dafny(&value.consistent_read),
KeyConditions:
::dafny_runtime::Rc::new(match &value.key_conditions {
Some(x) => crate::r#_Wrappers_Compile::Option::Some { value :
::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x,
|k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k),
|v| crate::deps::com_amazonaws_dynamodb::conversions::condition::to_dafny(v)
,
)
},
None => crate::r#_Wrappers_Compile::Option::None {}
})
,
QueryFilter:
::dafny_runtime::Rc::new(match &value.query_filter {
Some(x) => crate::r#_Wrappers_Compile::Option::Some { value :
::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x,
|k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k),
|v| crate::deps::com_amazonaws_dynamodb::conversions::condition::to_dafny(v)
,
)
},
None => crate::r#_Wrappers_Compile::Option::None {}
})
,
ConditionalOperator: ::dafny_runtime::Rc::new(match &value.conditional_operator {
Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::conditional_operator::to_dafny(x.clone()) },
None => crate::_Wrappers_Compile::Option::None { }
})
,
ScanIndexForward: crate::standard_library_conversions::obool_to_dafny(&value.scan_index_forward),
ExclusiveStartKey:
::dafny_runtime::Rc::new(match &value.exclusive_start_key {
Some(x) => crate::r#_Wrappers_Compile::Option::Some { value :
::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x,
|k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k),
|v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v)
,
)
},
None => crate::r#_Wrappers_Compile::Option::None {}
})
,
ReturnConsumedCapacity: ::dafny_runtime::Rc::new(match &value.return_consumed_capacity {
Some(x) => crate::_Wrappers_Compile::Option::Some { value: crate::deps::com_amazonaws_dynamodb::conversions::return_consumed_capacity::to_dafny(x.clone()) },
None => crate::_Wrappers_Compile::Option::None { }
})
,
ProjectionExpression: crate::standard_library_conversions::ostring_to_dafny(&value.projection_expression),
FilterExpression: crate::standard_library_conversions::ostring_to_dafny(&value.filter_expression),
KeyConditionExpression: crate::standard_library_conversions::ostring_to_dafny(&value.key_condition_expression),
ExpressionAttributeNames:
::dafny_runtime::Rc::new(match &value.expression_attribute_names {
Some(x) => crate::r#_Wrappers_Compile::Option::Some { value :
::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x,
|k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k),
|v| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&v),
)
},
None => crate::r#_Wrappers_Compile::Option::None {}
})
,
ExpressionAttributeValues:
::dafny_runtime::Rc::new(match &value.expression_attribute_values {
Some(x) => crate::r#_Wrappers_Compile::Option::Some { value :
::dafny_runtime::dafny_runtime_conversions::hashmap_to_dafny_map(x,
|k| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&k),
|v| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::to_dafny(v)
,
)
},
None => crate::r#_Wrappers_Compile::Option::None {}
})
,
})
}
#[allow(dead_code)]
pub fn from_dafny(
dafny_value: ::dafny_runtime::Rc<
crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::QueryInput,
>,
) -> aws_sdk_dynamodb::operation::query::QueryInput {
aws_sdk_dynamodb::operation::query::QueryInput::builder()
.set_table_name(Some( dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(dafny_value.TableName()) ))
.set_index_name(crate::standard_library_conversions::ostring_from_dafny(dafny_value.IndexName().clone()))
.set_select(match &**dafny_value.Select() {
crate::r#_Wrappers_Compile::Option::Some { value } => Some(
crate::deps::com_amazonaws_dynamodb::conversions::select::from_dafny(value)
),
_ => None,
}
)
.set_attributes_to_get(match (*dafny_value.AttributesToGet()).as_ref() {
crate::r#_Wrappers_Compile::Option::Some { value } =>
Some(
::dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(value,
|e: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(e),
)
),
_ => None
}
)
.set_limit(crate::standard_library_conversions::oint_from_dafny(dafny_value.Limit().clone()))
.set_consistent_read(crate::standard_library_conversions::obool_from_dafny(dafny_value.ConsistentRead().clone()))
.set_key_conditions(match (*dafny_value.KeyConditions()).as_ref() {
crate::r#_Wrappers_Compile::Option::Some { value } =>
Some(
::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value,
|k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k),
|v: &::dafny_runtime::Rc<crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Condition>| crate::deps::com_amazonaws_dynamodb::conversions::condition::from_dafny(v.clone())
,
)
),
_ => None
}
)
.set_query_filter(match (*dafny_value.QueryFilter()).as_ref() {
crate::r#_Wrappers_Compile::Option::Some { value } =>
Some(
::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value,
|k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k),
|v: &::dafny_runtime::Rc<crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::Condition>| crate::deps::com_amazonaws_dynamodb::conversions::condition::from_dafny(v.clone())
,
)
),
_ => None
}
)
.set_conditional_operator(match &**dafny_value.ConditionalOperator() {
crate::r#_Wrappers_Compile::Option::Some { value } => Some(
crate::deps::com_amazonaws_dynamodb::conversions::conditional_operator::from_dafny(value)
),
_ => None,
}
)
.set_scan_index_forward(crate::standard_library_conversions::obool_from_dafny(dafny_value.ScanIndexForward().clone()))
.set_exclusive_start_key(match (*dafny_value.ExclusiveStartKey()).as_ref() {
crate::r#_Wrappers_Compile::Option::Some { value } =>
Some(
::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value,
|k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k),
|v: &::dafny_runtime::Rc<crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeValue>| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(v.clone())
,
)
),
_ => None
}
)
.set_return_consumed_capacity(match &**dafny_value.ReturnConsumedCapacity() {
crate::r#_Wrappers_Compile::Option::Some { value } => Some(
crate::deps::com_amazonaws_dynamodb::conversions::return_consumed_capacity::from_dafny(value)
),
_ => None,
}
)
.set_projection_expression(crate::standard_library_conversions::ostring_from_dafny(dafny_value.ProjectionExpression().clone()))
.set_filter_expression(crate::standard_library_conversions::ostring_from_dafny(dafny_value.FilterExpression().clone()))
.set_key_condition_expression(crate::standard_library_conversions::ostring_from_dafny(dafny_value.KeyConditionExpression().clone()))
.set_expression_attribute_names(match (*dafny_value.ExpressionAttributeNames()).as_ref() {
crate::r#_Wrappers_Compile::Option::Some { value } =>
Some(
::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value,
|k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k),
|v: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(v),
)
),
_ => None
}
)
.set_expression_attribute_values(match (*dafny_value.ExpressionAttributeValues()).as_ref() {
crate::r#_Wrappers_Compile::Option::Some { value } =>
Some(
::dafny_runtime::dafny_runtime_conversions::dafny_map_to_hashmap(value,
|k: &::dafny_runtime::dafny_runtime_conversions::DafnySequence<::dafny_runtime::dafny_runtime_conversions::DafnyCharUTF16>| dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(k),
|v: &::dafny_runtime::Rc<crate::r#software::amazon::cryptography::services::dynamodb::internaldafny::types::AttributeValue>| crate::deps::com_amazonaws_dynamodb::conversions::attribute_value::from_dafny(v.clone())
,
)
),
_ => None
}
)
.build()
.unwrap()
}