aws-sdk-elastictranscoder 1.99.0

AWS SDK for Amazon Elastic Transcoder
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The <code>Permission</code> structure.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Permission {
    /// <p>The type of value that appears in the Grantee object:</p>
    /// <ul>
    /// <li>
    /// <p><code>Canonical</code>: Either the canonical user ID for an AWS account or an origin access identity for an Amazon CloudFront distribution.</p><important>
    /// <p>A canonical user ID is not the same as an AWS account number.</p>
    /// </important></li>
    /// <li>
    /// <p><code>Email</code>: The registered email address of an AWS account.</p></li>
    /// <li>
    /// <p><code>Group</code>: One of the following predefined Amazon S3 groups: <code>AllUsers</code>, <code>AuthenticatedUsers</code>, or <code>LogDelivery</code>.</p></li>
    /// </ul>
    pub grantee_type: ::std::option::Option<::std::string::String>,
    /// <p>The AWS user or group that you want to have access to transcoded files and playlists. To identify the user or group, you can specify the canonical user ID for an AWS account, an origin access identity for a CloudFront distribution, the registered email address of an AWS account, or a predefined Amazon S3 group.</p>
    pub grantee: ::std::option::Option<::std::string::String>,
    /// <p>The permission that you want to give to the AWS user that is listed in Grantee. Valid values include:</p>
    /// <ul>
    /// <li>
    /// <p><code>READ</code>: The grantee can read the thumbnails and metadata for thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p></li>
    /// <li>
    /// <p><code>READ_ACP</code>: The grantee can read the object ACL for thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p></li>
    /// <li>
    /// <p><code>WRITE_ACP</code>: The grantee can write the ACL for the thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p></li>
    /// <li>
    /// <p><code>FULL_CONTROL</code>: The grantee has READ, READ_ACP, and WRITE_ACP permissions for the thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p></li>
    /// </ul>
    pub access: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl Permission {
    /// <p>The type of value that appears in the Grantee object:</p>
    /// <ul>
    /// <li>
    /// <p><code>Canonical</code>: Either the canonical user ID for an AWS account or an origin access identity for an Amazon CloudFront distribution.</p><important>
    /// <p>A canonical user ID is not the same as an AWS account number.</p>
    /// </important></li>
    /// <li>
    /// <p><code>Email</code>: The registered email address of an AWS account.</p></li>
    /// <li>
    /// <p><code>Group</code>: One of the following predefined Amazon S3 groups: <code>AllUsers</code>, <code>AuthenticatedUsers</code>, or <code>LogDelivery</code>.</p></li>
    /// </ul>
    pub fn grantee_type(&self) -> ::std::option::Option<&str> {
        self.grantee_type.as_deref()
    }
    /// <p>The AWS user or group that you want to have access to transcoded files and playlists. To identify the user or group, you can specify the canonical user ID for an AWS account, an origin access identity for a CloudFront distribution, the registered email address of an AWS account, or a predefined Amazon S3 group.</p>
    pub fn grantee(&self) -> ::std::option::Option<&str> {
        self.grantee.as_deref()
    }
    /// <p>The permission that you want to give to the AWS user that is listed in Grantee. Valid values include:</p>
    /// <ul>
    /// <li>
    /// <p><code>READ</code>: The grantee can read the thumbnails and metadata for thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p></li>
    /// <li>
    /// <p><code>READ_ACP</code>: The grantee can read the object ACL for thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p></li>
    /// <li>
    /// <p><code>WRITE_ACP</code>: The grantee can write the ACL for the thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p></li>
    /// <li>
    /// <p><code>FULL_CONTROL</code>: The grantee has READ, READ_ACP, and WRITE_ACP permissions for the thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p></li>
    /// </ul>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.access.is_none()`.
    pub fn access(&self) -> &[::std::string::String] {
        self.access.as_deref().unwrap_or_default()
    }
}
impl Permission {
    /// Creates a new builder-style object to manufacture [`Permission`](crate::types::Permission).
    pub fn builder() -> crate::types::builders::PermissionBuilder {
        crate::types::builders::PermissionBuilder::default()
    }
}

/// A builder for [`Permission`](crate::types::Permission).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct PermissionBuilder {
    pub(crate) grantee_type: ::std::option::Option<::std::string::String>,
    pub(crate) grantee: ::std::option::Option<::std::string::String>,
    pub(crate) access: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl PermissionBuilder {
    /// <p>The type of value that appears in the Grantee object:</p>
    /// <ul>
    /// <li>
    /// <p><code>Canonical</code>: Either the canonical user ID for an AWS account or an origin access identity for an Amazon CloudFront distribution.</p><important>
    /// <p>A canonical user ID is not the same as an AWS account number.</p>
    /// </important></li>
    /// <li>
    /// <p><code>Email</code>: The registered email address of an AWS account.</p></li>
    /// <li>
    /// <p><code>Group</code>: One of the following predefined Amazon S3 groups: <code>AllUsers</code>, <code>AuthenticatedUsers</code>, or <code>LogDelivery</code>.</p></li>
    /// </ul>
    pub fn grantee_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.grantee_type = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The type of value that appears in the Grantee object:</p>
    /// <ul>
    /// <li>
    /// <p><code>Canonical</code>: Either the canonical user ID for an AWS account or an origin access identity for an Amazon CloudFront distribution.</p><important>
    /// <p>A canonical user ID is not the same as an AWS account number.</p>
    /// </important></li>
    /// <li>
    /// <p><code>Email</code>: The registered email address of an AWS account.</p></li>
    /// <li>
    /// <p><code>Group</code>: One of the following predefined Amazon S3 groups: <code>AllUsers</code>, <code>AuthenticatedUsers</code>, or <code>LogDelivery</code>.</p></li>
    /// </ul>
    pub fn set_grantee_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.grantee_type = input;
        self
    }
    /// <p>The type of value that appears in the Grantee object:</p>
    /// <ul>
    /// <li>
    /// <p><code>Canonical</code>: Either the canonical user ID for an AWS account or an origin access identity for an Amazon CloudFront distribution.</p><important>
    /// <p>A canonical user ID is not the same as an AWS account number.</p>
    /// </important></li>
    /// <li>
    /// <p><code>Email</code>: The registered email address of an AWS account.</p></li>
    /// <li>
    /// <p><code>Group</code>: One of the following predefined Amazon S3 groups: <code>AllUsers</code>, <code>AuthenticatedUsers</code>, or <code>LogDelivery</code>.</p></li>
    /// </ul>
    pub fn get_grantee_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.grantee_type
    }
    /// <p>The AWS user or group that you want to have access to transcoded files and playlists. To identify the user or group, you can specify the canonical user ID for an AWS account, an origin access identity for a CloudFront distribution, the registered email address of an AWS account, or a predefined Amazon S3 group.</p>
    pub fn grantee(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.grantee = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The AWS user or group that you want to have access to transcoded files and playlists. To identify the user or group, you can specify the canonical user ID for an AWS account, an origin access identity for a CloudFront distribution, the registered email address of an AWS account, or a predefined Amazon S3 group.</p>
    pub fn set_grantee(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.grantee = input;
        self
    }
    /// <p>The AWS user or group that you want to have access to transcoded files and playlists. To identify the user or group, you can specify the canonical user ID for an AWS account, an origin access identity for a CloudFront distribution, the registered email address of an AWS account, or a predefined Amazon S3 group.</p>
    pub fn get_grantee(&self) -> &::std::option::Option<::std::string::String> {
        &self.grantee
    }
    /// Appends an item to `access`.
    ///
    /// To override the contents of this collection use [`set_access`](Self::set_access).
    ///
    /// <p>The permission that you want to give to the AWS user that is listed in Grantee. Valid values include:</p>
    /// <ul>
    /// <li>
    /// <p><code>READ</code>: The grantee can read the thumbnails and metadata for thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p></li>
    /// <li>
    /// <p><code>READ_ACP</code>: The grantee can read the object ACL for thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p></li>
    /// <li>
    /// <p><code>WRITE_ACP</code>: The grantee can write the ACL for the thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p></li>
    /// <li>
    /// <p><code>FULL_CONTROL</code>: The grantee has READ, READ_ACP, and WRITE_ACP permissions for the thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p></li>
    /// </ul>
    pub fn access(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.access.unwrap_or_default();
        v.push(input.into());
        self.access = ::std::option::Option::Some(v);
        self
    }
    /// <p>The permission that you want to give to the AWS user that is listed in Grantee. Valid values include:</p>
    /// <ul>
    /// <li>
    /// <p><code>READ</code>: The grantee can read the thumbnails and metadata for thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p></li>
    /// <li>
    /// <p><code>READ_ACP</code>: The grantee can read the object ACL for thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p></li>
    /// <li>
    /// <p><code>WRITE_ACP</code>: The grantee can write the ACL for the thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p></li>
    /// <li>
    /// <p><code>FULL_CONTROL</code>: The grantee has READ, READ_ACP, and WRITE_ACP permissions for the thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p></li>
    /// </ul>
    pub fn set_access(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.access = input;
        self
    }
    /// <p>The permission that you want to give to the AWS user that is listed in Grantee. Valid values include:</p>
    /// <ul>
    /// <li>
    /// <p><code>READ</code>: The grantee can read the thumbnails and metadata for thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p></li>
    /// <li>
    /// <p><code>READ_ACP</code>: The grantee can read the object ACL for thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p></li>
    /// <li>
    /// <p><code>WRITE_ACP</code>: The grantee can write the ACL for the thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p></li>
    /// <li>
    /// <p><code>FULL_CONTROL</code>: The grantee has READ, READ_ACP, and WRITE_ACP permissions for the thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p></li>
    /// </ul>
    pub fn get_access(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.access
    }
    /// Consumes the builder and constructs a [`Permission`](crate::types::Permission).
    pub fn build(self) -> crate::types::Permission {
        crate::types::Permission {
            grantee_type: self.grantee_type,
            grantee: self.grantee,
            access: self.access,
        }
    }
}