/** * 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 Lightsail { namespace Model { /** *

Describes the last time an access key was used.

This object * does not include data in the response of a CreateBucketAccessKey * action.

See Also:

AWS * API Reference

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

The date and time when the access key was most recently used.

This * value is null if the access key has not been used.

*/ inline const Aws::Utils::DateTime& GetLastUsedDate() const{ return m_lastUsedDate; } /** *

The date and time when the access key was most recently used.

This * value is null if the access key has not been used.

*/ inline bool LastUsedDateHasBeenSet() const { return m_lastUsedDateHasBeenSet; } /** *

The date and time when the access key was most recently used.

This * value is null if the access key has not been used.

*/ inline void SetLastUsedDate(const Aws::Utils::DateTime& value) { m_lastUsedDateHasBeenSet = true; m_lastUsedDate = value; } /** *

The date and time when the access key was most recently used.

This * value is null if the access key has not been used.

*/ inline void SetLastUsedDate(Aws::Utils::DateTime&& value) { m_lastUsedDateHasBeenSet = true; m_lastUsedDate = std::move(value); } /** *

The date and time when the access key was most recently used.

This * value is null if the access key has not been used.

*/ inline AccessKeyLastUsed& WithLastUsedDate(const Aws::Utils::DateTime& value) { SetLastUsedDate(value); return *this;} /** *

The date and time when the access key was most recently used.

This * value is null if the access key has not been used.

*/ inline AccessKeyLastUsed& WithLastUsedDate(Aws::Utils::DateTime&& value) { SetLastUsedDate(std::move(value)); return *this;} /** *

The Amazon Web Services Region where this access key was most recently * used.

This value is N/A if the access key has not been * used.

*/ inline const Aws::String& GetRegion() const{ return m_region; } /** *

The Amazon Web Services Region where this access key was most recently * used.

This value is N/A if the access key has not been * used.

*/ inline bool RegionHasBeenSet() const { return m_regionHasBeenSet; } /** *

The Amazon Web Services Region where this access key was most recently * used.

This value is N/A if the access key has not been * used.

*/ inline void SetRegion(const Aws::String& value) { m_regionHasBeenSet = true; m_region = value; } /** *

The Amazon Web Services Region where this access key was most recently * used.

This value is N/A if the access key has not been * used.

*/ inline void SetRegion(Aws::String&& value) { m_regionHasBeenSet = true; m_region = std::move(value); } /** *

The Amazon Web Services Region where this access key was most recently * used.

This value is N/A if the access key has not been * used.

*/ inline void SetRegion(const char* value) { m_regionHasBeenSet = true; m_region.assign(value); } /** *

The Amazon Web Services Region where this access key was most recently * used.

This value is N/A if the access key has not been * used.

*/ inline AccessKeyLastUsed& WithRegion(const Aws::String& value) { SetRegion(value); return *this;} /** *

The Amazon Web Services Region where this access key was most recently * used.

This value is N/A if the access key has not been * used.

*/ inline AccessKeyLastUsed& WithRegion(Aws::String&& value) { SetRegion(std::move(value)); return *this;} /** *

The Amazon Web Services Region where this access key was most recently * used.

This value is N/A if the access key has not been * used.

*/ inline AccessKeyLastUsed& WithRegion(const char* value) { SetRegion(value); return *this;} /** *

The name of the Amazon Web Services service with which this access key was * most recently used.

This value is N/A if the access key has * not been used.

*/ inline const Aws::String& GetServiceName() const{ return m_serviceName; } /** *

The name of the Amazon Web Services service with which this access key was * most recently used.

This value is N/A if the access key has * not been used.

*/ inline bool ServiceNameHasBeenSet() const { return m_serviceNameHasBeenSet; } /** *

The name of the Amazon Web Services service with which this access key was * most recently used.

This value is N/A if the access key has * not been used.

*/ inline void SetServiceName(const Aws::String& value) { m_serviceNameHasBeenSet = true; m_serviceName = value; } /** *

The name of the Amazon Web Services service with which this access key was * most recently used.

This value is N/A if the access key has * not been used.

*/ inline void SetServiceName(Aws::String&& value) { m_serviceNameHasBeenSet = true; m_serviceName = std::move(value); } /** *

The name of the Amazon Web Services service with which this access key was * most recently used.

This value is N/A if the access key has * not been used.

*/ inline void SetServiceName(const char* value) { m_serviceNameHasBeenSet = true; m_serviceName.assign(value); } /** *

The name of the Amazon Web Services service with which this access key was * most recently used.

This value is N/A if the access key has * not been used.

*/ inline AccessKeyLastUsed& WithServiceName(const Aws::String& value) { SetServiceName(value); return *this;} /** *

The name of the Amazon Web Services service with which this access key was * most recently used.

This value is N/A if the access key has * not been used.

*/ inline AccessKeyLastUsed& WithServiceName(Aws::String&& value) { SetServiceName(std::move(value)); return *this;} /** *

The name of the Amazon Web Services service with which this access key was * most recently used.

This value is N/A if the access key has * not been used.

*/ inline AccessKeyLastUsed& WithServiceName(const char* value) { SetServiceName(value); return *this;} private: Aws::Utils::DateTime m_lastUsedDate; bool m_lastUsedDateHasBeenSet = false; Aws::String m_region; bool m_regionHasBeenSet = false; Aws::String m_serviceName; bool m_serviceNameHasBeenSet = false; }; } // namespace Model } // namespace Lightsail } // namespace Aws