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

Summary information about a target.

See Also:

AWS * API Reference

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

The ID of the target. If the target type of the target group is * INSTANCE, this is an instance ID. If the target type is * IP , this is an IP address. If the target type is * LAMBDA, this is the ARN of the Lambda function. If the target type * is ALB, this is the ARN of the Application Load Balancer.

*/ inline const Aws::String& GetId() const{ return m_id; } /** *

The ID of the target. If the target type of the target group is * INSTANCE, this is an instance ID. If the target type is * IP , this is an IP address. If the target type is * LAMBDA, this is the ARN of the Lambda function. If the target type * is ALB, this is the ARN of the Application Load Balancer.

*/ inline bool IdHasBeenSet() const { return m_idHasBeenSet; } /** *

The ID of the target. If the target type of the target group is * INSTANCE, this is an instance ID. If the target type is * IP , this is an IP address. If the target type is * LAMBDA, this is the ARN of the Lambda function. If the target type * is ALB, this is the ARN of the Application Load Balancer.

*/ inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; } /** *

The ID of the target. If the target type of the target group is * INSTANCE, this is an instance ID. If the target type is * IP , this is an IP address. If the target type is * LAMBDA, this is the ARN of the Lambda function. If the target type * is ALB, this is the ARN of the Application Load Balancer.

*/ inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); } /** *

The ID of the target. If the target type of the target group is * INSTANCE, this is an instance ID. If the target type is * IP , this is an IP address. If the target type is * LAMBDA, this is the ARN of the Lambda function. If the target type * is ALB, this is the ARN of the Application Load Balancer.

*/ inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); } /** *

The ID of the target. If the target type of the target group is * INSTANCE, this is an instance ID. If the target type is * IP , this is an IP address. If the target type is * LAMBDA, this is the ARN of the Lambda function. If the target type * is ALB, this is the ARN of the Application Load Balancer.

*/ inline TargetSummary& WithId(const Aws::String& value) { SetId(value); return *this;} /** *

The ID of the target. If the target type of the target group is * INSTANCE, this is an instance ID. If the target type is * IP , this is an IP address. If the target type is * LAMBDA, this is the ARN of the Lambda function. If the target type * is ALB, this is the ARN of the Application Load Balancer.

*/ inline TargetSummary& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;} /** *

The ID of the target. If the target type of the target group is * INSTANCE, this is an instance ID. If the target type is * IP , this is an IP address. If the target type is * LAMBDA, this is the ARN of the Lambda function. If the target type * is ALB, this is the ARN of the Application Load Balancer.

*/ inline TargetSummary& WithId(const char* value) { SetId(value); return *this;} /** *

The port on which the target is listening.

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

The port on which the target is listening.

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

The port on which the target is listening.

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

The port on which the target is listening.

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

The code for why the target status is what it is.

*/ inline const Aws::String& GetReasonCode() const{ return m_reasonCode; } /** *

The code for why the target status is what it is.

*/ inline bool ReasonCodeHasBeenSet() const { return m_reasonCodeHasBeenSet; } /** *

The code for why the target status is what it is.

*/ inline void SetReasonCode(const Aws::String& value) { m_reasonCodeHasBeenSet = true; m_reasonCode = value; } /** *

The code for why the target status is what it is.

*/ inline void SetReasonCode(Aws::String&& value) { m_reasonCodeHasBeenSet = true; m_reasonCode = std::move(value); } /** *

The code for why the target status is what it is.

*/ inline void SetReasonCode(const char* value) { m_reasonCodeHasBeenSet = true; m_reasonCode.assign(value); } /** *

The code for why the target status is what it is.

*/ inline TargetSummary& WithReasonCode(const Aws::String& value) { SetReasonCode(value); return *this;} /** *

The code for why the target status is what it is.

*/ inline TargetSummary& WithReasonCode(Aws::String&& value) { SetReasonCode(std::move(value)); return *this;} /** *

The code for why the target status is what it is.

*/ inline TargetSummary& WithReasonCode(const char* value) { SetReasonCode(value); return *this;} /** *

The status of the target.

  • Draining: The target * is being deregistered. No new connections will be sent to this target while * current connections are being drained. Default draining time is 5 minutes.

    *
  • Unavailable: Health checks are unavailable for the * target group.

  • Healthy: The target is healthy. *

  • Unhealthy: The target is unhealthy.

  • *
  • Initial: Initial health checks on the target are being * performed.

  • Unused: Target group is not used in a * service.

*/ inline const TargetStatus& GetStatus() const{ return m_status; } /** *

The status of the target.

  • Draining: The target * is being deregistered. No new connections will be sent to this target while * current connections are being drained. Default draining time is 5 minutes.

    *
  • Unavailable: Health checks are unavailable for the * target group.

  • Healthy: The target is healthy. *

  • Unhealthy: The target is unhealthy.

  • *
  • Initial: Initial health checks on the target are being * performed.

  • Unused: Target group is not used in a * service.

*/ inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } /** *

The status of the target.

  • Draining: The target * is being deregistered. No new connections will be sent to this target while * current connections are being drained. Default draining time is 5 minutes.

    *
  • Unavailable: Health checks are unavailable for the * target group.

  • Healthy: The target is healthy. *

  • Unhealthy: The target is unhealthy.

  • *
  • Initial: Initial health checks on the target are being * performed.

  • Unused: Target group is not used in a * service.

*/ inline void SetStatus(const TargetStatus& value) { m_statusHasBeenSet = true; m_status = value; } /** *

The status of the target.

  • Draining: The target * is being deregistered. No new connections will be sent to this target while * current connections are being drained. Default draining time is 5 minutes.

    *
  • Unavailable: Health checks are unavailable for the * target group.

  • Healthy: The target is healthy. *

  • Unhealthy: The target is unhealthy.

  • *
  • Initial: Initial health checks on the target are being * performed.

  • Unused: Target group is not used in a * service.

*/ inline void SetStatus(TargetStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } /** *

The status of the target.

  • Draining: The target * is being deregistered. No new connections will be sent to this target while * current connections are being drained. Default draining time is 5 minutes.

    *
  • Unavailable: Health checks are unavailable for the * target group.

  • Healthy: The target is healthy. *

  • Unhealthy: The target is unhealthy.

  • *
  • Initial: Initial health checks on the target are being * performed.

  • Unused: Target group is not used in a * service.

*/ inline TargetSummary& WithStatus(const TargetStatus& value) { SetStatus(value); return *this;} /** *

The status of the target.

  • Draining: The target * is being deregistered. No new connections will be sent to this target while * current connections are being drained. Default draining time is 5 minutes.

    *
  • Unavailable: Health checks are unavailable for the * target group.

  • Healthy: The target is healthy. *

  • Unhealthy: The target is unhealthy.

  • *
  • Initial: Initial health checks on the target are being * performed.

  • Unused: Target group is not used in a * service.

*/ inline TargetSummary& WithStatus(TargetStatus&& value) { SetStatus(std::move(value)); return *this;} private: Aws::String m_id; bool m_idHasBeenSet = false; int m_port; bool m_portHasBeenSet = false; Aws::String m_reasonCode; bool m_reasonCodeHasBeenSet = false; TargetStatus m_status; bool m_statusHasBeenSet = false; }; } // namespace Model } // namespace VPCLattice } // namespace Aws