AWS SDK for C++  0.14.3
AWS SDK for C++
UnsuccessfulItem.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
16 #include <aws/ec2/EC2_EXPORTS.h>
20 
21 namespace Aws
22 {
23 namespace Utils
24 {
25 namespace Xml
26 {
27  class XmlNode;
28 } // namespace Xml
29 } // namespace Utils
30 namespace EC2
31 {
32 namespace Model
33 {
34 
40  {
41  public:
44  UnsuccessfulItem& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
45 
46  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
47  void OutputToStream(Aws::OStream& oStream, const char* location) const;
48 
52  inline const UnsuccessfulItemError& GetError() const{ return m_error; }
53 
57  inline void SetError(const UnsuccessfulItemError& value) { m_errorHasBeenSet = true; m_error = value; }
58 
62  inline void SetError(UnsuccessfulItemError&& value) { m_errorHasBeenSet = true; m_error = value; }
63 
67  inline UnsuccessfulItem& WithError(const UnsuccessfulItemError& value) { SetError(value); return *this;}
68 
72  inline UnsuccessfulItem& WithError(UnsuccessfulItemError&& value) { SetError(value); return *this;}
73 
77  inline const Aws::String& GetResourceId() const{ return m_resourceId; }
78 
82  inline void SetResourceId(const Aws::String& value) { m_resourceIdHasBeenSet = true; m_resourceId = value; }
83 
87  inline void SetResourceId(Aws::String&& value) { m_resourceIdHasBeenSet = true; m_resourceId = value; }
88 
92  inline void SetResourceId(const char* value) { m_resourceIdHasBeenSet = true; m_resourceId.assign(value); }
93 
97  inline UnsuccessfulItem& WithResourceId(const Aws::String& value) { SetResourceId(value); return *this;}
98 
102  inline UnsuccessfulItem& WithResourceId(Aws::String&& value) { SetResourceId(value); return *this;}
103 
107  inline UnsuccessfulItem& WithResourceId(const char* value) { SetResourceId(value); return *this;}
108 
109  private:
110  UnsuccessfulItemError m_error;
111  bool m_errorHasBeenSet;
112  Aws::String m_resourceId;
113  bool m_resourceIdHasBeenSet;
114  };
115 
116 } // namespace Model
117 } // namespace EC2
118 } // namespace Aws
UnsuccessfulItem & WithError(UnsuccessfulItemError &&value)
void SetError(const UnsuccessfulItemError &value)
void SetError(UnsuccessfulItemError &&value)
UnsuccessfulItem & WithError(const UnsuccessfulItemError &value)
void SetResourceId(Aws::String &&value)
void SetResourceId(const char *value)
UnsuccessfulItem & WithResourceId(Aws::String &&value)
UnsuccessfulItem & WithResourceId(const Aws::String &value)
void SetResourceId(const Aws::String &value)
const UnsuccessfulItemError & GetError() const
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
UnsuccessfulItem & WithResourceId(const char *value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:37
const Aws::String & GetResourceId() const
JSON (JavaScript Object Notation).