Skip to main content

aws_sdk_securityhub/types/
_aws_events_endpoint_routing_config_failover_config_primary_details.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Provides details about the primary Amazon Web Services Region of the endpoint.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct AwsEventsEndpointRoutingConfigFailoverConfigPrimaryDetails {
7    /// <p>The Amazon Resource Name (ARN) of the health check used by the endpoint to determine whether failover is triggered.</p>
8    pub health_check: ::std::option::Option<::std::string::String>,
9}
10impl AwsEventsEndpointRoutingConfigFailoverConfigPrimaryDetails {
11    /// <p>The Amazon Resource Name (ARN) of the health check used by the endpoint to determine whether failover is triggered.</p>
12    pub fn health_check(&self) -> ::std::option::Option<&str> {
13        self.health_check.as_deref()
14    }
15}
16impl AwsEventsEndpointRoutingConfigFailoverConfigPrimaryDetails {
17    /// Creates a new builder-style object to manufacture [`AwsEventsEndpointRoutingConfigFailoverConfigPrimaryDetails`](crate::types::AwsEventsEndpointRoutingConfigFailoverConfigPrimaryDetails).
18    pub fn builder() -> crate::types::builders::AwsEventsEndpointRoutingConfigFailoverConfigPrimaryDetailsBuilder {
19        crate::types::builders::AwsEventsEndpointRoutingConfigFailoverConfigPrimaryDetailsBuilder::default()
20    }
21}
22
23/// A builder for [`AwsEventsEndpointRoutingConfigFailoverConfigPrimaryDetails`](crate::types::AwsEventsEndpointRoutingConfigFailoverConfigPrimaryDetails).
24#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
25#[non_exhaustive]
26pub struct AwsEventsEndpointRoutingConfigFailoverConfigPrimaryDetailsBuilder {
27    pub(crate) health_check: ::std::option::Option<::std::string::String>,
28}
29impl AwsEventsEndpointRoutingConfigFailoverConfigPrimaryDetailsBuilder {
30    /// <p>The Amazon Resource Name (ARN) of the health check used by the endpoint to determine whether failover is triggered.</p>
31    pub fn health_check(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
32        self.health_check = ::std::option::Option::Some(input.into());
33        self
34    }
35    /// <p>The Amazon Resource Name (ARN) of the health check used by the endpoint to determine whether failover is triggered.</p>
36    pub fn set_health_check(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
37        self.health_check = input;
38        self
39    }
40    /// <p>The Amazon Resource Name (ARN) of the health check used by the endpoint to determine whether failover is triggered.</p>
41    pub fn get_health_check(&self) -> &::std::option::Option<::std::string::String> {
42        &self.health_check
43    }
44    /// Consumes the builder and constructs a [`AwsEventsEndpointRoutingConfigFailoverConfigPrimaryDetails`](crate::types::AwsEventsEndpointRoutingConfigFailoverConfigPrimaryDetails).
45    pub fn build(self) -> crate::types::AwsEventsEndpointRoutingConfigFailoverConfigPrimaryDetails {
46        crate::types::AwsEventsEndpointRoutingConfigFailoverConfigPrimaryDetails {
47            health_check: self.health_check,
48        }
49    }
50}