aws-sdk-mediaconnect 0.27.0

AWS SDK for AWS MediaConnect
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 RevokeFlowEntitlementInput {
    /// The ARN of the entitlement that you want to revoke.
    #[doc(hidden)]
    pub entitlement_arn: std::option::Option<std::string::String>,
    /// The flow that you want to revoke an entitlement from.
    #[doc(hidden)]
    pub flow_arn: std::option::Option<std::string::String>,
}
impl RevokeFlowEntitlementInput {
    /// The ARN of the entitlement that you want to revoke.
    pub fn entitlement_arn(&self) -> std::option::Option<&str> {
        self.entitlement_arn.as_deref()
    }
    /// The flow that you want to revoke an entitlement from.
    pub fn flow_arn(&self) -> std::option::Option<&str> {
        self.flow_arn.as_deref()
    }
}
impl RevokeFlowEntitlementInput {
    /// Creates a new builder-style object to manufacture [`RevokeFlowEntitlementInput`](crate::operation::revoke_flow_entitlement::RevokeFlowEntitlementInput).
    pub fn builder(
    ) -> crate::operation::revoke_flow_entitlement::builders::RevokeFlowEntitlementInputBuilder
    {
        crate::operation::revoke_flow_entitlement::builders::RevokeFlowEntitlementInputBuilder::default()
    }
}

/// A builder for [`RevokeFlowEntitlementInput`](crate::operation::revoke_flow_entitlement::RevokeFlowEntitlementInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct RevokeFlowEntitlementInputBuilder {
    pub(crate) entitlement_arn: std::option::Option<std::string::String>,
    pub(crate) flow_arn: std::option::Option<std::string::String>,
}
impl RevokeFlowEntitlementInputBuilder {
    /// The ARN of the entitlement that you want to revoke.
    pub fn entitlement_arn(mut self, input: impl Into<std::string::String>) -> Self {
        self.entitlement_arn = Some(input.into());
        self
    }
    /// The ARN of the entitlement that you want to revoke.
    pub fn set_entitlement_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.entitlement_arn = input;
        self
    }
    /// The flow that you want to revoke an entitlement from.
    pub fn flow_arn(mut self, input: impl Into<std::string::String>) -> Self {
        self.flow_arn = Some(input.into());
        self
    }
    /// The flow that you want to revoke an entitlement from.
    pub fn set_flow_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.flow_arn = input;
        self
    }
    /// Consumes the builder and constructs a [`RevokeFlowEntitlementInput`](crate::operation::revoke_flow_entitlement::RevokeFlowEntitlementInput).
    pub fn build(
        self,
    ) -> Result<
        crate::operation::revoke_flow_entitlement::RevokeFlowEntitlementInput,
        aws_smithy_http::operation::error::BuildError,
    > {
        Ok(
            crate::operation::revoke_flow_entitlement::RevokeFlowEntitlementInput {
                entitlement_arn: self.entitlement_arn,
                flow_arn: self.flow_arn,
            },
        )
    }
}