aws-sdk-agentregistrycontrol 1.7.0

AWS SDK for Agent Registry Control
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Request structure for creating a registry</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct CreateRegistryInput {
    /// <p>The name of the registry</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The description of the registry</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The optional server-side encryption configuration for the registry. When you provide this field, the specified customer-managed Amazon Web Services KMS key encrypts the registry's content. Omit this field to use an Amazon Web Services-owned encryption key. You cannot change the encryption configuration after registry creation.</p>
    pub encryption_configuration: ::std::option::Option<crate::types::EncryptionConfiguration>,
    /// <p>Discovery configuration for the registry</p>
    pub discovery_configuration: ::std::option::Option<crate::types::DiscoveryConfiguration>,
    /// <p>A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, the service ignores the request, but does not return an error.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
    /// <p>Tags to associate with the registry</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>Approval configuration for registry records</p>
    pub approval_configuration: ::std::option::Option<crate::types::ApprovalConfiguration>,
    /// <p>The optional auto-detection configuration for the registry. When provided, the registry is automatically populated with resources discovered according to the configuration. Omit this field for registries whose records are managed exclusively through the Agent Registry Control API.</p>
    pub auto_detection_configuration: ::std::option::Option<crate::types::AutoDetectionConfiguration>,
}
impl CreateRegistryInput {
    /// <p>The name of the registry</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The description of the registry</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The optional server-side encryption configuration for the registry. When you provide this field, the specified customer-managed Amazon Web Services KMS key encrypts the registry's content. Omit this field to use an Amazon Web Services-owned encryption key. You cannot change the encryption configuration after registry creation.</p>
    pub fn encryption_configuration(&self) -> ::std::option::Option<&crate::types::EncryptionConfiguration> {
        self.encryption_configuration.as_ref()
    }
    /// <p>Discovery configuration for the registry</p>
    pub fn discovery_configuration(&self) -> ::std::option::Option<&crate::types::DiscoveryConfiguration> {
        self.discovery_configuration.as_ref()
    }
    /// <p>A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, the service ignores the request, but does not return an error.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
    /// <p>Tags to associate with the registry</p>
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
    /// <p>Approval configuration for registry records</p>
    pub fn approval_configuration(&self) -> ::std::option::Option<&crate::types::ApprovalConfiguration> {
        self.approval_configuration.as_ref()
    }
    /// <p>The optional auto-detection configuration for the registry. When provided, the registry is automatically populated with resources discovered according to the configuration. Omit this field for registries whose records are managed exclusively through the Agent Registry Control API.</p>
    pub fn auto_detection_configuration(&self) -> ::std::option::Option<&crate::types::AutoDetectionConfiguration> {
        self.auto_detection_configuration.as_ref()
    }
}
impl ::std::fmt::Debug for CreateRegistryInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateRegistryInput");
        formatter.field("name", &self.name);
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("encryption_configuration", &self.encryption_configuration);
        formatter.field("discovery_configuration", &self.discovery_configuration);
        formatter.field("client_token", &self.client_token);
        formatter.field("tags", &self.tags);
        formatter.field("approval_configuration", &self.approval_configuration);
        formatter.field("auto_detection_configuration", &self.auto_detection_configuration);
        formatter.finish()
    }
}
impl CreateRegistryInput {
    /// Creates a new builder-style object to manufacture [`CreateRegistryInput`](crate::operation::create_registry::CreateRegistryInput).
    pub fn builder() -> crate::operation::create_registry::builders::CreateRegistryInputBuilder {
        crate::operation::create_registry::builders::CreateRegistryInputBuilder::default()
    }
}

