aws-sdk-managedblockchain 1.98.0

AWS SDK for Amazon Managed Blockchain
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 CreateAccessorInput {
    /// <p>This is a unique, case-sensitive identifier that you provide to ensure the idempotency of the operation. An idempotent operation completes no more than once. This identifier is required only if you make a service request directly using an HTTP client. It is generated automatically if you use an Amazon Web Services SDK or the Amazon Web Services CLI.</p>
    pub client_request_token: ::std::option::Option<::std::string::String>,
    /// <p>The type of accessor.</p><note>
    /// <p>Currently, accessor type is restricted to <code>BILLING_TOKEN</code>.</p>
    /// </note>
    pub accessor_type: ::std::option::Option<crate::types::AccessorType>,
    /// <p>Tags to assign to the Accessor.</p>
    /// <p>Each tag consists of a key and an optional value. You can specify multiple key-value pairs in a single request with an overall maximum of 50 tags allowed per resource.</p>
    /// <p>For more information about tags, see <a href="https://docs.aws.amazon.com/managed-blockchain/latest/ethereum-dev/tagging-resources.html">Tagging Resources</a> in the <i>Amazon Managed Blockchain Ethereum Developer Guide</i>, or <a href="https://docs.aws.amazon.com/managed-blockchain/latest/hyperledger-fabric-dev/tagging-resources.html">Tagging Resources</a> in the <i>Amazon Managed Blockchain Hyperledger Fabric Developer Guide</i>.</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>The blockchain network that the <code>Accessor</code> token is created for.</p><note>
    /// <ul>
    /// <li>
    /// <p>Use the actual <code>networkType</code> value for the blockchain network that you are creating the <code>Accessor</code> token for.</p></li>
    /// <li>
    /// <p>With the shut down of the <i>Ethereum Goerli</i> and <i>Polygon Mumbai Testnet</i> networks the following <code>networkType</code> values are no longer available for selection and use.</p>
    /// <ul>
    /// <li>
    /// <p><code>ETHEREUM_MAINNET_AND_GOERLI</code></p></li>
    /// <li>
    /// <p><code>ETHEREUM_GOERLI</code></p></li>
    /// <li>
    /// <p><code>POLYGON_MUMBAI</code></p></li>
    /// </ul>
    /// <p>However, your existing <code>Accessor</code> tokens with these <code>networkType</code> values will remain unchanged.</p></li>
    /// </ul>
    /// </note>
    pub network_type: ::std::option::Option<crate::types::AccessorNetworkType>,
}
impl CreateAccessorInput {
    /// <p>This is a unique, case-sensitive identifier that you provide to ensure the idempotency of the operation. An idempotent operation completes no more than once. This identifier is required only if you make a service request directly using an HTTP client. It is generated automatically if you use an Amazon Web Services SDK or the Amazon Web Services CLI.</p>
    pub fn client_request_token(&self) -> ::std::option::Option<&str> {
        self.client_request_token.as_deref()
    }
    /// <p>The type of accessor.</p><note>
    /// <p>Currently, accessor type is restricted to <code>BILLING_TOKEN</code>.</p>
    /// </note>
    pub fn accessor_type(&self) -> ::std::option::Option<&crate::types::AccessorType> {
        self.accessor_type.as_ref()
    }
    /// <p>Tags to assign to the Accessor.</p>
    /// <p>Each tag consists of a key and an optional value. You can specify multiple key-value pairs in a single request with an overall maximum of 50 tags allowed per resource.</p>
    /// <p>For more information about tags, see <a href="https://docs.aws.amazon.com/managed-blockchain/latest/ethereum-dev/tagging-resources.html">Tagging Resources</a> in the <i>Amazon Managed Blockchain Ethereum Developer Guide</i>, or <a href="https://docs.aws.amazon.com/managed-blockchain/latest/hyperledger-fabric-dev/tagging-resources.html">Tagging Resources</a> in the <i>Amazon Managed Blockchain Hyperledger Fabric Developer Guide</i>.</p>
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
    /// <p>The blockchain network that the <code>Accessor</code> token is created for.</p><note>
    /// <ul>
    /// <li>
    /// <p>Use the actual <code>networkType</code> value for the blockchain network that you are creating the <code>Accessor</code> token for.</p></li>
    /// <li>
    /// <p>With the shut down of the <i>Ethereum Goerli</i> and <i>Polygon Mumbai Testnet</i> networks the following <code>networkType</code> values are no longer available for selection and use.</p>
    /// <ul>
    /// <li>
    /// <p><code>ETHEREUM_MAINNET_AND_GOERLI</code></p></li>
    /// <li>
    /// <p><code>ETHEREUM_GOERLI</code></p></li>
    /// <li>
    /// <p><code>POLYGON_MUMBAI</code></p></li>
    /// </ul>
    /// <p>However, your existing <code>Accessor</code> tokens with these <code>networkType</code> values will remain unchanged.</p></li>
    /// </ul>
    /// </note>
    pub fn network_type(&self) -> ::std::option::Option<&crate::types::AccessorNetworkType> {
        self.network_type.as_ref()
    }
}
impl CreateAccessorInput {
    /// Creates a new builder-style object to manufacture [`CreateAccessorInput`](crate::operation::create_accessor::CreateAccessorInput).
    pub fn builder() -> crate::operation::create_accessor::builders::CreateAccessorInputBuilder {
        crate::operation::create_accessor::builders::CreateAccessorInputBuilder::default()
    }
}

