aws-sdk-mediaconnect 0.25.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 GrantFlowEntitlementsOutput {
    /// The entitlements that were just granted.
    #[doc(hidden)]
    pub entitlements: std::option::Option<std::vec::Vec<crate::types::Entitlement>>,
    /// The ARN of the flow that these entitlements were granted to.
    #[doc(hidden)]
    pub flow_arn: std::option::Option<std::string::String>,
    _request_id: Option<String>,
}
impl GrantFlowEntitlementsOutput {
    /// The entitlements that were just granted.
    pub fn entitlements(&self) -> std::option::Option<&[crate::types::Entitlement]> {
        self.entitlements.as_deref()
    }
    /// The ARN of the flow that these entitlements were granted to.
    pub fn flow_arn(&self) -> std::option::Option<&str> {
        self.flow_arn.as_deref()
    }
}
impl aws_http::request_id::RequestId for GrantFlowEntitlementsOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GrantFlowEntitlementsOutput {
    /// Creates a new builder-style object to manufacture [`GrantFlowEntitlementsOutput`](crate::operation::grant_flow_entitlements::GrantFlowEntitlementsOutput).
    pub fn builder(
    ) -> crate::operation::grant_flow_entitlements::builders::GrantFlowEntitlementsOutputBuilder
    {
        crate::operation::grant_flow_entitlements::builders::GrantFlowEntitlementsOutputBuilder::default()
    }
}

/// A builder for [`GrantFlowEntitlementsOutput`](crate::operation::grant_flow_entitlements::GrantFlowEntitlementsOutput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct GrantFlowEntitlementsOutputBuilder {
    pub(crate) entitlements: std::option::Option<std::vec::Vec<crate::types::Entitlement>>,
    pub(crate) flow_arn: std::option::Option<std::string::String>,
    _request_id: Option<String>,
}
impl GrantFlowEntitlementsOutputBuilder {
    /// Appends an item to `entitlements`.
    ///
    /// To override the contents of this collection use [`set_entitlements`](Self::set_entitlements).
    ///
    /// The entitlements that were just granted.
    pub fn entitlements(mut self, input: crate::types::Entitlement) -> Self {
        let mut v = self.entitlements.unwrap_or_default();
        v.push(input);
        self.entitlements = Some(v);
        self
    }
    /// The entitlements that were just granted.
    pub fn set_entitlements(
        mut self,
        input: std::option::Option<std::vec::Vec<crate::types::Entitlement>>,
    ) -> Self {
        self.entitlements = input;
        self
    }
    /// The ARN of the flow that these entitlements were granted to.
    pub fn flow_arn(mut self, input: impl Into<std::string::String>) -> Self {
        self.flow_arn = Some(input.into());
        self
    }
    /// The ARN of the flow that these entitlements were granted to.
    pub fn set_flow_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.flow_arn = input;
        self
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`GrantFlowEntitlementsOutput`](crate::operation::grant_flow_entitlements::GrantFlowEntitlementsOutput).
    pub fn build(self) -> crate::operation::grant_flow_entitlements::GrantFlowEntitlementsOutput {
        crate::operation::grant_flow_entitlements::GrantFlowEntitlementsOutput {
            entitlements: self.entitlements,
            flow_arn: self.flow_arn,
            _request_id: self._request_id,
        }
    }
}