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

In IPAM, an allocation is a CIDR assignment from an IPAM pool to another IPAM * pool or to a resource.

See Also:

AWS * API Reference

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

The CIDR for the allocation. A CIDR is a representation of an IP address and * its associated network mask (or netmask) and refers to a range of IP addresses. * An IPv4 CIDR example is 10.24.34.0/23. An IPv6 CIDR example is * 2001:DB8::/32.

*/ inline const Aws::String& GetCidr() const{ return m_cidr; } /** *

The CIDR for the allocation. A CIDR is a representation of an IP address and * its associated network mask (or netmask) and refers to a range of IP addresses. * An IPv4 CIDR example is 10.24.34.0/23. An IPv6 CIDR example is * 2001:DB8::/32.

*/ inline bool CidrHasBeenSet() const { return m_cidrHasBeenSet; } /** *

The CIDR for the allocation. A CIDR is a representation of an IP address and * its associated network mask (or netmask) and refers to a range of IP addresses. * An IPv4 CIDR example is 10.24.34.0/23. An IPv6 CIDR example is * 2001:DB8::/32.

*/ inline void SetCidr(const Aws::String& value) { m_cidrHasBeenSet = true; m_cidr = value; } /** *

The CIDR for the allocation. A CIDR is a representation of an IP address and * its associated network mask (or netmask) and refers to a range of IP addresses. * An IPv4 CIDR example is 10.24.34.0/23. An IPv6 CIDR example is * 2001:DB8::/32.

*/ inline void SetCidr(Aws::String&& value) { m_cidrHasBeenSet = true; m_cidr = std::move(value); } /** *

The CIDR for the allocation. A CIDR is a representation of an IP address and * its associated network mask (or netmask) and refers to a range of IP addresses. * An IPv4 CIDR example is 10.24.34.0/23. An IPv6 CIDR example is * 2001:DB8::/32.

*/ inline void SetCidr(const char* value) { m_cidrHasBeenSet = true; m_cidr.assign(value); } /** *

The CIDR for the allocation. A CIDR is a representation of an IP address and * its associated network mask (or netmask) and refers to a range of IP addresses. * An IPv4 CIDR example is 10.24.34.0/23. An IPv6 CIDR example is * 2001:DB8::/32.

*/ inline IpamPoolAllocation& WithCidr(const Aws::String& value) { SetCidr(value); return *this;} /** *

The CIDR for the allocation. A CIDR is a representation of an IP address and * its associated network mask (or netmask) and refers to a range of IP addresses. * An IPv4 CIDR example is 10.24.34.0/23. An IPv6 CIDR example is * 2001:DB8::/32.

*/ inline IpamPoolAllocation& WithCidr(Aws::String&& value) { SetCidr(std::move(value)); return *this;} /** *

The CIDR for the allocation. A CIDR is a representation of an IP address and * its associated network mask (or netmask) and refers to a range of IP addresses. * An IPv4 CIDR example is 10.24.34.0/23. An IPv6 CIDR example is * 2001:DB8::/32.

*/ inline IpamPoolAllocation& WithCidr(const char* value) { SetCidr(value); return *this;} /** *

The ID of an allocation.

*/ inline const Aws::String& GetIpamPoolAllocationId() const{ return m_ipamPoolAllocationId; } /** *

The ID of an allocation.

*/ inline bool IpamPoolAllocationIdHasBeenSet() const { return m_ipamPoolAllocationIdHasBeenSet; } /** *

The ID of an allocation.

*/ inline void SetIpamPoolAllocationId(const Aws::String& value) { m_ipamPoolAllocationIdHasBeenSet = true; m_ipamPoolAllocationId = value; } /** *

The ID of an allocation.

*/ inline void SetIpamPoolAllocationId(Aws::String&& value) { m_ipamPoolAllocationIdHasBeenSet = true; m_ipamPoolAllocationId = std::move(value); } /** *

The ID of an allocation.

*/ inline void SetIpamPoolAllocationId(const char* value) { m_ipamPoolAllocationIdHasBeenSet = true; m_ipamPoolAllocationId.assign(value); } /** *

The ID of an allocation.

*/ inline IpamPoolAllocation& WithIpamPoolAllocationId(const Aws::String& value) { SetIpamPoolAllocationId(value); return *this;} /** *

The ID of an allocation.

*/ inline IpamPoolAllocation& WithIpamPoolAllocationId(Aws::String&& value) { SetIpamPoolAllocationId(std::move(value)); return *this;} /** *

The ID of an allocation.

*/ inline IpamPoolAllocation& WithIpamPoolAllocationId(const char* value) { SetIpamPoolAllocationId(value); return *this;} /** *

A description of the pool allocation.

*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *

A description of the pool allocation.

*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *

A description of the pool allocation.

*/ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *

A description of the pool allocation.

*/ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *

A description of the pool allocation.

*/ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** *

A description of the pool allocation.

*/ inline IpamPoolAllocation& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

