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/core/utils/memory/stl/AWSStreamFwd.h> 9 #include <aws/ec2/model/UnsuccessfulItemError.h> 10 #include <aws/core/utils/memory/stl/AWSString.h> 11 #include <utility> 12 13 namespace Aws 14 { 15 namespace Utils 16 { 17 namespace Xml 18 { 19 class XmlNode; 20 } // namespace Xml 21 } // namespace Utils 22 namespace EC2 23 { 24 namespace Model 25 { 26 27 /** 28 * <p>Information about items that were not successfully processed in a batch 29 * call.</p><p><h3>See Also:</h3> <a 30 * href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnsuccessfulItem">AWS 31 * API Reference</a></p> 32 */ 33 class AWS_EC2_API UnsuccessfulItem 34 { 35 public: 36 UnsuccessfulItem(); 37 UnsuccessfulItem(const Aws::Utils::Xml::XmlNode& xmlNode); 38 UnsuccessfulItem& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); 39 40 void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; 41 void OutputToStream(Aws::OStream& oStream, const char* location) const; 42 43 44 /** 45 * <p>Information about the error.</p> 46 */ GetError()47 inline const UnsuccessfulItemError& GetError() const{ return m_error; } 48 49 /** 50 * <p>Information about the error.</p> 51 */ ErrorHasBeenSet()52 inline bool ErrorHasBeenSet() const { return m_errorHasBeenSet; } 53 54 /** 55 * <p>Information about the error.</p> 56 */ SetError(const UnsuccessfulItemError & value)57 inline void SetError(const UnsuccessfulItemError& value) { m_errorHasBeenSet = true; m_error = value; } 58 59 /** 60 * <p>Information about the error.</p> 61 */ SetError(UnsuccessfulItemError && value)62 inline void SetError(UnsuccessfulItemError&& value) { m_errorHasBeenSet = true; m_error = std::move(value); } 63 64 /** 65 * <p>Information about the error.</p> 66 */ WithError(const UnsuccessfulItemError & value)67 inline UnsuccessfulItem& WithError(const UnsuccessfulItemError& value) { SetError(value); return *this;} 68 69 /** 70 * <p>Information about the error.</p> 71 */ WithError(UnsuccessfulItemError && value)72 inline UnsuccessfulItem& WithError(UnsuccessfulItemError&& value) { SetError(std::move(value)); return *this;} 73 74 75 /** 76 * <p>The ID of the resource.</p> 77 */ GetResourceId()78 inline const Aws::String& GetResourceId() const{ return m_resourceId; } 79 80 /** 81 * <p>The ID of the resource.</p> 82 */ ResourceIdHasBeenSet()83 inline bool ResourceIdHasBeenSet() const { return m_resourceIdHasBeenSet; } 84 85 /** 86 * <p>The ID of the resource.</p> 87 */ SetResourceId(const Aws::String & value)88 inline void SetResourceId(const Aws::String& value) { m_resourceIdHasBeenSet = true; m_resourceId = value; } 89 90 /** 91 * <p>The ID of the resource.</p> 92 */ SetResourceId(Aws::String && value)93 inline void SetResourceId(Aws::String&& value) { m_resourceIdHasBeenSet = true; m_resourceId = std::move(value); } 94 95 /** 96 * <p>The ID of the resource.</p> 97 */ SetResourceId(const char * value)98 inline void SetResourceId(const char* value) { m_resourceIdHasBeenSet = true; m_resourceId.assign(value); } 99 100 /** 101 * <p>The ID of the resource.</p> 102 */ WithResourceId(const Aws::String & value)103 inline UnsuccessfulItem& WithResourceId(const Aws::String& value) { SetResourceId(value); return *this;} 104 105 /** 106 * <p>The ID of the resource.</p> 107 */ WithResourceId(Aws::String && value)108 inline UnsuccessfulItem& WithResourceId(Aws::String&& value) { SetResourceId(std::move(value)); return *this;} 109 110 /** 111 * <p>The ID of the resource.</p> 112 */ WithResourceId(const char * value)113 inline UnsuccessfulItem& WithResourceId(const char* value) { SetResourceId(value); return *this;} 114 115 private: 116 117 UnsuccessfulItemError m_error; 118 bool m_errorHasBeenSet; 119 120 Aws::String m_resourceId; 121 bool m_resourceIdHasBeenSet; 122 }; 123 124 } // namespace Model 125 } // namespace EC2 126 } // namespace Aws 127