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

Represents a single node within a node group (shard).

See * Also:

AWS * API Reference

*/ class NodeGroupMember { public: AWS_ELASTICACHE_API NodeGroupMember(); AWS_ELASTICACHE_API NodeGroupMember(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_ELASTICACHE_API NodeGroupMember& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_ELASTICACHE_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_ELASTICACHE_API void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

The ID of the cluster to which the node belongs.

*/ inline const Aws::String& GetCacheClusterId() const{ return m_cacheClusterId; } /** *

The ID of the cluster to which the node belongs.

*/ inline bool CacheClusterIdHasBeenSet() const { return m_cacheClusterIdHasBeenSet; } /** *

The ID of the cluster to which the node belongs.

*/ inline void SetCacheClusterId(const Aws::String& value) { m_cacheClusterIdHasBeenSet = true; m_cacheClusterId = value; } /** *

The ID of the cluster to which the node belongs.

*/ inline void SetCacheClusterId(Aws::String&& value) { m_cacheClusterIdHasBeenSet = true; m_cacheClusterId = std::move(value); } /** *

The ID of the cluster to which the node belongs.

*/ inline void SetCacheClusterId(const char* value) { m_cacheClusterIdHasBeenSet = true; m_cacheClusterId.assign(value); } /** *

The ID of the cluster to which the node belongs.

*/ inline NodeGroupMember& WithCacheClusterId(const Aws::String& value) { SetCacheClusterId(value); return *this;} /** *

The ID of the cluster to which the node belongs.

*/ inline NodeGroupMember& WithCacheClusterId(Aws::String&& value) { SetCacheClusterId(std::move(value)); return *this;} /** *

The ID of the cluster to which the node belongs.

*/ inline NodeGroupMember& WithCacheClusterId(const char* value) { SetCacheClusterId(value); return *this;} /** *

The ID of the node within its cluster. A node ID is a numeric identifier * (0001, 0002, etc.).

*/ inline const Aws::String& GetCacheNodeId() const{ return m_cacheNodeId; } /** *

The ID of the node within its cluster. A node ID is a numeric identifier * (0001, 0002, etc.).

*/ inline bool CacheNodeIdHasBeenSet() const { return m_cacheNodeIdHasBeenSet; } /** *

The ID of the node within its cluster. A node ID is a numeric identifier * (0001, 0002, etc.).

*/ inline void SetCacheNodeId(const Aws::String& value) { m_cacheNodeIdHasBeenSet = true; m_cacheNodeId = value; } /** *

The ID of the node within its cluster. A node ID is a numeric identifier * (0001, 0002, etc.).

*/ inline void SetCacheNodeId(Aws::String&& value) { m_cacheNodeIdHasBeenSet = true; m_cacheNodeId = std::move(value); } /** *

The ID of the node within its cluster. A node ID is a numeric identifier * (0001, 0002, etc.).

*/ inline void SetCacheNodeId(const char* value) { m_cacheNodeIdHasBeenSet = true; m_cacheNodeId.assign(value); } /** *

The ID of the node within its cluster. A node ID is a numeric identifier * (0001, 0002, etc.).

*/ inline NodeGroupMember& WithCacheNodeId(const Aws::String& value) { SetCacheNodeId(value); return *this;} /** *

The ID of the node within its cluster. A node ID is a numeric identifier * (0001, 0002, etc.).

*/ inline NodeGroupMember& WithCacheNodeId(Aws::String&& value) { SetCacheNodeId(std::move(value)); return *this;} /** *

The ID of the node within its cluster. A node ID is a numeric identifier * (0001, 0002, etc.).

*/ inline NodeGroupMember& WithCacheNodeId(const char* value) { SetCacheNodeId(value); return *this;} /** *

The information required for client programs to connect to a node for read * operations. The read endpoint is only applicable on Redis (cluster mode * disabled) clusters.

*/ inline const Endpoint& GetReadEndpoint() const{ return m_readEndpoint; } /** *

The information required for client programs to connect to a node for read * operations. The read endpoint is only applicable on Redis (cluster mode * disabled) clusters.

*/ inline bool ReadEndpointHasBeenSet() const { return m_readEndpointHasBeenSet; } /** *

The information required for client programs to connect to a node for read * operations. The read endpoint is only applicable on Redis (cluster mode * disabled) clusters.

*/ inline void SetReadEndpoint(const Endpoint& value) { m_readEndpointHasBeenSet = true; m_readEndpoint = value; } /** *

The information required for client programs to connect to a node for read * operations. The read endpoint is only applicable on Redis (cluster mode * disabled) clusters.

*/ inline void SetReadEndpoint(Endpoint&& value) { m_readEndpointHasBeenSet = true; m_readEndpoint = std::move(value); } /** *

The information required for client programs to connect to a node for read * operations. The read endpoint is only applicable on Redis (cluster mode * disabled) clusters.

*/ inline NodeGroupMember& WithReadEndpoint(const Endpoint& value) { SetReadEndpoint(value); return *this;} /** *

The information required for client programs to connect to a node for read * operations. The read endpoint is only applicable on Redis (cluster mode * disabled) clusters.

*/ inline NodeGroupMember& WithReadEndpoint(Endpoint&& value) { SetReadEndpoint(std::move(value)); return *this;} /** *

The name of the Availability Zone in which the node is located.

*/ inline const Aws::String& GetPreferredAvailabilityZone() const{ return m_preferredAvailabilityZone; } /** *

The name of the Availability Zone in which the node is located.

*/ inline bool PreferredAvailabilityZoneHasBeenSet() const { return m_preferredAvailabilityZoneHasBeenSet; } /** *

The name of the Availability Zone in which the node is located.

*/ inline void SetPreferredAvailabilityZone(const Aws::String& value) { m_preferredAvailabilityZoneHasBeenSet = true; m_preferredAvailabilityZone = value; } /** *

The name of the Availability Zone in which the node is located.

*/ inline void SetPreferredAvailabilityZone(Aws::String&& value) { m_preferredAvailabilityZoneHasBeenSet = true; m_preferredAvailabilityZone = std::move(value); } /** *

The name of the Availability Zone in which the node is located.

*/ inline void SetPreferredAvailabilityZone(const char* value) { m_preferredAvailabilityZoneHasBeenSet = true; m_preferredAvailabilityZone.assign(value); } /** *

The name of the Availability Zone in which the node is located.

*/ inline NodeGroupMember& WithPreferredAvailabilityZone(const Aws::String& value) { SetPreferredAvailabilityZone(value); return *this;} /** *

The name of the Availability Zone in which the node is located.

*/ inline NodeGroupMember& WithPreferredAvailabilityZone(Aws::String&& value) { SetPreferredAvailabilityZone(std::move(value)); return *this;} /** *

The name of the Availability Zone in which the node is located.

*/ inline NodeGroupMember& WithPreferredAvailabilityZone(const char* value) { SetPreferredAvailabilityZone(value); return *this;} /** *

The outpost ARN of the node group member.

*/ inline const Aws::String& GetPreferredOutpostArn() const{ return m_preferredOutpostArn; } /** *

The outpost ARN of the node group member.

*/ inline bool PreferredOutpostArnHasBeenSet() const { return m_preferredOutpostArnHasBeenSet; } /** *

The outpost ARN of the node group member.

*/ inline void SetPreferredOutpostArn(const Aws::String& value) { m_preferredOutpostArnHasBeenSet = true; m_preferredOutpostArn = value; } /** *

The outpost ARN of the node group member.

*/ inline void SetPreferredOutpostArn(Aws::String&& value) { m_preferredOutpostArnHasBeenSet = true; m_preferredOutpostArn = std::move(value); } /** *

The outpost ARN of the node group member.

*/ inline void SetPreferredOutpostArn(const char* value) { m_preferredOutpostArnHasBeenSet = true; m_preferredOutpostArn.assign(value); } /** *

The outpost ARN of the node group member.

*/ inline NodeGroupMember& WithPreferredOutpostArn(const Aws::String& value) { SetPreferredOutpostArn(value); return *this;} /** *

The outpost ARN of the node group member.

*/ inline NodeGroupMember& WithPreferredOutpostArn(Aws::String&& value) { SetPreferredOutpostArn(std::move(value)); return *this;} /** *

The outpost ARN of the node group member.

*/ inline NodeGroupMember& WithPreferredOutpostArn(const char* value) { SetPreferredOutpostArn(value); return *this;} /** *

The role that is currently assigned to the node - primary or * replica. This member is only applicable for Redis (cluster mode * disabled) replication groups.

*/ inline const Aws::String& GetCurrentRole() const{ return m_currentRole; } /** *

The role that is currently assigned to the node - primary or * replica. This member is only applicable for Redis (cluster mode * disabled) replication groups.

*/ inline bool CurrentRoleHasBeenSet() const { return m_currentRoleHasBeenSet; } /** *

The role that is currently assigned to the node - primary or * replica. This member is only applicable for Redis (cluster mode * disabled) replication groups.

*/ inline void SetCurrentRole(const Aws::String& value) { m_currentRoleHasBeenSet = true; m_currentRole = value; } /** *

The role that is currently assigned to the node - primary or * replica. This member is only applicable for Redis (cluster mode * disabled) replication groups.

*/ inline void SetCurrentRole(Aws::String&& value) { m_currentRoleHasBeenSet = true; m_currentRole = std::move(value); } /** *

The role that is currently assigned to the node - primary or * replica. This member is only applicable for Redis (cluster mode * disabled) replication groups.

*/ inline void SetCurrentRole(const char* value) { m_currentRoleHasBeenSet = true; m_currentRole.assign(value); } /** *

The role that is currently assigned to the node - primary or * replica. This member is only applicable for Redis (cluster mode * disabled) replication groups.

*/ inline NodeGroupMember& WithCurrentRole(const Aws::String& value) { SetCurrentRole(value); return *this;} /** *

The role that is currently assigned to the node - primary or * replica. This member is only applicable for Redis (cluster mode * disabled) replication groups.

*/ inline NodeGroupMember& WithCurrentRole(Aws::String&& value) { SetCurrentRole(std::move(value)); return *this;} /** *

The role that is currently assigned to the node - primary or * replica. This member is only applicable for Redis (cluster mode * disabled) replication groups.

*/ inline NodeGroupMember& WithCurrentRole(const char* value) { SetCurrentRole(value); return *this;} private: Aws::String m_cacheClusterId; bool m_cacheClusterIdHasBeenSet = false; Aws::String m_cacheNodeId; bool m_cacheNodeIdHasBeenSet = false; Endpoint m_readEndpoint; bool m_readEndpointHasBeenSet = false; Aws::String m_preferredAvailabilityZone; bool m_preferredAvailabilityZoneHasBeenSet = false; Aws::String m_preferredOutpostArn; bool m_preferredOutpostArnHasBeenSet = false; Aws::String m_currentRole; bool m_currentRoleHasBeenSet = false; }; } // namespace Model } // namespace ElastiCache } // namespace Aws