/** * 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 #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Lightsail { namespace Model { /** *

Describes the SSH key pair.

See Also:

AWS * API Reference

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

The friendly name of the SSH key pair.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The friendly name of the SSH key pair.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The friendly name of the SSH key pair.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The friendly name of the SSH key pair.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The friendly name of the SSH key pair.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The friendly name of the SSH key pair.

*/ inline KeyPair& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The friendly name of the SSH key pair.

*/ inline KeyPair& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The friendly name of the SSH key pair.

*/ inline KeyPair& WithName(const char* value) { SetName(value); return *this;} /** *

The Amazon Resource Name (ARN) of the key pair (e.g., * arn:aws:lightsail:us-east-2:123456789101:KeyPair/05859e3d-331d-48ba-9034-12345EXAMPLE).

*/ inline const Aws::String& GetArn() const{ return m_arn; } /** *

The Amazon Resource Name (ARN) of the key pair (e.g., * arn:aws:lightsail:us-east-2:123456789101:KeyPair/05859e3d-331d-48ba-9034-12345EXAMPLE).

*/ inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the key pair (e.g., * arn:aws:lightsail:us-east-2:123456789101:KeyPair/05859e3d-331d-48ba-9034-12345EXAMPLE).

*/ inline void SetArn(const Aws::String& value) { m_arnHasBeenSet = true; m_arn = value; } /** *

The Amazon Resource Name (ARN) of the key pair (e.g., * arn:aws:lightsail:us-east-2:123456789101:KeyPair/05859e3d-331d-48ba-9034-12345EXAMPLE).

*/ inline void SetArn(Aws::String&& value) { m_arnHasBeenSet = true; m_arn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the key pair (e.g., * arn:aws:lightsail:us-east-2:123456789101:KeyPair/05859e3d-331d-48ba-9034-12345EXAMPLE).

*/ inline void SetArn(const char* value) { m_arnHasBeenSet = true; m_arn.assign(value); } /** *

The Amazon Resource Name (ARN) of the key pair (e.g., * arn:aws:lightsail:us-east-2:123456789101:KeyPair/05859e3d-331d-48ba-9034-12345EXAMPLE).

*/ inline KeyPair& WithArn(const Aws::String& value) { SetArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the key pair (e.g., * arn:aws:lightsail:us-east-2:123456789101:KeyPair/05859e3d-331d-48ba-9034-12345EXAMPLE).

*/ inline KeyPair& WithArn(Aws::String&& value) { SetArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the key pair (e.g., * arn:aws:lightsail:us-east-2:123456789101:KeyPair/05859e3d-331d-48ba-9034-12345EXAMPLE).

*/ inline KeyPair& WithArn(const char* value) { SetArn(value); return *this;} /** *

The support code. Include this code in your email to support when you have * questions about an instance or another resource in Lightsail. This code enables * our support team to look up your Lightsail information more easily.

*/ inline const Aws::String& GetSupportCode() const{ return m_supportCode; } /** *

The support code. Include this code in your email to support when you have * questions about an instance or another resource in Lightsail. This code enables * our support team to look up your Lightsail information more easily.

*/ inline bool SupportCodeHasBeenSet() const { return m_supportCodeHasBeenSet; } /** *

The support code. Include this code in your email to support when you have * questions about an instance or another resource in Lightsail. This code enables * our support team to look up your Lightsail information more easily.

*/ inline void SetSupportCode(const Aws::String& value) { m_supportCodeHasBeenSet = true; m_supportCode = value; } /** *

The support code. Include this code in your email to support when you have * questions about an instance or another resource in Lightsail. This code enables * our support team to look up your Lightsail information more easily.

*/ inline void SetSupportCode(Aws::String&& value) { m_supportCodeHasBeenSet = true; m_supportCode = std::move(value); } /** *

The support code. Include this code in your email to support when you have * questions about an instance or another resource in Lightsail. This code enables * our support team to look up your Lightsail information more easily.

*/ inline void SetSupportCode(const char* value) { m_supportCodeHasBeenSet = true; m_supportCode.assign(value); } /** *

The support code. Include this code in your email to support when you have * questions about an instance or another resource in Lightsail. This code enables * our support team to look up your Lightsail information more easily.

*/ inline KeyPair& WithSupportCode(const Aws::String& value) { SetSupportCode(value); return *this;} /** *

The support code. Include this code in your email to support when you have * questions about an instance or another resource in Lightsail. This code enables * our support team to look up your Lightsail information more easily.

*/ inline KeyPair& WithSupportCode(Aws::String&& value) { SetSupportCode(std::move(value)); return *this;} /** *

The support code. Include this code in your email to support when you have * questions about an instance or another resource in Lightsail. This code enables * our support team to look up your Lightsail information more easily.

*/ inline KeyPair& WithSupportCode(const char* value) { SetSupportCode(value); return *this;} /** *

The timestamp when the key pair was created (e.g., * 1479816991.349).

*/ inline const Aws::Utils::DateTime& GetCreatedAt() const{ return m_createdAt; } /** *

The timestamp when the key pair was created (e.g., * 1479816991.349).

*/ inline bool CreatedAtHasBeenSet() const { return m_createdAtHasBeenSet; } /** *

The timestamp when the key pair was created (e.g., * 1479816991.349).

*/ inline void SetCreatedAt(const Aws::Utils::DateTime& value) { m_createdAtHasBeenSet = true; m_createdAt = value; } /** *

The timestamp when the key pair was created (e.g., * 1479816991.349).

*/ inline void SetCreatedAt(Aws::Utils::DateTime&& value) { m_createdAtHasBeenSet = true; m_createdAt = std::move(value); } /** *

The timestamp when the key pair was created (e.g., * 1479816991.349).

*/ inline KeyPair& WithCreatedAt(const Aws::Utils::DateTime& value) { SetCreatedAt(value); return *this;} /** *

The timestamp when the key pair was created (e.g., * 1479816991.349).

*/ inline KeyPair& WithCreatedAt(Aws::Utils::DateTime&& value) { SetCreatedAt(std::move(value)); return *this;} /** *

The region name and Availability Zone where the key pair was created.

*/ inline const ResourceLocation& GetLocation() const{ return m_location; } /** *

The region name and Availability Zone where the key pair was created.

*/ inline bool LocationHasBeenSet() const { return m_locationHasBeenSet; } /** *

The region name and Availability Zone where the key pair was created.

*/ inline void SetLocation(const ResourceLocation& value) { m_locationHasBeenSet = true; m_location = value; } /** *

The region name and Availability Zone where the key pair was created.

*/ inline void SetLocation(ResourceLocation&& value) { m_locationHasBeenSet = true; m_location = std::move(value); } /** *

The region name and Availability Zone where the key pair was created.

*/ inline KeyPair& WithLocation(const ResourceLocation& value) { SetLocation(value); return *this;} /** *

The region name and Availability Zone where the key pair was created.

*/ inline KeyPair& WithLocation(ResourceLocation&& value) { SetLocation(std::move(value)); return *this;} /** *

The resource type (usually KeyPair).

*/ inline const ResourceType& GetResourceType() const{ return m_resourceType; } /** *

The resource type (usually KeyPair).

*/ inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; } /** *

The resource type (usually KeyPair).

*/ inline void SetResourceType(const ResourceType& value) { m_resourceTypeHasBeenSet = true; m_resourceType = value; } /** *

The resource type (usually KeyPair).

*/ inline void SetResourceType(ResourceType&& value) { m_resourceTypeHasBeenSet = true; m_resourceType = std::move(value); } /** *

The resource type (usually KeyPair).

*/ inline KeyPair& WithResourceType(const ResourceType& value) { SetResourceType(value); return *this;} /** *

The resource type (usually KeyPair).

*/ inline KeyPair& WithResourceType(ResourceType&& value) { SetResourceType(std::move(value)); return *this;} /** *

The tag keys and optional values for the resource. For more information about * tags in Lightsail, see the Lightsail * Dev Guide.

*/ inline const Aws::Vector& GetTags() const{ return m_tags; } /** *

The tag keys and optional values for the resource. For more information about * tags in Lightsail, see the Lightsail * Dev Guide.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

The tag keys and optional values for the resource. For more information about * tags in Lightsail, see the Lightsail * Dev Guide.

*/ inline void SetTags(const Aws::Vector& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

The tag keys and optional values for the resource. For more information about * tags in Lightsail, see the Lightsail * Dev Guide.

*/ inline void SetTags(Aws::Vector&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

The tag keys and optional values for the resource. For more information about * tags in Lightsail, see the Lightsail * Dev Guide.

*/ inline KeyPair& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

The tag keys and optional values for the resource. For more information about * tags in Lightsail, see the Lightsail * Dev Guide.

*/ inline KeyPair& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

The tag keys and optional values for the resource. For more information about * tags in Lightsail, see the Lightsail * Dev Guide.

*/ inline KeyPair& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

The tag keys and optional values for the resource. For more information about * tags in Lightsail, see the Lightsail * Dev Guide.

*/ inline KeyPair& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } /** *

The RSA fingerprint of the key pair.

*/ inline const Aws::String& GetFingerprint() const{ return m_fingerprint; } /** *

The RSA fingerprint of the key pair.

*/ inline bool FingerprintHasBeenSet() const { return m_fingerprintHasBeenSet; } /** *

The RSA fingerprint of the key pair.

*/ inline void SetFingerprint(const Aws::String& value) { m_fingerprintHasBeenSet = true; m_fingerprint = value; } /** *

The RSA fingerprint of the key pair.

*/ inline void SetFingerprint(Aws::String&& value) { m_fingerprintHasBeenSet = true; m_fingerprint = std::move(value); } /** *

The RSA fingerprint of the key pair.

*/ inline void SetFingerprint(const char* value) { m_fingerprintHasBeenSet = true; m_fingerprint.assign(value); } /** *

The RSA fingerprint of the key pair.

*/ inline KeyPair& WithFingerprint(const Aws::String& value) { SetFingerprint(value); return *this;} /** *

The RSA fingerprint of the key pair.

*/ inline KeyPair& WithFingerprint(Aws::String&& value) { SetFingerprint(std::move(value)); return *this;} /** *

The RSA fingerprint of the key pair.

*/ inline KeyPair& WithFingerprint(const char* value) { SetFingerprint(value); return *this;} private: Aws::String m_name; bool m_nameHasBeenSet; Aws::String m_arn; bool m_arnHasBeenSet; Aws::String m_supportCode; bool m_supportCodeHasBeenSet; Aws::Utils::DateTime m_createdAt; bool m_createdAtHasBeenSet; ResourceLocation m_location; bool m_locationHasBeenSet; ResourceType m_resourceType; bool m_resourceTypeHasBeenSet; Aws::Vector m_tags; bool m_tagsHasBeenSet; Aws::String m_fingerprint; bool m_fingerprintHasBeenSet; }; } // namespace Model } // namespace Lightsail } // namespace Aws