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

Contains information about a connection.

See Also:

AWS * API Reference

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

The ARN of the connection.

*/ inline const Aws::String& GetConnectionArn() const{ return m_connectionArn; } /** *

The ARN of the connection.

*/ inline bool ConnectionArnHasBeenSet() const { return m_connectionArnHasBeenSet; } /** *

The ARN of the connection.

*/ inline void SetConnectionArn(const Aws::String& value) { m_connectionArnHasBeenSet = true; m_connectionArn = value; } /** *

The ARN of the connection.

*/ inline void SetConnectionArn(Aws::String&& value) { m_connectionArnHasBeenSet = true; m_connectionArn = std::move(value); } /** *

The ARN of the connection.

*/ inline void SetConnectionArn(const char* value) { m_connectionArnHasBeenSet = true; m_connectionArn.assign(value); } /** *

The ARN of the connection.

*/ inline Connection& WithConnectionArn(const Aws::String& value) { SetConnectionArn(value); return *this;} /** *

The ARN of the connection.

*/ inline Connection& WithConnectionArn(Aws::String&& value) { SetConnectionArn(std::move(value)); return *this;} /** *

The ARN of the connection.

*/ inline Connection& WithConnectionArn(const char* value) { SetConnectionArn(value); return *this;} /** *

The name of the connection.

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

The name of the connection.

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

The name of the connection.

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

The name of the connection.

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

The name of the connection.

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

The name of the connection.

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

The name of the connection.

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

The name of the connection.

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

The state of the connection.

*/ inline const ConnectionState& GetConnectionState() const{ return m_connectionState; } /** *

The state of the connection.

*/ inline bool ConnectionStateHasBeenSet() const { return m_connectionStateHasBeenSet; } /** *

The state of the connection.

*/ inline void SetConnectionState(const ConnectionState& value) { m_connectionStateHasBeenSet = true; m_connectionState = value; } /** *

The state of the connection.

*/ inline void SetConnectionState(ConnectionState&& value) { m_connectionStateHasBeenSet = true; m_connectionState = std::move(value); } /** *

The state of the connection.

*/ inline Connection& WithConnectionState(const ConnectionState& value) { SetConnectionState(value); return *this;} /** *

The state of the connection.

*/ inline Connection& WithConnectionState(ConnectionState&& value) { SetConnectionState(std::move(value)); return *this;} /** *

The reason that the connection is in the connection state.

*/ inline const Aws::String& GetStateReason() const{ return m_stateReason; } /** *

The reason that the connection is in the connection state.

*/ inline bool StateReasonHasBeenSet() const { return m_stateReasonHasBeenSet; } /** *

The reason that the connection is in the connection state.

*/ inline void SetStateReason(const Aws::String& value) { m_stateReasonHasBeenSet = true; m_stateReason = value; } /** *

The reason that the connection is in the connection state.

*/ inline void SetStateReason(Aws::String&& value) { m_stateReasonHasBeenSet = true; m_stateReason = std::move(value); } /** *

The reason that the connection is in the connection state.

*/ inline void SetStateReason(const char* value) { m_stateReasonHasBeenSet = true; m_stateReason.assign(value); } /** *

The reason that the connection is in the connection state.

*/ inline Connection& WithStateReason(const Aws::String& value) { SetStateReason(value); return *this;} /** *

The reason that the connection is in the connection state.

*/ inline Connection& WithStateReason(Aws::String&& value) { SetStateReason(std::move(value)); return *this;} /** *

The reason that the connection is in the connection state.

*/ inline Connection& WithStateReason(const char* value) { SetStateReason(value); return *this;} /** *

The authorization type specified for the connection.

OAUTH * tokens are refreshed when a 401 or 407 response is returned.

*/ inline const ConnectionAuthorizationType& GetAuthorizationType() const{ return m_authorizationType; } /** *

The authorization type specified for the connection.

OAUTH * tokens are refreshed when a 401 or 407 response is returned.

*/ inline bool AuthorizationTypeHasBeenSet() const { return m_authorizationTypeHasBeenSet; } /** *

The authorization type specified for the connection.

OAUTH * tokens are refreshed when a 401 or 407 response is returned.

*/ inline void SetAuthorizationType(const ConnectionAuthorizationType& value) { m_authorizationTypeHasBeenSet = true; m_authorizationType = value; } /** *

The authorization type specified for the connection.

OAUTH * tokens are refreshed when a 401 or 407 response is returned.

*/ inline void SetAuthorizationType(ConnectionAuthorizationType&& value) { m_authorizationTypeHasBeenSet = true; m_authorizationType = std::move(value); } /** *

The authorization type specified for the connection.

OAUTH * tokens are refreshed when a 401 or 407 response is returned.

*/ inline Connection& WithAuthorizationType(const ConnectionAuthorizationType& value) { SetAuthorizationType(value); return *this;} /** *

The authorization type specified for the connection.

OAUTH * tokens are refreshed when a 401 or 407 response is returned.

*/ inline Connection& WithAuthorizationType(ConnectionAuthorizationType&& value) { SetAuthorizationType(std::move(value)); return *this;} /** *

A time stamp for the time that the connection was created.

*/ inline const Aws::Utils::DateTime& GetCreationTime() const{ return m_creationTime; } /** *

A time stamp for the time that the connection was created.

*/ inline bool CreationTimeHasBeenSet() const { return m_creationTimeHasBeenSet; } /** *

A time stamp for the time that the connection was created.

*/ inline void SetCreationTime(const Aws::Utils::DateTime& value) { m_creationTimeHasBeenSet = true; m_creationTime = value; } /** *

A time stamp for the time that the connection was created.

*/ inline void SetCreationTime(Aws::Utils::DateTime&& value) { m_creationTimeHasBeenSet = true; m_creationTime = std::move(value); } /** *

A time stamp for the time that the connection was created.

*/ inline Connection& WithCreationTime(const Aws::Utils::DateTime& value) { SetCreationTime(value); return *this;} /** *

A time stamp for the time that the connection was created.

*/ inline Connection& WithCreationTime(Aws::Utils::DateTime&& value) { SetCreationTime(std::move(value)); return *this;} /** *

A time stamp for the time that the connection was last modified.

*/ inline const Aws::Utils::DateTime& GetLastModifiedTime() const{ return m_lastModifiedTime; } /** *

A time stamp for the time that the connection was last modified.

*/ inline bool LastModifiedTimeHasBeenSet() const { return m_lastModifiedTimeHasBeenSet; } /** *

A time stamp for the time that the connection was last modified.

*/ inline void SetLastModifiedTime(const Aws::Utils::DateTime& value) { m_lastModifiedTimeHasBeenSet = true; m_lastModifiedTime = value; } /** *

A time stamp for the time that the connection was last modified.

*/ inline void SetLastModifiedTime(Aws::Utils::DateTime&& value) { m_lastModifiedTimeHasBeenSet = true; m_lastModifiedTime = std::move(value); } /** *

A time stamp for the time that the connection was last modified.

*/ inline Connection& WithLastModifiedTime(const Aws::Utils::DateTime& value) { SetLastModifiedTime(value); return *this;} /** *

A time stamp for the time that the connection was last modified.

*/ inline Connection& WithLastModifiedTime(Aws::Utils::DateTime&& value) { SetLastModifiedTime(std::move(value)); return *this;} /** *

A time stamp for the time that the connection was last authorized.

*/ inline const Aws::Utils::DateTime& GetLastAuthorizedTime() const{ return m_lastAuthorizedTime; } /** *

A time stamp for the time that the connection was last authorized.

*/ inline bool LastAuthorizedTimeHasBeenSet() const { return m_lastAuthorizedTimeHasBeenSet; } /** *

A time stamp for the time that the connection was last authorized.

*/ inline void SetLastAuthorizedTime(const Aws::Utils::DateTime& value) { m_lastAuthorizedTimeHasBeenSet = true; m_lastAuthorizedTime = value; } /** *

A time stamp for the time that the connection was last authorized.

*/ inline void SetLastAuthorizedTime(Aws::Utils::DateTime&& value) { m_lastAuthorizedTimeHasBeenSet = true; m_lastAuthorizedTime = std::move(value); } /** *

A time stamp for the time that the connection was last authorized.

*/ inline Connection& WithLastAuthorizedTime(const Aws::Utils::DateTime& value) { SetLastAuthorizedTime(value); return *this;} /** *

A time stamp for the time that the connection was last authorized.

*/ inline Connection& WithLastAuthorizedTime(Aws::Utils::DateTime&& value) { SetLastAuthorizedTime(std::move(value)); return *this;} private: Aws::String m_connectionArn; bool m_connectionArnHasBeenSet = false; Aws::String m_name; bool m_nameHasBeenSet = false; ConnectionState m_connectionState; bool m_connectionStateHasBeenSet = false; Aws::String m_stateReason; bool m_stateReasonHasBeenSet = false; ConnectionAuthorizationType m_authorizationType; bool m_authorizationTypeHasBeenSet = false; Aws::Utils::DateTime m_creationTime; bool m_creationTimeHasBeenSet = false; Aws::Utils::DateTime m_lastModifiedTime; bool m_lastModifiedTimeHasBeenSet = false; Aws::Utils::DateTime m_lastAuthorizedTime; bool m_lastAuthorizedTimeHasBeenSet = false; }; } // namespace Model } // namespace EventBridge } // namespace Aws