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/servicecatalog/ServiceCatalog_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSVector.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <aws/servicecatalog/model/ShareError.h>
11 #include <utility>
12 
13 namespace Aws
14 {
15 namespace Utils
16 {
17 namespace Json
18 {
19   class JsonValue;
20   class JsonView;
21 } // namespace Json
22 } // namespace Utils
23 namespace ServiceCatalog
24 {
25 namespace Model
26 {
27 
28   /**
29    * <p>Information about the portfolio share operation.</p><p><h3>See Also:</h3>
30    * <a
31    * href="http://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ShareDetails">AWS
32    * API Reference</a></p>
33    */
34   class AWS_SERVICECATALOG_API ShareDetails
35   {
36   public:
37     ShareDetails();
38     ShareDetails(Aws::Utils::Json::JsonView jsonValue);
39     ShareDetails& operator=(Aws::Utils::Json::JsonView jsonValue);
40     Aws::Utils::Json::JsonValue Jsonize() const;
41 
42 
43     /**
44      * <p>List of accounts for whom the operation succeeded.</p>
45      */
GetSuccessfulShares()46     inline const Aws::Vector<Aws::String>& GetSuccessfulShares() const{ return m_successfulShares; }
47 
48     /**
49      * <p>List of accounts for whom the operation succeeded.</p>
50      */
SuccessfulSharesHasBeenSet()51     inline bool SuccessfulSharesHasBeenSet() const { return m_successfulSharesHasBeenSet; }
52 
53     /**
54      * <p>List of accounts for whom the operation succeeded.</p>
55      */
SetSuccessfulShares(const Aws::Vector<Aws::String> & value)56     inline void SetSuccessfulShares(const Aws::Vector<Aws::String>& value) { m_successfulSharesHasBeenSet = true; m_successfulShares = value; }
57 
58     /**
59      * <p>List of accounts for whom the operation succeeded.</p>
60      */
SetSuccessfulShares(Aws::Vector<Aws::String> && value)61     inline void SetSuccessfulShares(Aws::Vector<Aws::String>&& value) { m_successfulSharesHasBeenSet = true; m_successfulShares = std::move(value); }
62 
63     /**
64      * <p>List of accounts for whom the operation succeeded.</p>
65      */
WithSuccessfulShares(const Aws::Vector<Aws::String> & value)66     inline ShareDetails& WithSuccessfulShares(const Aws::Vector<Aws::String>& value) { SetSuccessfulShares(value); return *this;}
67 
68     /**
69      * <p>List of accounts for whom the operation succeeded.</p>
70      */
WithSuccessfulShares(Aws::Vector<Aws::String> && value)71     inline ShareDetails& WithSuccessfulShares(Aws::Vector<Aws::String>&& value) { SetSuccessfulShares(std::move(value)); return *this;}
72 
73     /**
74      * <p>List of accounts for whom the operation succeeded.</p>
75      */
AddSuccessfulShares(const Aws::String & value)76     inline ShareDetails& AddSuccessfulShares(const Aws::String& value) { m_successfulSharesHasBeenSet = true; m_successfulShares.push_back(value); return *this; }
77 
78     /**
79      * <p>List of accounts for whom the operation succeeded.</p>
80      */
AddSuccessfulShares(Aws::String && value)81     inline ShareDetails& AddSuccessfulShares(Aws::String&& value) { m_successfulSharesHasBeenSet = true; m_successfulShares.push_back(std::move(value)); return *this; }
82 
83     /**
84      * <p>List of accounts for whom the operation succeeded.</p>
85      */
AddSuccessfulShares(const char * value)86     inline ShareDetails& AddSuccessfulShares(const char* value) { m_successfulSharesHasBeenSet = true; m_successfulShares.push_back(value); return *this; }
87 
88 
89     /**
90      * <p>List of errors.</p>
91      */
GetShareErrors()92     inline const Aws::Vector<ShareError>& GetShareErrors() const{ return m_shareErrors; }
93 
94     /**
95      * <p>List of errors.</p>
96      */
ShareErrorsHasBeenSet()97     inline bool ShareErrorsHasBeenSet() const { return m_shareErrorsHasBeenSet; }
98 
99     /**
100      * <p>List of errors.</p>
101      */
SetShareErrors(const Aws::Vector<ShareError> & value)102     inline void SetShareErrors(const Aws::Vector<ShareError>& value) { m_shareErrorsHasBeenSet = true; m_shareErrors = value; }
103 
104     /**
105      * <p>List of errors.</p>
106      */
SetShareErrors(Aws::Vector<ShareError> && value)107     inline void SetShareErrors(Aws::Vector<ShareError>&& value) { m_shareErrorsHasBeenSet = true; m_shareErrors = std::move(value); }
108 
109     /**
110      * <p>List of errors.</p>
111      */
WithShareErrors(const Aws::Vector<ShareError> & value)112     inline ShareDetails& WithShareErrors(const Aws::Vector<ShareError>& value) { SetShareErrors(value); return *this;}
113 
114     /**
115      * <p>List of errors.</p>
116      */
WithShareErrors(Aws::Vector<ShareError> && value)117     inline ShareDetails& WithShareErrors(Aws::Vector<ShareError>&& value) { SetShareErrors(std::move(value)); return *this;}
118 
119     /**
120      * <p>List of errors.</p>
121      */
AddShareErrors(const ShareError & value)122     inline ShareDetails& AddShareErrors(const ShareError& value) { m_shareErrorsHasBeenSet = true; m_shareErrors.push_back(value); return *this; }
123 
124     /**
125      * <p>List of errors.</p>
126      */
AddShareErrors(ShareError && value)127     inline ShareDetails& AddShareErrors(ShareError&& value) { m_shareErrorsHasBeenSet = true; m_shareErrors.push_back(std::move(value)); return *this; }
128 
129   private:
130 
131     Aws::Vector<Aws::String> m_successfulShares;
132     bool m_successfulSharesHasBeenSet;
133 
134     Aws::Vector<ShareError> m_shareErrors;
135     bool m_shareErrorsHasBeenSet;
136   };
137 
138 } // namespace Model
139 } // namespace ServiceCatalog
140 } // namespace Aws
141