/// A builder for [`CreateRegistryInput`](crate::operation::create_registry::CreateRegistryInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateRegistryInputBuilder {
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) encryption_configuration: ::std::option::Option<crate::types::EncryptionConfiguration>,
    pub(crate) discovery_configuration: ::std::option::Option<crate::types::DiscoveryConfiguration>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) approval_configuration: ::std::option::Option<crate::types::ApprovalConfiguration>,
    pub(crate) auto_detection_configuration: ::std::option::Option<crate::types::AutoDetectionConfiguration>,
}
impl CreateRegistryInputBuilder {
    /// <p>The name of the registry</p>
    /// This field is required.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the registry</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the registry</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The description of the registry</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The description of the registry</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The description of the registry</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The optional server-side encryption configuration for the registry. When you provide this field, the specified customer-managed Amazon Web Services KMS key encrypts the registry's content. Omit this field to use an Amazon Web Services-owned encryption key. You cannot change the encryption configuration after registry creation.</p>
    pub fn encryption_configuration(mut self, input: crate::types::EncryptionConfiguration) -> Self {
        self.encryption_configuration = ::std::option::Option::Some(input);
        self
    }
    /// <p>The optional server-side encryption configuration for the registry. When you provide this field, the specified customer-managed Amazon Web Services KMS key encrypts the registry's content. Omit this field to use an Amazon Web Services-owned encryption key. You cannot change the encryption configuration after registry creation.</p>
    pub fn set_encryption_configuration(mut self, input: ::std::option::Option<crate::types::EncryptionConfiguration>) -> Self {
        self.encryption_configuration = input;
        self
    }
    /// <p>The optional server-side encryption configuration for the registry. When you provide this field, the specified customer-managed Amazon Web Services KMS key encrypts the registry's content. Omit this field to use an Amazon Web Services-owned encryption key. You cannot change the encryption configuration after registry creation.</p>
    pub fn get_encryption_configuration(&self) -> &::std::option::Option<crate::types::EncryptionConfiguration> {
        &self.encryption_configuration
    }
    /// <p>Discovery configuration for the registry</p>
    pub fn discovery_configuration(mut self, input: crate::types::DiscoveryConfiguration) -> Self {
        self.discovery_configuration = ::std::option::Option::Some(input);
        self
    }
    /// <p>Discovery configuration for the registry</p>
    pub fn set_discovery_configuration(mut self, input: ::std::option::Option<crate::types::DiscoveryConfiguration>) -> Self {
        self.discovery_configuration = input;
        self
    }
    /// <p>Discovery configuration for the registry</p>
    pub fn get_discovery_configuration(&self) -> &::std::option::Option<crate::types::DiscoveryConfiguration> {
        &self.discovery_configuration
    }
    /// <p>A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, the service ignores the request, but does not return an error.</p>
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, the service ignores the request, but does not return an error.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// <p>A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, the service ignores the request, but does not return an error.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>Tags to associate with the registry</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 associate with the registry</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 associate with the registry</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// <p>Approval configuration for registry records</p>
    pub fn approval_configuration(mut self, input: crate::types::ApprovalConfiguration) -> Self {
        self.approval_configuration = ::std::option::Option::Some(input);
        self
    }
    /// <p>Approval configuration for registry records</p>
    pub fn set_approval_configuration(mut self, input: ::std::option::Option<crate::types::ApprovalConfiguration>) -> Self {
        self.approval_configuration = input;
        self
    }
    /// <p>Approval configuration for registry records</p>
    pub fn get_approval_configuration(&self) -> &::std::option::Option<crate::types::ApprovalConfiguration> {
        &self.approval_configuration
    }
    /// <p>The optional auto-detection configuration for the registry. When provided, the registry is automatically populated with resources discovered according to the configuration. Omit this field for registries whose records are managed exclusively through the Agent Registry Control API.</p>
    pub fn auto_detection_configuration(mut self, input: crate::types::AutoDetectionConfiguration) -> Self {
        self.auto_detection_configuration = ::std::option::Option::Some(input);
        self
    }
    /// <p>The optional auto-detection configuration for the registry. When provided, the registry is automatically populated with resources discovered according to the configuration. Omit this field for registries whose records are managed exclusively through the Agent Registry Control API.</p>
    pub fn set_auto_detection_configuration(mut self, input: ::std::option::Option<crate::types::AutoDetectionConfiguration>) -> Self {
        self.auto_detection_configuration = input;
        self
    }
    /// <p>The optional auto-detection configuration for the registry. When provided, the registry is automatically populated with resources discovered according to the configuration. Omit this field for registries whose records are managed exclusively through the Agent Registry Control API.</p>
    pub fn get_auto_detection_configuration(&self) -> &::std::option::Option<crate::types::AutoDetectionConfiguration> {
        &self.auto_detection_configuration
    }
    /// Consumes the builder and constructs a [`CreateRegistryInput`](crate::operation::create_registry::CreateRegistryInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_registry::CreateRegistryInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_registry::CreateRegistryInput {
            name: self.name,
            description: self.description,
            encryption_configuration: self.encryption_configuration,
            discovery_configuration: self.discovery_configuration,
            client_token: self.client_token,
            tags: self.tags,
            approval_configuration: self.approval_configuration,
            auto_detection_configuration: self.auto_detection_configuration,
        })
    }
}
impl ::std::fmt::Debug for CreateRegistryInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateRegistryInputBuilder");
        formatter.field("name", &self.name);
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("encryption_configuration", &self.encryption_configuration);
        formatter.field("discovery_configuration", &self.discovery_configuration);
        formatter.field("client_token", &self.client_token);
        formatter.field("tags", &self.tags);
        formatter.field("approval_configuration", &self.approval_configuration);
        formatter.field("auto_detection_configuration", &self.auto_detection_configuration);
        formatter.finish()
    }
}