aws-sdk-eventbridge 1.105.0

AWS SDK for Amazon EventBridge
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 CreateApiDestinationInput {
    /// <p>The name for the API destination to create.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>A description for the API destination to create.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The ARN of the connection to use for the API destination. The destination endpoint must support the authorization type specified for the connection.</p>
    pub connection_arn: ::std::option::Option<::std::string::String>,
    /// <p>The URL to the HTTP invocation endpoint for the API destination.</p>
    pub invocation_endpoint: ::std::option::Option<::std::string::String>,
    /// <p>The method to use for the request to the HTTP invocation endpoint.</p>
    pub http_method: ::std::option::Option<crate::types::ApiDestinationHttpMethod>,
    /// <p>The maximum number of requests per second to send to the HTTP invocation endpoint.</p>
    pub invocation_rate_limit_per_second: ::std::option::Option<i32>,
}
impl CreateApiDestinationInput {
    /// <p>The name for the API destination to create.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>A description for the API destination to create.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The ARN of the connection to use for the API destination. The destination endpoint must support the authorization type specified for the connection.</p>
    pub fn connection_arn(&self) -> ::std::option::Option<&str> {
        self.connection_arn.as_deref()
    }
    /// <p>The URL to the HTTP invocation endpoint for the API destination.</p>
    pub fn invocation_endpoint(&self) -> ::std::option::Option<&str> {
        self.invocation_endpoint.as_deref()
    }
    /// <p>The method to use for the request to the HTTP invocation endpoint.</p>
    pub fn http_method(&self) -> ::std::option::Option<&crate::types::ApiDestinationHttpMethod> {
        self.http_method.as_ref()
    }
    /// <p>The maximum number of requests per second to send to the HTTP invocation endpoint.</p>
    pub fn invocation_rate_limit_per_second(&self) -> ::std::option::Option<i32> {
        self.invocation_rate_limit_per_second
    }
}
impl CreateApiDestinationInput {
    /// Creates a new builder-style object to manufacture [`CreateApiDestinationInput`](crate::operation::create_api_destination::CreateApiDestinationInput).
    pub fn builder() -> crate::operation::create_api_destination::builders::CreateApiDestinationInputBuilder {
        crate::operation::create_api_destination::builders::CreateApiDestinationInputBuilder::default()
    }
}

/// A builder for [`CreateApiDestinationInput`](crate::operation::create_api_destination::CreateApiDestinationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateApiDestinationInputBuilder {
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) connection_arn: ::std::option::Option<::std::string::String>,
    pub(crate) invocation_endpoint: ::std::option::Option<::std::string::String>,
    pub(crate) http_method: ::std::option::Option<crate::types::ApiDestinationHttpMethod>,
    pub(crate) invocation_rate_limit_per_second: ::std::option::Option<i32>,
}
impl CreateApiDestinationInputBuilder {
    /// <p>The name for the API destination to create.</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 for the API destination to create.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name for the API destination to create.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>A description for the API destination to create.</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>A description for the API destination to create.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>A description for the API destination to create.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The ARN of the connection to use for the API destination. The destination endpoint must support the authorization type specified for the connection.</p>
    /// This field is required.
    pub fn connection_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.connection_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the connection to use for the API destination. The destination endpoint must support the authorization type specified for the connection.</p>
    pub fn set_connection_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.connection_arn = input;
        self
    }
    /// <p>The ARN of the connection to use for the API destination. The destination endpoint must support the authorization type specified for the connection.</p>
    pub fn get_connection_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.connection_arn
    }
    /// <p>The URL to the HTTP invocation endpoint for the API destination.</p>
    /// This field is required.
    pub fn invocation_endpoint(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.invocation_endpoint = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The URL to the HTTP invocation endpoint for the API destination.</p>
    pub fn set_invocation_endpoint(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.invocation_endpoint = input;
        self
    }
    /// <p>The URL to the HTTP invocation endpoint for the API destination.</p>
    pub fn get_invocation_endpoint(&self) -> &::std::option::Option<::std::string::String> {
        &self.invocation_endpoint
    }
    /// <p>The method to use for the request to the HTTP invocation endpoint.</p>
    /// This field is required.
    pub fn http_method(mut self, input: crate::types::ApiDestinationHttpMethod) -> Self {
        self.http_method = ::std::option::Option::Some(input);
        self
    }
    /// <p>The method to use for the request to the HTTP invocation endpoint.</p>
    pub fn set_http_method(mut self, input: ::std::option::Option<crate::types::ApiDestinationHttpMethod>) -> Self {
        self.http_method = input;
        self
    }
    /// <p>The method to use for the request to the HTTP invocation endpoint.</p>
    pub fn get_http_method(&self) -> &::std::option::Option<crate::types::ApiDestinationHttpMethod> {
        &self.http_method
    }
    /// <p>The maximum number of requests per second to send to the HTTP invocation endpoint.</p>
    pub fn invocation_rate_limit_per_second(mut self, input: i32) -> Self {
        self.invocation_rate_limit_per_second = ::std::option::Option::Some(input);
        self
    }
    /// <p>The maximum number of requests per second to send to the HTTP invocation endpoint.</p>
    pub fn set_invocation_rate_limit_per_second(mut self, input: ::std::option::Option<i32>) -> Self {
        self.invocation_rate_limit_per_second = input;
        self
    }
    /// <p>The maximum number of requests per second to send to the HTTP invocation endpoint.</p>
    pub fn get_invocation_rate_limit_per_second(&self) -> &::std::option::Option<i32> {
        &self.invocation_rate_limit_per_second
    }
    /// Consumes the builder and constructs a [`CreateApiDestinationInput`](crate::operation::create_api_destination::CreateApiDestinationInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_api_destination::CreateApiDestinationInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::create_api_destination::CreateApiDestinationInput {
            name: self.name,
            description: self.description,
            connection_arn: self.connection_arn,
            invocation_endpoint: self.invocation_endpoint,
            http_method: self.http_method,
            invocation_rate_limit_per_second: self.invocation_rate_limit_per_second,
        })
    }
}