A description of the pool allocation.

*/ inline IpamPoolAllocation& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *

A description of the pool allocation.

*/ inline IpamPoolAllocation& WithDescription(const char* value) { SetDescription(value); return *this;} /** *

The ID of the resource.

*/ inline const Aws::String& GetResourceId() const{ return m_resourceId; } /** *

The ID of the resource.

*/ inline bool ResourceIdHasBeenSet() const { return m_resourceIdHasBeenSet; } /** *

The ID of the resource.

*/ inline void SetResourceId(const Aws::String& value) { m_resourceIdHasBeenSet = true; m_resourceId = value; } /** *

The ID of the resource.

*/ inline void SetResourceId(Aws::String&& value) { m_resourceIdHasBeenSet = true; m_resourceId = std::move(value); } /** *

The ID of the resource.

*/ inline void SetResourceId(const char* value) { m_resourceIdHasBeenSet = true; m_resourceId.assign(value); } /** *

The ID of the resource.

*/ inline IpamPoolAllocation& WithResourceId(const Aws::String& value) { SetResourceId(value); return *this;} /** *

The ID of the resource.

*/ inline IpamPoolAllocation& WithResourceId(Aws::String&& value) { SetResourceId(std::move(value)); return *this;} /** *

The ID of the resource.

*/ inline IpamPoolAllocation& WithResourceId(const char* value) { SetResourceId(value); return *this;} /** *

The type of the resource.

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

The type of the resource.

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

The type of the resource.

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

The type of the resource.

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

The type of the resource.

*/ inline IpamPoolAllocation& WithResourceType(const IpamPoolAllocationResourceType& value) { SetResourceType(value); return *this;} /** *

The type of the resource.

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

The Amazon Web Services Region of the resource.

*/ inline const Aws::String& GetResourceRegion() const{ return m_resourceRegion; } /** *

The Amazon Web Services Region of the resource.

*/ inline bool ResourceRegionHasBeenSet() const { return m_resourceRegionHasBeenSet; } /** *

The Amazon Web Services Region of the resource.

*/ inline void SetResourceRegion(const Aws::String& value) { m_resourceRegionHasBeenSet = true; m_resourceRegion = value; } /** *

The Amazon Web Services Region of the resource.

*/ inline void SetResourceRegion(Aws::String&& value) { m_resourceRegionHasBeenSet = true; m_resourceRegion = std::move(value); } /** *

The Amazon Web Services Region of the resource.

*/ inline void SetResourceRegion(const char* value) { m_resourceRegionHasBeenSet = true; m_resourceRegion.assign(value); } /** *

The Amazon Web Services Region of the resource.

*/ inline IpamPoolAllocation& WithResourceRegion(const Aws::String& value) { SetResourceRegion(value); return *this;} /** *

The Amazon Web Services Region of the resource.

*/ inline IpamPoolAllocation& WithResourceRegion(Aws::String&& value) { SetResourceRegion(std::move(value)); return *this;} /** *

The Amazon Web Services Region of the resource.

*/ inline IpamPoolAllocation& WithResourceRegion(const char* value) { SetResourceRegion(value); return *this;} /** *

The owner of the resource.

*/ inline const Aws::String& GetResourceOwner() const{ return m_resourceOwner; } /** *

The owner of the resource.

*/ inline bool ResourceOwnerHasBeenSet() const { return m_resourceOwnerHasBeenSet; } /** *

The owner of the resource.

*/ inline void SetResourceOwner(const Aws::String& value) { m_resourceOwnerHasBeenSet = true; m_resourceOwner = value; } /** *

The owner of the resource.

*/ inline void SetResourceOwner(Aws::String&& value) { m_resourceOwnerHasBeenSet = true; m_resourceOwner = std::move(value); } /** *

The owner of the resource.

*/ inline void SetResourceOwner(const char* value) { m_resourceOwnerHasBeenSet = true; m_resourceOwner.assign(value); } /** *

The owner of the resource.

*/ inline IpamPoolAllocation& WithResourceOwner(const Aws::String& value) { SetResourceOwner(value); return *this;} /** *

The owner of the resource.

*/ inline IpamPoolAllocation& WithResourceOwner(Aws::String&& value) { SetResourceOwner(std::move(value)); return *this;} /** *

The owner of the resource.

*/ inline IpamPoolAllocation& WithResourceOwner(const char* value) { SetResourceOwner(value); return *this;} private: Aws::String m_cidr; bool m_cidrHasBeenSet = false; Aws::String m_ipamPoolAllocationId; bool m_ipamPoolAllocationIdHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; Aws::String m_resourceId; bool m_resourceIdHasBeenSet = false; IpamPoolAllocationResourceType m_resourceType; bool m_resourceTypeHasBeenSet = false; Aws::String m_resourceRegion; bool m_resourceRegionHasBeenSet = false; Aws::String m_resourceOwner; bool m_resourceOwnerHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws