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.
pub use crate::operation::register_service::_register_service_input::RegisterServiceInputBuilder;

pub use crate::operation::register_service::_register_service_output::RegisterServiceOutputBuilder;

impl crate::operation::register_service::builders::RegisterServiceInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::register_service::RegisterServiceOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::register_service::RegisterServiceError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.register_service();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `RegisterService`.
///
/// This operation registers the specified service
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct RegisterServiceFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::register_service::builders::RegisterServiceInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::register_service::RegisterServiceOutput,
        crate::operation::register_service::RegisterServiceError,
    > for RegisterServiceFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::register_service::RegisterServiceOutput,
            crate::operation::register_service::RegisterServiceError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl RegisterServiceFluentBuilder {
    /// Creates a new `RegisterServiceFluentBuilder`.
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
        Self {
            handle,
            inner: ::std::default::Default::default(),
            config_override: ::std::option::Option::None,
        }
    }
    /// Access the RegisterService as a reference.
    pub fn as_input(&self) -> &crate::operation::register_service::builders::RegisterServiceInputBuilder {
        &self.inner
    }
    /// Sends the request and returns the response.
    ///
    /// If an error occurs, an `SdkError` will be returned with additional details that
    /// can be matched against.
    ///
    /// By default, any retryable failures will be retried twice. Retry behavior
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
    /// set when configuring the client.
    pub async fn send(
        self,
    ) -> ::std::result::Result<
        crate::operation::register_service::RegisterServiceOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::register_service::RegisterServiceError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let input = self
            .inner
            .build()
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
        let runtime_plugins = crate::operation::register_service::RegisterService::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::register_service::RegisterService::orchestrate(&runtime_plugins, input).await
    }

    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
    pub fn customize(
        self,
    ) -> crate::client::customize::CustomizableOperation<
        crate::operation::register_service::RegisterServiceOutput,
        crate::operation::register_service::RegisterServiceError,
        Self,
    > {
        crate::client::customize::CustomizableOperation::new(self)
    }
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
        self.set_config_override(::std::option::Option::Some(config_override.into()));
        self
    }

    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
        self.config_override = config_override;
        self
    }
    /// Services that can be registered via the post-registration API (excludes OAuth 3LO services).
    pub fn service(mut self, input: crate::types::PostRegisterServiceSupportedService) -> Self {
        self.inner = self.inner.service(input);
        self
    }
    /// Services that can be registered via the post-registration API (excludes OAuth 3LO services).
    pub fn set_service(mut self, input: ::std::option::Option<crate::types::PostRegisterServiceSupportedService>) -> Self {
        self.inner = self.inner.set_service(input);
        self
    }
    /// Services that can be registered via the post-registration API (excludes OAuth 3LO services).
    pub fn get_service(&self) -> &::std::option::Option<crate::types::PostRegisterServiceSupportedService> {
        self.inner.get_service()
    }
    /// Service-specific authorization configuration parameters
    pub fn service_details(mut self, input: crate::types::ServiceDetails) -> Self {
        self.inner = self.inner.service_details(input);
        self
    }
    /// Service-specific authorization configuration parameters
    pub fn set_service_details(mut self, input: ::std::option::Option<crate::types::ServiceDetails>) -> Self {
        self.inner = self.inner.set_service_details(input);
        self
    }
    /// Service-specific authorization configuration parameters
    pub fn get_service_details(&self) -> &::std::option::Option<crate::types::ServiceDetails> {
        self.inner.get_service_details()
    }
    /// 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.inner = self.inner.kms_key_arn(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.inner = self.inner.set_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.inner.get_kms_key_arn()
    }
    /// The name of the private connection to use for VPC connectivity.
    pub fn private_connection_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.private_connection_name(input.into());
        self
    }
    /// The name of the private connection to use for VPC connectivity.
    pub fn set_private_connection_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_private_connection_name(input);
        self
    }
    /// The name of the private connection to use for VPC connectivity.
    pub fn get_private_connection_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_private_connection_name()
    }
    /// The display name for the service registration.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.name(input.into());
        self
    }
    /// The display name for the service registration.
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_name(input);
        self
    }
    /// The display name for the service registration.
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_name()
    }
    ///
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// Tags to add to the Service at registration time.
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.tags(k.into(), v.into());
        self
    }
    /// Tags to add to the Service at registration time.
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.inner = self.inner.set_tags(input);
        self
    }
    /// Tags to add to the Service at registration time.
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.inner.get_tags()
    }
}