deploymentmanager  v2
rule.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-03-20, 05:04:30 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // Google Cloud Deployment Manager API (deploymentmanager/v2)
24 // Generated from:
25 // Version: v2
26 // Revision: 71
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_DEPLOYMENTMANAGER_API_RULE_H_
31 #define GOOGLE_DEPLOYMENTMANAGER_API_RULE_H_
32 
33 #include <string>
34 #include "googleapis/base/macros.h"
35 #include "googleapis/client/data/jsoncpp_data.h"
36 #include "googleapis/strings/stringpiece.h"
37 
38 #include "google/deploymentmanager_api/condition.h"
39 #include "google/deploymentmanager_api/log_config.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
46 using namespace googleapis;
47 
53 class Rule : public client::JsonCppData {
54  public:
60  static Rule* New();
61 
67  explicit Rule(const Json::Value& storage);
68 
74  explicit Rule(Json::Value* storage);
75 
79  virtual ~Rule();
80 
86  const StringPiece GetTypeName() const {
87  return StringPiece("google_deploymentmanager_api::Rule");
88  }
89 
95  bool has_action() const {
96  return Storage().isMember("action");
97  }
98 
102  void clear_action() {
103  MutableStorage()->removeMember("action");
104  }
105 
106 
110  const StringPiece get_action() const {
111  const Json::Value& v = Storage("action");
112  if (v == Json::Value::null) return StringPiece("");
113  return StringPiece(v.asCString());
114  }
115 
123  void set_action(const StringPiece& value) {
124  *MutableStorage("action") = value.data();
125  }
126 
132  bool has_conditions() const {
133  return Storage().isMember("conditions");
134  }
135 
140  MutableStorage()->removeMember("conditions");
141  }
142 
143 
147  const client::JsonCppArray<Condition > get_conditions() const;
148 
158  client::JsonCppArray<Condition > mutable_conditions();
159 
165  bool has_description() const {
166  return Storage().isMember("description");
167  }
168 
173  MutableStorage()->removeMember("description");
174  }
175 
176 
180  const StringPiece get_description() const {
181  const Json::Value& v = Storage("description");
182  if (v == Json::Value::null) return StringPiece("");
183  return StringPiece(v.asCString());
184  }
185 
193  void set_description(const StringPiece& value) {
194  *MutableStorage("description") = value.data();
195  }
196 
202  bool has_ins() const {
203  return Storage().isMember("ins");
204  }
205 
209  void clear_ins() {
210  MutableStorage()->removeMember("ins");
211  }
212 
213 
217  const client::JsonCppArray<string > get_ins() const {
218  const Json::Value& storage = Storage("ins");
219  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
220  }
221 
230  client::JsonCppArray<string > mutable_ins() {
231  Json::Value* storage = MutableStorage("ins");
232  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
233  }
234 
240  bool has_log_configs() const {
241  return Storage().isMember("logConfigs");
242  }
243 
248  MutableStorage()->removeMember("logConfigs");
249  }
250 
251 
255  const client::JsonCppArray<LogConfig > get_log_configs() const;
256 
266  client::JsonCppArray<LogConfig > mutable_logConfigs();
267 
273  bool has_not_ins() const {
274  return Storage().isMember("notIns");
275  }
276 
280  void clear_not_ins() {
281  MutableStorage()->removeMember("notIns");
282  }
283 
284 
288  const client::JsonCppArray<string > get_not_ins() const {
289  const Json::Value& storage = Storage("notIns");
290  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
291  }
292 
301  client::JsonCppArray<string > mutable_notIns() {
302  Json::Value* storage = MutableStorage("notIns");
303  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
304  }
305 
311  bool has_permissions() const {
312  return Storage().isMember("permissions");
313  }
314 
319  MutableStorage()->removeMember("permissions");
320  }
321 
322 
326  const client::JsonCppArray<string > get_permissions() const {
327  const Json::Value& storage = Storage("permissions");
328  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
329  }
330 
341  client::JsonCppArray<string > mutable_permissions() {
342  Json::Value* storage = MutableStorage("permissions");
343  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
344  }
345 
346  private:
347  void operator=(const Rule&);
348 }; // Rule
349 } // namespace google_deploymentmanager_api
350 #endif // GOOGLE_DEPLOYMENTMANAGER_API_RULE_H_
bool has_conditions() const
Definition: rule.h:132
const client::JsonCppArray< string > get_ins() const
Definition: rule.h:217
void clear_permissions()
Definition: rule.h:318
void set_description(const StringPiece &value)
Definition: rule.h:193
client::JsonCppArray< string > mutable_notIns()
Definition: rule.h:301
bool has_description() const
Definition: rule.h:165
void clear_ins()
Definition: rule.h:209
void clear_conditions()
Definition: rule.h:139
bool has_ins() const
Definition: rule.h:202
const StringPiece GetTypeName() const
Definition: rule.h:86
void clear_description()
Definition: rule.h:172
const client::JsonCppArray< string > get_not_ins() const
Definition: rule.h:288
const client::JsonCppArray< string > get_permissions() const
Definition: rule.h:326
Definition: audit_config.h:40
const StringPiece get_description() const
Definition: rule.h:180
client::JsonCppArray< string > mutable_ins()
Definition: rule.h:230
bool has_log_configs() const
Definition: rule.h:240
client::JsonCppArray< string > mutable_permissions()
Definition: rule.h:341
Definition: audit_config.cc:42
bool has_not_ins() const
Definition: rule.h:273
bool has_permissions() const
Definition: rule.h:311
void clear_action()
Definition: rule.h:102
const StringPiece get_action() const
Definition: rule.h:110
void clear_log_configs()
Definition: rule.h:247
void set_action(const StringPiece &value)
Definition: rule.h:123
void clear_not_ins()
Definition: rule.h:280
bool has_action() const
Definition: rule.h:95