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

Describes a target failure.

See Also:

AWS * API Reference

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

The failure code.

*/ inline const Aws::String& GetFailureCode() const{ return m_failureCode; } /** *

The failure code.

*/ inline bool FailureCodeHasBeenSet() const { return m_failureCodeHasBeenSet; } /** *

The failure code.

*/ inline void SetFailureCode(const Aws::String& value) { m_failureCodeHasBeenSet = true; m_failureCode = value; } /** *

The failure code.

*/ inline void SetFailureCode(Aws::String&& value) { m_failureCodeHasBeenSet = true; m_failureCode = std::move(value); } /** *

The failure code.

*/ inline void SetFailureCode(const char* value) { m_failureCodeHasBeenSet = true; m_failureCode.assign(value); } /** *

The failure code.

*/ inline TargetFailure& WithFailureCode(const Aws::String& value) { SetFailureCode(value); return *this;} /** *

The failure code.

*/ inline TargetFailure& WithFailureCode(Aws::String&& value) { SetFailureCode(std::move(value)); return *this;} /** *

The failure code.

*/ inline TargetFailure& WithFailureCode(const char* value) { SetFailureCode(value); return *this;} /** *

The failure message.

*/ inline const Aws::String& GetFailureMessage() const{ return m_failureMessage; } /** *

The failure message.

*/ inline bool FailureMessageHasBeenSet() const { return m_failureMessageHasBeenSet; } /** *

The failure message.

*/ inline void SetFailureMessage(const Aws::String& value) { m_failureMessageHasBeenSet = true; m_failureMessage = value; } /** *

The failure message.

*/ inline void SetFailureMessage(Aws::String&& value) { m_failureMessageHasBeenSet = true; m_failureMessage = std::move(value); } /** *

The failure message.

*/ inline void SetFailureMessage(const char* value) { m_failureMessageHasBeenSet = true; m_failureMessage.assign(value); } /** *

The failure message.

*/ inline TargetFailure& WithFailureMessage(const Aws::String& value) { SetFailureMessage(value); return *this;} /** *

The failure message.

*/ inline TargetFailure& WithFailureMessage(Aws::String&& value) { SetFailureMessage(std::move(value)); return *this;} /** *

The failure message.

*/ inline TargetFailure& WithFailureMessage(const char* value) { SetFailureMessage(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 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 TargetFailure& 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 TargetFailure& 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 TargetFailure& WithId(const char* value) { SetId(value); return *this;} /** *

The port on which the target is listening. This parameter doesn't apply if * the target is a Lambda function.

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

The port on which the target is listening. This parameter doesn't apply if * the target is a Lambda function.

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

The port on which the target is listening. This parameter doesn't apply if * the target is a Lambda function.

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

The port on which the target is listening. This parameter doesn't apply if * the target is a Lambda function.

*/ inline TargetFailure& WithPort(int value) { SetPort(value); return *this;} private: Aws::String m_failureCode; bool m_failureCodeHasBeenSet = false; Aws::String m_failureMessage; bool m_failureMessageHasBeenSet = false; Aws::String m_id; bool m_idHasBeenSet = false; int m_port; bool m_portHasBeenSet = false; }; } // namespace Model } // namespace VPCLattice } // namespace Aws