/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace VPCLattice { namespace Model { /** *

Describes the configuration of a target group. Lambda functions don't support * target group configuration.

See Also:

AWS * API Reference

*/ class TargetGroupConfig { public: AWS_VPCLATTICE_API TargetGroupConfig(); AWS_VPCLATTICE_API TargetGroupConfig(Aws::Utils::Json::JsonView jsonValue); AWS_VPCLATTICE_API TargetGroupConfig& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_VPCLATTICE_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The health check configuration.

*/ inline const HealthCheckConfig& GetHealthCheck() const{ return m_healthCheck; } /** *

The health check configuration.

*/ inline bool HealthCheckHasBeenSet() const { return m_healthCheckHasBeenSet; } /** *

The health check configuration.

*/ inline void SetHealthCheck(const HealthCheckConfig& value) { m_healthCheckHasBeenSet = true; m_healthCheck = value; } /** *

The health check configuration.

*/ inline void SetHealthCheck(HealthCheckConfig&& value) { m_healthCheckHasBeenSet = true; m_healthCheck = std::move(value); } /** *

The health check configuration.

*/ inline TargetGroupConfig& WithHealthCheck(const HealthCheckConfig& value) { SetHealthCheck(value); return *this;} /** *

The health check configuration.

*/ inline TargetGroupConfig& WithHealthCheck(HealthCheckConfig&& value) { SetHealthCheck(std::move(value)); return *this;} /** *

The type of IP address used for the target group. The possible values are * ipv4 and ipv6. This is an optional parameter. If not * specified, the IP address type defaults to ipv4.

*/ inline const IpAddressType& GetIpAddressType() const{ return m_ipAddressType; } /** *

The type of IP address used for the target group. The possible values are * ipv4 and ipv6. This is an optional parameter. If not * specified, the IP address type defaults to ipv4.

*/ inline bool IpAddressTypeHasBeenSet() const { return m_ipAddressTypeHasBeenSet; } /** *

The type of IP address used for the target group. The possible values are * ipv4 and ipv6. This is an optional parameter. If not * specified, the IP address type defaults to ipv4.

*/ inline void SetIpAddressType(const IpAddressType& value) { m_ipAddressTypeHasBeenSet = true; m_ipAddressType = value; } /** *

The type of IP address used for the target group. The possible values are * ipv4 and ipv6. This is an optional parameter. If not * specified, the IP address type defaults to ipv4.

*/ inline void SetIpAddressType(IpAddressType&& value) { m_ipAddressTypeHasBeenSet = true; m_ipAddressType = std::move(value); } /** *

The type of IP address used for the target group. The possible values are * ipv4 and ipv6. This is an optional parameter. If not * specified, the IP address type defaults to ipv4.

*/ inline TargetGroupConfig& WithIpAddressType(const IpAddressType& value) { SetIpAddressType(value); return *this;} /** *

The type of IP address used for the target group. The possible values are * ipv4 and ipv6. This is an optional parameter. If not * specified, the IP address type defaults to ipv4.

*/ inline TargetGroupConfig& WithIpAddressType(IpAddressType&& value) { SetIpAddressType(std::move(value)); return *this;} /** *

The port on which the targets are listening. For HTTP, the default is * 80. For HTTPS, the default is 443

*/ inline int GetPort() const{ return m_port; } /** *

The port on which the targets are listening. For HTTP, the default is * 80. For HTTPS, the default is 443

*/ inline bool PortHasBeenSet() const { return m_portHasBeenSet; } /** *

The port on which the targets are listening. For HTTP, the default is * 80. For HTTPS, the default is 443

*/ inline void SetPort(int value) { m_portHasBeenSet = true; m_port = value; } /** *

The port on which the targets are listening. For HTTP, the default is * 80. For HTTPS, the default is 443

*/ inline TargetGroupConfig& WithPort(int value) { SetPort(value); return *this;} /** *

The protocol to use for routing traffic to the targets. Default is the * protocol of a target group.

*/ inline const TargetGroupProtocol& GetProtocol() const{ return m_protocol; } /** *

The protocol to use for routing traffic to the targets. Default is the * protocol of a target group.

*/ inline bool ProtocolHasBeenSet() const { return m_protocolHasBeenSet; } /** *

The protocol to use for routing traffic to the targets. Default is the * protocol of a target group.

*/ inline void SetProtocol(const TargetGroupProtocol& value) { m_protocolHasBeenSet = true; m_protocol = value; } /** *

The protocol to use for routing traffic to the targets. Default is the * protocol of a target group.

*/ inline void SetProtocol(TargetGroupProtocol&& value) { m_protocolHasBeenSet = true; m_protocol = std::move(value); } /** *

The protocol to use for routing traffic to the targets. Default is the * protocol of a target group.

*/ inline TargetGroupConfig& WithProtocol(const TargetGroupProtocol& value) { SetProtocol(value); return *this;} /** *

The protocol to use for routing traffic to the targets. Default is the * protocol of a target group.

*/ inline TargetGroupConfig& WithProtocol(TargetGroupProtocol&& value) { SetProtocol(std::move(value)); return *this;} /** *

The protocol version. Default value is HTTP1.

*/ inline const TargetGroupProtocolVersion& GetProtocolVersion() const{ return m_protocolVersion; } /** *

The protocol version. Default value is HTTP1.

*/ inline bool ProtocolVersionHasBeenSet() const { return m_protocolVersionHasBeenSet; } /** *

The protocol version. Default value is HTTP1.

*/ inline void SetProtocolVersion(const TargetGroupProtocolVersion& value) { m_protocolVersionHasBeenSet = true; m_protocolVersion = value; } /** *

The protocol version. Default value is HTTP1.

*/ inline void SetProtocolVersion(TargetGroupProtocolVersion&& value) { m_protocolVersionHasBeenSet = true; m_protocolVersion = std::move(value); } /** *

The protocol version. Default value is HTTP1.

*/ inline TargetGroupConfig& WithProtocolVersion(const TargetGroupProtocolVersion& value) { SetProtocolVersion(value); return *this;} /** *

The protocol version. Default value is HTTP1.

*/ inline TargetGroupConfig& WithProtocolVersion(TargetGroupProtocolVersion&& value) { SetProtocolVersion(std::move(value)); return *this;} /** *

The ID of the VPC.

*/ inline const Aws::String& GetVpcIdentifier() const{ return m_vpcIdentifier; } /** *

The ID of the VPC.

*/ inline bool VpcIdentifierHasBeenSet() const { return m_vpcIdentifierHasBeenSet; } /** *

The ID of the VPC.

*/ inline void SetVpcIdentifier(const Aws::String& value) { m_vpcIdentifierHasBeenSet = true; m_vpcIdentifier = value; } /** *

The ID of the VPC.

*/ inline void SetVpcIdentifier(Aws::String&& value) { m_vpcIdentifierHasBeenSet = true; m_vpcIdentifier = std::move(value); } /** *

The ID of the VPC.

*/ inline void SetVpcIdentifier(const char* value) { m_vpcIdentifierHasBeenSet = true; m_vpcIdentifier.assign(value); } /** *

The ID of the VPC.

*/ inline TargetGroupConfig& WithVpcIdentifier(const Aws::String& value) { SetVpcIdentifier(value); return *this;} /** *

The ID of the VPC.

*/ inline TargetGroupConfig& WithVpcIdentifier(Aws::String&& value) { SetVpcIdentifier(std::move(value)); return *this;} /** *

The ID of the VPC.

*/ inline TargetGroupConfig& WithVpcIdentifier(const char* value) { SetVpcIdentifier(value); return *this;} private: HealthCheckConfig m_healthCheck; bool m_healthCheckHasBeenSet = false; IpAddressType m_ipAddressType; bool m_ipAddressTypeHasBeenSet = false; int m_port; bool m_portHasBeenSet = false; TargetGroupProtocol m_protocol; bool m_protocolHasBeenSet = false; TargetGroupProtocolVersion m_protocolVersion; bool m_protocolVersionHasBeenSet = false; Aws::String m_vpcIdentifier; bool m_vpcIdentifierHasBeenSet = false; }; } // namespace Model } // namespace VPCLattice } // namespace Aws