1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/ec2/EC2_EXPORTS.h> 8 #include <aws/ec2/EC2Request.h> 9 #include <aws/ec2/model/VolumeAttributeName.h> 10 #include <aws/core/utils/memory/stl/AWSString.h> 11 #include <utility> 12 13 namespace Aws 14 { 15 namespace EC2 16 { 17 namespace Model 18 { 19 20 /** 21 */ 22 class AWS_EC2_API DescribeVolumeAttributeRequest : public EC2Request 23 { 24 public: 25 DescribeVolumeAttributeRequest(); 26 27 // Service request name is the Operation name which will send this request out, 28 // each operation should has unique request name, so that we can get operation's name from this request. 29 // Note: this is not true for response, multiple operations may have the same response name, 30 // so we can not get operation's name from response. GetServiceRequestName()31 inline virtual const char* GetServiceRequestName() const override { return "DescribeVolumeAttribute"; } 32 33 Aws::String SerializePayload() const override; 34 35 protected: 36 void DumpBodyToUrl(Aws::Http::URI& uri ) const override; 37 38 public: 39 40 /** 41 * <p>The attribute of the volume. This parameter is required.</p> 42 */ GetAttribute()43 inline const VolumeAttributeName& GetAttribute() const{ return m_attribute; } 44 45 /** 46 * <p>The attribute of the volume. This parameter is required.</p> 47 */ AttributeHasBeenSet()48 inline bool AttributeHasBeenSet() const { return m_attributeHasBeenSet; } 49 50 /** 51 * <p>The attribute of the volume. This parameter is required.</p> 52 */ SetAttribute(const VolumeAttributeName & value)53 inline void SetAttribute(const VolumeAttributeName& value) { m_attributeHasBeenSet = true; m_attribute = value; } 54 55 /** 56 * <p>The attribute of the volume. This parameter is required.</p> 57 */ SetAttribute(VolumeAttributeName && value)58 inline void SetAttribute(VolumeAttributeName&& value) { m_attributeHasBeenSet = true; m_attribute = std::move(value); } 59 60 /** 61 * <p>The attribute of the volume. This parameter is required.</p> 62 */ WithAttribute(const VolumeAttributeName & value)63 inline DescribeVolumeAttributeRequest& WithAttribute(const VolumeAttributeName& value) { SetAttribute(value); return *this;} 64 65 /** 66 * <p>The attribute of the volume. This parameter is required.</p> 67 */ WithAttribute(VolumeAttributeName && value)68 inline DescribeVolumeAttributeRequest& WithAttribute(VolumeAttributeName&& value) { SetAttribute(std::move(value)); return *this;} 69 70 71 /** 72 * <p>The ID of the volume.</p> 73 */ GetVolumeId()74 inline const Aws::String& GetVolumeId() const{ return m_volumeId; } 75 76 /** 77 * <p>The ID of the volume.</p> 78 */ VolumeIdHasBeenSet()79 inline bool VolumeIdHasBeenSet() const { return m_volumeIdHasBeenSet; } 80 81 /** 82 * <p>The ID of the volume.</p> 83 */ SetVolumeId(const Aws::String & value)84 inline void SetVolumeId(const Aws::String& value) { m_volumeIdHasBeenSet = true; m_volumeId = value; } 85 86 /** 87 * <p>The ID of the volume.</p> 88 */ SetVolumeId(Aws::String && value)89 inline void SetVolumeId(Aws::String&& value) { m_volumeIdHasBeenSet = true; m_volumeId = std::move(value); } 90 91 /** 92 * <p>The ID of the volume.</p> 93 */ SetVolumeId(const char * value)94 inline void SetVolumeId(const char* value) { m_volumeIdHasBeenSet = true; m_volumeId.assign(value); } 95 96 /** 97 * <p>The ID of the volume.</p> 98 */ WithVolumeId(const Aws::String & value)99 inline DescribeVolumeAttributeRequest& WithVolumeId(const Aws::String& value) { SetVolumeId(value); return *this;} 100 101 /** 102 * <p>The ID of the volume.</p> 103 */ WithVolumeId(Aws::String && value)104 inline DescribeVolumeAttributeRequest& WithVolumeId(Aws::String&& value) { SetVolumeId(std::move(value)); return *this;} 105 106 /** 107 * <p>The ID of the volume.</p> 108 */ WithVolumeId(const char * value)109 inline DescribeVolumeAttributeRequest& WithVolumeId(const char* value) { SetVolumeId(value); return *this;} 110 111 112 /** 113 * <p>Checks whether you have the required permissions for the action, without 114 * actually making the request, and provides an error response. If you have the 115 * required permissions, the error response is <code>DryRunOperation</code>. 116 * Otherwise, it is <code>UnauthorizedOperation</code>.</p> 117 */ GetDryRun()118 inline bool GetDryRun() const{ return m_dryRun; } 119 120 /** 121 * <p>Checks whether you have the required permissions for the action, without 122 * actually making the request, and provides an error response. If you have the 123 * required permissions, the error response is <code>DryRunOperation</code>. 124 * Otherwise, it is <code>UnauthorizedOperation</code>.</p> 125 */ DryRunHasBeenSet()126 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; } 127 128 /** 129 * <p>Checks whether you have the required permissions for the action, without 130 * actually making the request, and provides an error response. If you have the 131 * required permissions, the error response is <code>DryRunOperation</code>. 132 * Otherwise, it is <code>UnauthorizedOperation</code>.</p> 133 */ SetDryRun(bool value)134 inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; } 135 136 /** 137 * <p>Checks whether you have the required permissions for the action, without 138 * actually making the request, and provides an error response. If you have the 139 * required permissions, the error response is <code>DryRunOperation</code>. 140 * Otherwise, it is <code>UnauthorizedOperation</code>.</p> 141 */ WithDryRun(bool value)142 inline DescribeVolumeAttributeRequest& WithDryRun(bool value) { SetDryRun(value); return *this;} 143 144 private: 145 146 VolumeAttributeName m_attribute; 147 bool m_attributeHasBeenSet; 148 149 Aws::String m_volumeId; 150 bool m_volumeIdHasBeenSet; 151 152 bool m_dryRun; 153 bool m_dryRunHasBeenSet; 154 }; 155 156 } // namespace Model 157 } // namespace EC2 158 } // namespace Aws 159