/// A builder for [`CreateAccessorInput`](crate::operation::create_accessor::CreateAccessorInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateAccessorInputBuilder {
    pub(crate) client_request_token: ::std::option::Option<::std::string::String>,
    pub(crate) accessor_type: ::std::option::Option<crate::types::AccessorType>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) network_type: ::std::option::Option<crate::types::AccessorNetworkType>,
}
impl CreateAccessorInputBuilder {
    /// <p>This is a unique, case-sensitive identifier that you provide to ensure the idempotency of the operation. An idempotent operation completes no more than once. This identifier is required only if you make a service request directly using an HTTP client. It is generated automatically if you use an Amazon Web Services SDK or the Amazon Web Services CLI.</p>
    /// This field is required.
    pub fn client_request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_request_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>This is a unique, case-sensitive identifier that you provide to ensure the idempotency of the operation. An idempotent operation completes no more than once. This identifier is required only if you make a service request directly using an HTTP client. It is generated automatically if you use an Amazon Web Services SDK or the Amazon Web Services CLI.</p>
    pub fn set_client_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_request_token = input;
        self
    }
    /// <p>This is a unique, case-sensitive identifier that you provide to ensure the idempotency of the operation. An idempotent operation completes no more than once. This identifier is required only if you make a service request directly using an HTTP client. It is generated automatically if you use an Amazon Web Services SDK or the Amazon Web Services CLI.</p>
    pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_request_token
    }
    /// <p>The type of accessor.</p><note>
    /// <p>Currently, accessor type is restricted to <code>BILLING_TOKEN</code>.</p>
    /// </note>
    /// This field is required.
    pub fn accessor_type(mut self, input: crate::types::AccessorType) -> Self {
        self.accessor_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of accessor.</p><note>
    /// <p>Currently, accessor type is restricted to <code>BILLING_TOKEN</code>.</p>
    /// </note>
    pub fn set_accessor_type(mut self, input: ::std::option::Option<crate::types::AccessorType>) -> Self {
        self.accessor_type = input;
        self
    }
    /// <p>The type of accessor.</p><note>
    /// <p>Currently, accessor type is restricted to <code>BILLING_TOKEN</code>.</p>
    /// </note>
    pub fn get_accessor_type(&self) -> &::std::option::Option<crate::types::AccessorType> {
        &self.accessor_type
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>Tags to assign to the Accessor.</p>
    /// <p>Each tag consists of a key and an optional value. You can specify multiple key-value pairs in a single request with an overall maximum of 50 tags allowed per resource.</p>
    /// <p>For more information about tags, see <a href="https://docs.aws.amazon.com/managed-blockchain/latest/ethereum-dev/tagging-resources.html">Tagging Resources</a> in the <i>Amazon Managed Blockchain Ethereum Developer Guide</i>, or <a href="https://docs.aws.amazon.com/managed-blockchain/latest/hyperledger-fabric-dev/tagging-resources.html">Tagging Resources</a> in the <i>Amazon Managed Blockchain Hyperledger Fabric Developer Guide</i>.</p>
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>Tags to assign to the Accessor.</p>
    /// <p>Each tag consists of a key and an optional value. You can specify multiple key-value pairs in a single request with an overall maximum of 50 tags allowed per resource.</p>
    /// <p>For more information about tags, see <a href="https://docs.aws.amazon.com/managed-blockchain/latest/ethereum-dev/tagging-resources.html">Tagging Resources</a> in the <i>Amazon Managed Blockchain Ethereum Developer Guide</i>, or <a href="https://docs.aws.amazon.com/managed-blockchain/latest/hyperledger-fabric-dev/tagging-resources.html">Tagging Resources</a> in the <i>Amazon Managed Blockchain Hyperledger Fabric Developer Guide</i>.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>Tags to assign to the Accessor.</p>
    /// <p>Each tag consists of a key and an optional value. You can specify multiple key-value pairs in a single request with an overall maximum of 50 tags allowed per resource.</p>
    /// <p>For more information about tags, see <a href="https://docs.aws.amazon.com/managed-blockchain/latest/ethereum-dev/tagging-resources.html">Tagging Resources</a> in the <i>Amazon Managed Blockchain Ethereum Developer Guide</i>, or <a href="https://docs.aws.amazon.com/managed-blockchain/latest/hyperledger-fabric-dev/tagging-resources.html">Tagging Resources</a> in the <i>Amazon Managed Blockchain Hyperledger Fabric Developer Guide</i>.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// <p>The blockchain network that the <code>Accessor</code> token is created for.</p><note>
    /// <ul>
    /// <li>
    /// <p>Use the actual <code>networkType</code> value for the blockchain network that you are creating the <code>Accessor</code> token for.</p></li>
    /// <li>
    /// <p>With the shut down of the <i>Ethereum Goerli</i> and <i>Polygon Mumbai Testnet</i> networks the following <code>networkType</code> values are no longer available for selection and use.</p>
    /// <ul>
    /// <li>
    /// <p><code>ETHEREUM_MAINNET_AND_GOERLI</code></p></li>
    /// <li>
    /// <p><code>ETHEREUM_GOERLI</code></p></li>
    /// <li>
    /// <p><code>POLYGON_MUMBAI</code></p></li>
    /// </ul>
    /// <p>However, your existing <code>Accessor</code> tokens with these <code>networkType</code> values will remain unchanged.</p></li>
    /// </ul>
    /// </note>
    pub fn network_type(mut self, input: crate::types::AccessorNetworkType) -> Self {
        self.network_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The blockchain network that the <code>Accessor</code> token is created for.</p><note>
    /// <ul>
    /// <li>
    /// <p>Use the actual <code>networkType</code> value for the blockchain network that you are creating the <code>Accessor</code> token for.</p></li>
    /// <li>
    /// <p>With the shut down of the <i>Ethereum Goerli</i> and <i>Polygon Mumbai Testnet</i> networks the following <code>networkType</code> values are no longer available for selection and use.</p>
    /// <ul>
    /// <li>
    /// <p><code>ETHEREUM_MAINNET_AND_GOERLI</code></p></li>
    /// <li>
    /// <p><code>ETHEREUM_GOERLI</code></p></li>
    /// <li>
    /// <p><code>POLYGON_MUMBAI</code></p></li>
    /// </ul>
    /// <p>However, your existing <code>Accessor</code> tokens with these <code>networkType</code> values will remain unchanged.</p></li>
    /// </ul>
    /// </note>
    pub fn set_network_type(mut self, input: ::std::option::Option<crate::types::AccessorNetworkType>) -> Self {
        self.network_type = input;
        self
    }
    /// <p>The blockchain network that the <code>Accessor</code> token is created for.</p><note>
    /// <ul>
    /// <li>
    /// <p>Use the actual <code>networkType</code> value for the blockchain network that you are creating the <code>Accessor</code> token for.</p></li>
    /// <li>
    /// <p>With the shut down of the <i>Ethereum Goerli</i> and <i>Polygon Mumbai Testnet</i> networks the following <code>networkType</code> values are no longer available for selection and use.</p>
    /// <ul>
    /// <li>
    /// <p><code>ETHEREUM_MAINNET_AND_GOERLI</code></p></li>
    /// <li>
    /// <p><code>ETHEREUM_GOERLI</code></p></li>
    /// <li>
    /// <p><code>POLYGON_MUMBAI</code></p></li>
    /// </ul>
    /// <p>However, your existing <code>Accessor</code> tokens with these <code>networkType</code> values will remain unchanged.</p></li>
    /// </ul>
    /// </note>
    pub fn get_network_type(&self) -> &::std::option::Option<crate::types::AccessorNetworkType> {
        &self.network_type
    }
    /// Consumes the builder and constructs a [`CreateAccessorInput`](crate::operation::create_accessor::CreateAccessorInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_accessor::CreateAccessorInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_accessor::CreateAccessorInput {
            client_request_token: self.client_request_token,
            accessor_type: self.accessor_type,
            tags: self.tags,
            network_type: self.network_type,
        })
    }
}