AWS SDK for C++  0.14.3
AWS SDK for C++
Commit.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
20 
21 namespace Aws
22 {
23 namespace Utils
24 {
25 namespace Json
26 {
27  class JsonValue;
28 } // namespace Json
29 } // namespace Utils
30 namespace CodeCommit
31 {
32 namespace Model
33 {
34 
39  {
40  public:
41  Commit();
42  Commit(const Aws::Utils::Json::JsonValue& jsonValue);
43  Commit& operator=(const Aws::Utils::Json::JsonValue& jsonValue);
44  Aws::Utils::Json::JsonValue Jsonize() const;
45 
49  inline const Aws::String& GetTreeId() const{ return m_treeId; }
50 
54  inline void SetTreeId(const Aws::String& value) { m_treeIdHasBeenSet = true; m_treeId = value; }
55 
59  inline void SetTreeId(Aws::String&& value) { m_treeIdHasBeenSet = true; m_treeId = value; }
60 
64  inline void SetTreeId(const char* value) { m_treeIdHasBeenSet = true; m_treeId.assign(value); }
65 
69  inline Commit& WithTreeId(const Aws::String& value) { SetTreeId(value); return *this;}
70 
74  inline Commit& WithTreeId(Aws::String&& value) { SetTreeId(value); return *this;}
75 
79  inline Commit& WithTreeId(const char* value) { SetTreeId(value); return *this;}
80 
84  inline const Aws::Vector<Aws::String>& GetParents() const{ return m_parents; }
85 
89  inline void SetParents(const Aws::Vector<Aws::String>& value) { m_parentsHasBeenSet = true; m_parents = value; }
90 
94  inline void SetParents(Aws::Vector<Aws::String>&& value) { m_parentsHasBeenSet = true; m_parents = value; }
95 
99  inline Commit& WithParents(const Aws::Vector<Aws::String>& value) { SetParents(value); return *this;}
100 
104  inline Commit& WithParents(Aws::Vector<Aws::String>&& value) { SetParents(value); return *this;}
105 
109  inline Commit& AddParents(const Aws::String& value) { m_parentsHasBeenSet = true; m_parents.push_back(value); return *this; }
110 
114  inline Commit& AddParents(Aws::String&& value) { m_parentsHasBeenSet = true; m_parents.push_back(value); return *this; }
115 
119  inline Commit& AddParents(const char* value) { m_parentsHasBeenSet = true; m_parents.push_back(value); return *this; }
120 
124  inline const Aws::String& GetMessage() const{ return m_message; }
125 
129  inline void SetMessage(const Aws::String& value) { m_messageHasBeenSet = true; m_message = value; }
130 
134  inline void SetMessage(Aws::String&& value) { m_messageHasBeenSet = true; m_message = value; }
135 
139  inline void SetMessage(const char* value) { m_messageHasBeenSet = true; m_message.assign(value); }
140 
144  inline Commit& WithMessage(const Aws::String& value) { SetMessage(value); return *this;}
145 
149  inline Commit& WithMessage(Aws::String&& value) { SetMessage(value); return *this;}
150 
154  inline Commit& WithMessage(const char* value) { SetMessage(value); return *this;}
155 
159  inline const UserInfo& GetAuthor() const{ return m_author; }
160 
164  inline void SetAuthor(const UserInfo& value) { m_authorHasBeenSet = true; m_author = value; }
165 
169  inline void SetAuthor(UserInfo&& value) { m_authorHasBeenSet = true; m_author = value; }
170 
174  inline Commit& WithAuthor(const UserInfo& value) { SetAuthor(value); return *this;}
175 
179  inline Commit& WithAuthor(UserInfo&& value) { SetAuthor(value); return *this;}
180 
187  inline const UserInfo& GetCommitter() const{ return m_committer; }
188 
195  inline void SetCommitter(const UserInfo& value) { m_committerHasBeenSet = true; m_committer = value; }
196 
203  inline void SetCommitter(UserInfo&& value) { m_committerHasBeenSet = true; m_committer = value; }
204 
211  inline Commit& WithCommitter(const UserInfo& value) { SetCommitter(value); return *this;}
212 
219  inline Commit& WithCommitter(UserInfo&& value) { SetCommitter(value); return *this;}
220 
224  inline const Aws::String& GetAdditionalData() const{ return m_additionalData; }
225 
229  inline void SetAdditionalData(const Aws::String& value) { m_additionalDataHasBeenSet = true; m_additionalData = value; }
230 
234  inline void SetAdditionalData(Aws::String&& value) { m_additionalDataHasBeenSet = true; m_additionalData = value; }
235 
239  inline void SetAdditionalData(const char* value) { m_additionalDataHasBeenSet = true; m_additionalData.assign(value); }
240 
244  inline Commit& WithAdditionalData(const Aws::String& value) { SetAdditionalData(value); return *this;}
245 
249  inline Commit& WithAdditionalData(Aws::String&& value) { SetAdditionalData(value); return *this;}
250 
254  inline Commit& WithAdditionalData(const char* value) { SetAdditionalData(value); return *this;}
255 
256  private:
257  Aws::String m_treeId;
258  bool m_treeIdHasBeenSet;
259  Aws::Vector<Aws::String> m_parents;
260  bool m_parentsHasBeenSet;
261  Aws::String m_message;
262  bool m_messageHasBeenSet;
263  UserInfo m_author;
264  bool m_authorHasBeenSet;
265  UserInfo m_committer;
266  bool m_committerHasBeenSet;
267  Aws::String m_additionalData;
268  bool m_additionalDataHasBeenSet;
269  };
270 
271 } // namespace Model
272 } // namespace CodeCommit
273 } // namespace Aws
const UserInfo & GetAuthor() const
Definition: Commit.h:159
void SetMessage(const Aws::String &value)
Definition: Commit.h:129
const UserInfo & GetCommitter() const
Definition: Commit.h:187
const Aws::Vector< Aws::String > & GetParents() const
Definition: Commit.h:84
void SetMessage(Aws::String &&value)
Definition: Commit.h:134
Commit & WithMessage(Aws::String &&value)
Definition: Commit.h:149
void SetParents(Aws::Vector< Aws::String > &&value)
Definition: Commit.h:94
void SetParents(const Aws::Vector< Aws::String > &value)
Definition: Commit.h:89
void SetAdditionalData(const Aws::String &value)
Definition: Commit.h:229
Commit & WithAuthor(const UserInfo &value)
Definition: Commit.h:174
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
const Aws::String & GetAdditionalData() const
Definition: Commit.h:224
Commit & WithTreeId(Aws::String &&value)
Definition: Commit.h:74
const Aws::String & GetMessage() const
Definition: Commit.h:124
void SetCommitter(const UserInfo &value)
Definition: Commit.h:195
Commit & AddParents(const Aws::String &value)
Definition: Commit.h:109
Commit & AddParents(const char *value)
Definition: Commit.h:119
Commit & WithParents(const Aws::Vector< Aws::String > &value)
Definition: Commit.h:99
void SetTreeId(const char *value)
Definition: Commit.h:64
void SetAuthor(UserInfo &&value)
Definition: Commit.h:169
Commit & WithAdditionalData(Aws::String &&value)
Definition: Commit.h:249
Commit & WithTreeId(const char *value)
Definition: Commit.h:79
Commit & WithCommitter(UserInfo &&value)
Definition: Commit.h:219
void SetAdditionalData(Aws::String &&value)
Definition: Commit.h:234
void SetAuthor(const UserInfo &value)
Definition: Commit.h:164
#define AWS_CODECOMMIT_API
Commit & WithMessage(const Aws::String &value)
Definition: Commit.h:144
Commit & WithAdditionalData(const Aws::String &value)
Definition: Commit.h:244
const Aws::String & GetTreeId() const
Definition: Commit.h:49
Commit & WithCommitter(const UserInfo &value)
Definition: Commit.h:211
Commit & WithAdditionalData(const char *value)
Definition: Commit.h:254
void SetCommitter(UserInfo &&value)
Definition: Commit.h:203
Commit & WithTreeId(const Aws::String &value)
Definition: Commit.h:69
void SetAdditionalData(const char *value)
Definition: Commit.h:239
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Commit & WithMessage(const char *value)
Definition: Commit.h:154
Commit & AddParents(Aws::String &&value)
Definition: Commit.h:114
void SetTreeId(Aws::String &&value)
Definition: Commit.h:59
void SetMessage(const char *value)
Definition: Commit.h:139
Commit & WithParents(Aws::Vector< Aws::String > &&value)
Definition: Commit.h:104
Commit & WithAuthor(UserInfo &&value)
Definition: Commit.h:179
void SetTreeId(const Aws::String &value)
Definition: Commit.h:54
JSON (JavaScript Object Notation).