AWS SDK for C++  0.12.9
AWS SDK for C++
RecordPatch.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 CognitoSync
31 {
32 namespace Model
33 {
34 
39  {
40  public:
41  RecordPatch();
42  RecordPatch(const Aws::Utils::Json::JsonValue& jsonValue);
43  RecordPatch& operator=(const Aws::Utils::Json::JsonValue& jsonValue);
44  Aws::Utils::Json::JsonValue Jsonize() const;
45 
49  inline const Operation& GetOp() const{ return m_op; }
50 
54  inline void SetOp(const Operation& value) { m_opHasBeenSet = true; m_op = value; }
55 
59  inline void SetOp(Operation&& value) { m_opHasBeenSet = true; m_op = value; }
60 
64  inline RecordPatch& WithOp(const Operation& value) { SetOp(value); return *this;}
65 
69  inline RecordPatch& WithOp(Operation&& value) { SetOp(value); return *this;}
70 
74  inline const Aws::String& GetKey() const{ return m_key; }
75 
79  inline void SetKey(const Aws::String& value) { m_keyHasBeenSet = true; m_key = value; }
80 
84  inline void SetKey(Aws::String&& value) { m_keyHasBeenSet = true; m_key = value; }
85 
89  inline void SetKey(const char* value) { m_keyHasBeenSet = true; m_key.assign(value); }
90 
94  inline RecordPatch& WithKey(const Aws::String& value) { SetKey(value); return *this;}
95 
99  inline RecordPatch& WithKey(Aws::String&& value) { SetKey(value); return *this;}
100 
104  inline RecordPatch& WithKey(const char* value) { SetKey(value); return *this;}
105 
109  inline const Aws::String& GetValue() const{ return m_value; }
110 
114  inline void SetValue(const Aws::String& value) { m_valueHasBeenSet = true; m_value = value; }
115 
119  inline void SetValue(Aws::String&& value) { m_valueHasBeenSet = true; m_value = value; }
120 
124  inline void SetValue(const char* value) { m_valueHasBeenSet = true; m_value.assign(value); }
125 
129  inline RecordPatch& WithValue(const Aws::String& value) { SetValue(value); return *this;}
130 
134  inline RecordPatch& WithValue(Aws::String&& value) { SetValue(value); return *this;}
135 
139  inline RecordPatch& WithValue(const char* value) { SetValue(value); return *this;}
140 
144  inline long long GetSyncCount() const{ return m_syncCount; }
145 
149  inline void SetSyncCount(long long value) { m_syncCountHasBeenSet = true; m_syncCount = value; }
150 
154  inline RecordPatch& WithSyncCount(long long value) { SetSyncCount(value); return *this;}
155 
159  inline const Aws::Utils::DateTime& GetDeviceLastModifiedDate() const{ return m_deviceLastModifiedDate; }
160 
164  inline void SetDeviceLastModifiedDate(const Aws::Utils::DateTime& value) { m_deviceLastModifiedDateHasBeenSet = true; m_deviceLastModifiedDate = value; }
165 
169  inline void SetDeviceLastModifiedDate(Aws::Utils::DateTime&& value) { m_deviceLastModifiedDateHasBeenSet = true; m_deviceLastModifiedDate = value; }
170 
174  inline RecordPatch& WithDeviceLastModifiedDate(const Aws::Utils::DateTime& value) { SetDeviceLastModifiedDate(value); return *this;}
175 
179  inline RecordPatch& WithDeviceLastModifiedDate(Aws::Utils::DateTime&& value) { SetDeviceLastModifiedDate(value); return *this;}
180 
181  private:
182  Operation m_op;
183  bool m_opHasBeenSet;
184  Aws::String m_key;
185  bool m_keyHasBeenSet;
186  Aws::String m_value;
187  bool m_valueHasBeenSet;
188  long long m_syncCount;
189  bool m_syncCountHasBeenSet;
190  Aws::Utils::DateTime m_deviceLastModifiedDate;
191  bool m_deviceLastModifiedDateHasBeenSet;
192  };
193 
194 } // namespace Model
195 } // namespace CognitoSync
196 } // namespace Aws
RecordPatch & WithSyncCount(long long value)
Definition: RecordPatch.h:154
void SetValue(Aws::String &&value)
Definition: RecordPatch.h:119
RecordPatch & WithKey(Aws::String &&value)
Definition: RecordPatch.h:99
const Aws::String & GetKey() const
Definition: RecordPatch.h:74
void SetOp(const Operation &value)
Definition: RecordPatch.h:54
RecordPatch & WithValue(const char *value)
Definition: RecordPatch.h:139
RecordPatch & WithKey(const Aws::String &value)
Definition: RecordPatch.h:94
RecordPatch & WithValue(const Aws::String &value)
Definition: RecordPatch.h:129
void SetValue(const char *value)
Definition: RecordPatch.h:124
RecordPatch & WithDeviceLastModifiedDate(const Aws::Utils::DateTime &value)
Definition: RecordPatch.h:174
void SetValue(const Aws::String &value)
Definition: RecordPatch.h:114
void SetKey(const Aws::String &value)
Definition: RecordPatch.h:79
RecordPatch & WithValue(Aws::String &&value)
Definition: RecordPatch.h:134
void SetKey(Aws::String &&value)
Definition: RecordPatch.h:84
void SetSyncCount(long long value)
Definition: RecordPatch.h:149
const Operation & GetOp() const
Definition: RecordPatch.h:49
void SetOp(Operation &&value)
Definition: RecordPatch.h:59
RecordPatch & WithOp(const Operation &value)
Definition: RecordPatch.h:64
void SetDeviceLastModifiedDate(const Aws::Utils::DateTime &value)
Definition: RecordPatch.h:164
void SetKey(const char *value)
Definition: RecordPatch.h:89
const Aws::String & GetValue() const
Definition: RecordPatch.h:109
const Aws::Utils::DateTime & GetDeviceLastModifiedDate() const
Definition: RecordPatch.h:159
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
RecordPatch & WithOp(Operation &&value)
Definition: RecordPatch.h:69
void SetDeviceLastModifiedDate(Aws::Utils::DateTime &&value)
Definition: RecordPatch.h:169
RecordPatch & WithDeviceLastModifiedDate(Aws::Utils::DateTime &&value)
Definition: RecordPatch.h:179
#define AWS_COGNITOSYNC_API
RecordPatch & WithKey(const char *value)
Definition: RecordPatch.h:104
JSON (JavaScript Object Notation).