aws-sdk-mediaconvert 1.55.0

AWS SDK for AWS Elemental MediaConvert
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct PutPolicyInput {
    /// A policy configures behavior that you allow or disallow for your account. For information about MediaConvert policies, see the user guide at http://docs.aws.amazon.com/mediaconvert/latest/ug/what-is.html
    pub policy: ::std::option::Option<crate::types::Policy>,
}
impl PutPolicyInput {
    /// A policy configures behavior that you allow or disallow for your account. For information about MediaConvert policies, see the user guide at http://docs.aws.amazon.com/mediaconvert/latest/ug/what-is.html
    pub fn policy(&self) -> ::std::option::Option<&crate::types::Policy> {
        self.policy.as_ref()
    }
}
impl PutPolicyInput {
    /// Creates a new builder-style object to manufacture [`PutPolicyInput`](crate::operation::put_policy::PutPolicyInput).
    pub fn builder() -> crate::operation::put_policy::builders::PutPolicyInputBuilder {
        crate::operation::put_policy::builders::PutPolicyInputBuilder::default()
    }
}

/// A builder for [`PutPolicyInput`](crate::operation::put_policy::PutPolicyInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct PutPolicyInputBuilder {
    pub(crate) policy: ::std::option::Option<crate::types::Policy>,
}
impl PutPolicyInputBuilder {
    /// A policy configures behavior that you allow or disallow for your account. For information about MediaConvert policies, see the user guide at http://docs.aws.amazon.com/mediaconvert/latest/ug/what-is.html
    /// This field is required.
    pub fn policy(mut self, input: crate::types::Policy) -> Self {
        self.policy = ::std::option::Option::Some(input);
        self
    }
    /// A policy configures behavior that you allow or disallow for your account. For information about MediaConvert policies, see the user guide at http://docs.aws.amazon.com/mediaconvert/latest/ug/what-is.html
    pub fn set_policy(mut self, input: ::std::option::Option<crate::types::Policy>) -> Self {
        self.policy = input;
        self
    }
    /// A policy configures behavior that you allow or disallow for your account. For information about MediaConvert policies, see the user guide at http://docs.aws.amazon.com/mediaconvert/latest/ug/what-is.html
    pub fn get_policy(&self) -> &::std::option::Option<crate::types::Policy> {
        &self.policy
    }
    /// Consumes the builder and constructs a [`PutPolicyInput`](crate::operation::put_policy::PutPolicyInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::put_policy::PutPolicyInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::put_policy::PutPolicyInput { policy: self.policy })
    }
}