aws-sdk-devopsagent 1.4.0

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

/// Output containing the service ID and any additional steps required for registration.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct RegisterServiceOutput {
    /// Service ID - present when registration is complete, absent when additional steps are required
    pub service_id: ::std::option::Option<::std::string::String>,
    /// Indicates if additional steps are required to complete service registration (e.g., 3-legged OAuth)
    pub additional_step: ::std::option::Option<crate::types::AdditionalServiceRegistrationStep>,
    /// The ARN of the AWS Key Management Service (AWS KMS) customer managed key that's used to encrypt resources.
    pub kms_key_arn: ::std::option::Option<::std::string::String>,
    /// Tags associated with the registered Service.
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    _request_id: Option<String>,
}
impl RegisterServiceOutput {
    /// Service ID - present when registration is complete, absent when additional steps are required
    pub fn service_id(&self) -> ::std::option::Option<&str> {
        self.service_id.as_deref()
    }
    /// Indicates if additional steps are required to complete service registration (e.g., 3-legged OAuth)
    pub fn additional_step(&self) -> ::std::option::Option<&crate::types::AdditionalServiceRegistrationStep> {
        self.additional_step.as_ref()
    }
    /// The ARN of the AWS Key Management Service (AWS KMS) customer managed key that's used to encrypt resources.
    pub fn kms_key_arn(&self) -> ::std::option::Option<&str> {
        self.kms_key_arn.as_deref()
    }
    /// Tags associated with the registered Service.
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for RegisterServiceOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl RegisterServiceOutput {
    /// Creates a new builder-style object to manufacture [`RegisterServiceOutput`](crate::operation::register_service::RegisterServiceOutput).
    pub fn builder() -> crate::operation::register_service::builders::RegisterServiceOutputBuilder {
        crate::operation::register_service::builders::RegisterServiceOutputBuilder::default()
    }
}

/// A builder for [`RegisterServiceOutput`](crate::operation::register_service::RegisterServiceOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct RegisterServiceOutputBuilder {
    pub(crate) service_id: ::std::option::Option<::std::string::String>,
    pub(crate) additional_step: ::std::option::Option<crate::types::AdditionalServiceRegistrationStep>,
    pub(crate) kms_key_arn: ::std::option::Option<::std::string::String>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    _request_id: Option<String>,
}
impl RegisterServiceOutputBuilder {
    /// Service ID - present when registration is complete, absent when additional steps are required
    pub fn service_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.service_id = ::std::option::Option::Some(input.into());
        self
    }
    /// Service ID - present when registration is complete, absent when additional steps are required
    pub fn set_service_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.service_id = input;
        self
    }
    /// Service ID - present when registration is complete, absent when additional steps are required
    pub fn get_service_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.service_id
    }
    /// Indicates if additional steps are required to complete service registration (e.g., 3-legged OAuth)
    pub fn additional_step(mut self, input: crate::types::AdditionalServiceRegistrationStep) -> Self {
        self.additional_step = ::std::option::Option::Some(input);
        self
    }
    /// Indicates if additional steps are required to complete service registration (e.g., 3-legged OAuth)
    pub fn set_additional_step(mut self, input: ::std::option::Option<crate::types::AdditionalServiceRegistrationStep>) -> Self {
        self.additional_step = input;
        self
    }
    /// Indicates if additional steps are required to complete service registration (e.g., 3-legged OAuth)
    pub fn get_additional_step(&self) -> &::std::option::Option<crate::types::AdditionalServiceRegistrationStep> {
        &self.additional_step
    }
    /// The ARN of the AWS Key Management Service (AWS KMS) customer managed key that's used to encrypt resources.
    pub fn kms_key_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.kms_key_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// The ARN of the AWS Key Management Service (AWS KMS) customer managed key that's used to encrypt resources.
    pub fn set_kms_key_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.kms_key_arn = input;
        self
    }
    /// The ARN of the AWS Key Management Service (AWS KMS) customer managed key that's used to encrypt resources.
    pub fn get_kms_key_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.kms_key_arn
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// Tags associated with the registered Service.
    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
    }
    /// Tags associated with the registered Service.
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// Tags associated with the registered Service.
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    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 [`RegisterServiceOutput`](crate::operation::register_service::RegisterServiceOutput).
    pub fn build(self) -> crate::operation::register_service::RegisterServiceOutput {
        crate::operation::register_service::RegisterServiceOutput {
            service_id: self.service_id,
            additional_step: self.additional_step,
            kms_key_arn: self.kms_key_arn,
            tags: self.tags,
            _request_id: self._request_id,
        }
    }
}