aws_sdk_verifiedpermissions/operation/put_schema/
_put_schema_input.rs#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct PutSchemaInput {
pub policy_store_id: ::std::option::Option<::std::string::String>,
pub definition: ::std::option::Option<crate::types::SchemaDefinition>,
}
impl PutSchemaInput {
pub fn policy_store_id(&self) -> ::std::option::Option<&str> {
self.policy_store_id.as_deref()
}
pub fn definition(&self) -> ::std::option::Option<&crate::types::SchemaDefinition> {
self.definition.as_ref()
}
}
impl PutSchemaInput {
pub fn builder() -> crate::operation::put_schema::builders::PutSchemaInputBuilder {
crate::operation::put_schema::builders::PutSchemaInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct PutSchemaInputBuilder {
pub(crate) policy_store_id: ::std::option::Option<::std::string::String>,
pub(crate) definition: ::std::option::Option<crate::types::SchemaDefinition>,
}
impl PutSchemaInputBuilder {
pub fn policy_store_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.policy_store_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_policy_store_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.policy_store_id = input;
self
}
pub fn get_policy_store_id(&self) -> &::std::option::Option<::std::string::String> {
&self.policy_store_id
}
pub fn definition(mut self, input: crate::types::SchemaDefinition) -> Self {
self.definition = ::std::option::Option::Some(input);
self
}
pub fn set_definition(mut self, input: ::std::option::Option<crate::types::SchemaDefinition>) -> Self {
self.definition = input;
self
}
pub fn get_definition(&self) -> &::std::option::Option<crate::types::SchemaDefinition> {
&self.definition
}
pub fn build(self) -> ::std::result::Result<crate::operation::put_schema::PutSchemaInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::put_schema::PutSchemaInput {
policy_store_id: self.policy_store_id,
definition: self.definition,
})
}
}