sqladmin  v1beta4
maintenance_window.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_MAINTENANCE_WINDOW_H_
31 #define GOOGLE_SQLADMIN_API_MAINTENANCE_WINDOW_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 namespace Json {
40 class Value;
41 } // namespace Json
42 
43 namespace google_sqladmin_api {
44 using namespace googleapis;
45 
52 class MaintenanceWindow : public client::JsonCppData {
53  public:
59  static MaintenanceWindow* New();
60 
66  explicit MaintenanceWindow(const Json::Value& storage);
67 
73  explicit MaintenanceWindow(Json::Value* storage);
74 
78  virtual ~MaintenanceWindow();
79 
85  const StringPiece GetTypeName() const {
86  return StringPiece("google_sqladmin_api::MaintenanceWindow");
87  }
88 
94  bool has_day() const {
95  return Storage().isMember("day");
96  }
97 
101  void clear_day() {
102  MutableStorage()->removeMember("day");
103  }
104 
105 
109  int32 get_day() const {
110  const Json::Value& storage = Storage("day");
111  return client::JsonValueToCppValueHelper<int32 >(storage);
112  }
113 
121  void set_day(int32 value) {
122  client::SetJsonValueFromCppValueHelper<int32 >(
123  value, MutableStorage("day"));
124  }
125 
131  bool has_hour() const {
132  return Storage().isMember("hour");
133  }
134 
138  void clear_hour() {
139  MutableStorage()->removeMember("hour");
140  }
141 
142 
146  int32 get_hour() const {
147  const Json::Value& storage = Storage("hour");
148  return client::JsonValueToCppValueHelper<int32 >(storage);
149  }
150 
158  void set_hour(int32 value) {
159  client::SetJsonValueFromCppValueHelper<int32 >(
160  value, MutableStorage("hour"));
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_update_track() const {
206  return Storage().isMember("updateTrack");
207  }
208 
213  MutableStorage()->removeMember("updateTrack");
214  }
215 
216 
220  const StringPiece get_update_track() const {
221  const Json::Value& v = Storage("updateTrack");
222  if (v == Json::Value::null) return StringPiece("");
223  return StringPiece(v.asCString());
224  }
225 
234  void set_update_track(const StringPiece& value) {
235  *MutableStorage("updateTrack") = value.data();
236  }
237 
238  private:
239  void operator=(const MaintenanceWindow&);
240 }; // MaintenanceWindow
241 } // namespace google_sqladmin_api
242 #endif // GOOGLE_SQLADMIN_API_MAINTENANCE_WINDOW_H_
void clear_update_track()
Definition: maintenance_window.h:212
void clear_day()
Definition: maintenance_window.h:101
bool has_hour() const
Definition: maintenance_window.h:131
void clear_hour()
Definition: maintenance_window.h:138
void set_update_track(const StringPiece &value)
Definition: maintenance_window.h:234
void set_hour(int32 value)
Definition: maintenance_window.h:158
bool has_kind() const
Definition: maintenance_window.h:168
void clear_kind()
Definition: maintenance_window.h:175
bool has_update_track() const
Definition: maintenance_window.h:205
void set_kind(const StringPiece &value)
Definition: maintenance_window.h:196
const StringPiece GetTypeName() const
Definition: maintenance_window.h:85
Definition: acl_entry.cc:41
const StringPiece get_kind() const
Definition: maintenance_window.h:183
Definition: maintenance_window.h:52
Definition: acl_entry.h:39
bool has_day() const
Definition: maintenance_window.h:94
void set_day(int32 value)
Definition: maintenance_window.h:121
int32 get_hour() const
Definition: maintenance_window.h:146
int32 get_day() const
Definition: maintenance_window.h:109
const StringPiece get_update_track() const
Definition: maintenance_window.h:220