sqladmin  v1beta4
clone_context.h
1 // Copyright 2010 Google Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); you may not
4 // use this file except in compliance with the License. You may obtain a copy of
5 // the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 // License for the specific language governing permissions and limitations under
13 // the License.
14 
15 // This code was generated by google-apis-code-generator 1.5.1
16 // Build date: 2018-10-08 17:45:39 UTC
17 // on: 2019-06-11, 00:07:27 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // Cloud SQL Admin API (sqladmin/v1beta4)
24 // Generated from:
25 // Version: v1beta4
26 // Revision: 76
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_SQLADMIN_API_CLONE_CONTEXT_H_
31 #define GOOGLE_SQLADMIN_API_CLONE_CONTEXT_H_
32 
33 #include <string>
34 #include "googleapis/base/integral_types.h"
35 #include "googleapis/base/macros.h"
36 #include "googleapis/client/data/jsoncpp_data.h"
37 #include "googleapis/strings/stringpiece.h"
38 
39 #include "google/sqladmin_api/bin_log_coordinates.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_sqladmin_api {
46 using namespace googleapis;
47 
53 class CloneContext : public client::JsonCppData {
54  public:
60  static CloneContext* New();
61 
67  explicit CloneContext(const Json::Value& storage);
68 
74  explicit CloneContext(Json::Value* storage);
75 
79  virtual ~CloneContext();
80 
86  const StringPiece GetTypeName() const {
87  return StringPiece("google_sqladmin_api::CloneContext");
88  }
89 
95  bool has_bin_log_coordinates() const {
96  return Storage().isMember("binLogCoordinates");
97  }
98 
103  MutableStorage()->removeMember("binLogCoordinates");
104  }
105 
106 
111  const BinLogCoordinates get_bin_log_coordinates() const;
112 
123  BinLogCoordinates mutable_binLogCoordinates();
124 
132  return Storage().isMember("destinationInstanceName");
133  }
134 
139  MutableStorage()->removeMember("destinationInstanceName");
140  }
141 
142 
146  const StringPiece get_destination_instance_name() const {
147  const Json::Value& v = Storage("destinationInstanceName");
148  if (v == Json::Value::null) return StringPiece("");
149  return StringPiece(v.asCString());
150  }
151 
159  void set_destination_instance_name(const StringPiece& value) {
160  *MutableStorage("destinationInstanceName") = value.data();
161  }
162 
168  bool has_kind() const {
169  return Storage().isMember("kind");
170  }
171 
175  void clear_kind() {
176  MutableStorage()->removeMember("kind");
177  }
178 
179 
183  const StringPiece get_kind() const {
184  const Json::Value& v = Storage("kind");
185  if (v == Json::Value::null) return StringPiece("");
186  return StringPiece(v.asCString());
187  }
188 
196  void set_kind(const StringPiece& value) {
197  *MutableStorage("kind") = value.data();
198  }
199 
205  bool has_pitr_timestamp_ms() const {
206  return Storage().isMember("pitrTimestampMs");
207  }
208 
213  MutableStorage()->removeMember("pitrTimestampMs");
214  }
215 
216 
220  int64 get_pitr_timestamp_ms() const {
221  const Json::Value& storage = Storage("pitrTimestampMs");
222  return client::JsonValueToCppValueHelper<int64 >(storage);
223  }
224 
232  void set_pitr_timestamp_ms(int64 value) {
233  client::SetJsonValueFromCppValueHelper<int64 >(
234  value, MutableStorage("pitrTimestampMs"));
235  }
236 
237  private:
238  void operator=(const CloneContext&);
239 }; // CloneContext
240 } // namespace google_sqladmin_api
241 #endif // GOOGLE_SQLADMIN_API_CLONE_CONTEXT_H_
const StringPiece get_destination_instance_name() const
Definition: clone_context.h:146
void clear_kind()
Definition: clone_context.h:175
Definition: clone_context.h:53
bool has_bin_log_coordinates() const
Definition: clone_context.h:95
const StringPiece get_kind() const
Definition: clone_context.h:183
const StringPiece GetTypeName() const
Definition: clone_context.h:86
Definition: bin_log_coordinates.h:51
bool has_kind() const
Definition: clone_context.h:168
void set_kind(const StringPiece &value)
Definition: clone_context.h:196
void set_pitr_timestamp_ms(int64 value)
Definition: clone_context.h:232
Definition: acl_entry.cc:41
Definition: acl_entry.h:39
bool has_destination_instance_name() const
Definition: clone_context.h:131
void clear_bin_log_coordinates()
Definition: clone_context.h:102
int64 get_pitr_timestamp_ms() const
Definition: clone_context.h:220
void clear_pitr_timestamp_ms()
Definition: clone_context.h:212
void set_destination_instance_name(const StringPiece &value)
Definition: clone_context.h:159
void clear_destination_instance_name()
Definition: clone_context.h:138
bool has_pitr_timestamp_ms() const
Definition: clone_context.h:205