deploymentmanager  v2
policy.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_POLICY_H_
31 #define GOOGLE_DEPLOYMENTMANAGER_API_POLICY_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/deploymentmanager_api/audit_config.h"
40 #include "google/deploymentmanager_api/binding.h"
41 #include "google/deploymentmanager_api/rule.h"
42 
43 namespace Json {
44 class Value;
45 } // namespace Json
46 
48 using namespace googleapis;
49 
82 class Policy : public client::JsonCppData {
83  public:
89  static Policy* New();
90 
96  explicit Policy(const Json::Value& storage);
97 
103  explicit Policy(Json::Value* storage);
104 
108  virtual ~Policy();
109 
115  const StringPiece GetTypeName() const {
116  return StringPiece("google_deploymentmanager_api::Policy");
117  }
118 
124  bool has_audit_configs() const {
125  return Storage().isMember("auditConfigs");
126  }
127 
132  MutableStorage()->removeMember("auditConfigs");
133  }
134 
135 
139  const client::JsonCppArray<AuditConfig > get_audit_configs() const;
140 
149  client::JsonCppArray<AuditConfig > mutable_auditConfigs();
150 
156  bool has_bindings() const {
157  return Storage().isMember("bindings");
158  }
159 
163  void clear_bindings() {
164  MutableStorage()->removeMember("bindings");
165  }
166 
167 
171  const client::JsonCppArray<Binding > get_bindings() const;
172 
182  client::JsonCppArray<Binding > mutable_bindings();
183 
189  bool has_etag() const {
190  return Storage().isMember("etag");
191  }
192 
196  void clear_etag() {
197  MutableStorage()->removeMember("etag");
198  }
199 
200 
204  const StringPiece get_etag() const {
205  const Json::Value& v = Storage("etag");
206  if (v == Json::Value::null) return StringPiece("");
207  return StringPiece(v.asCString());
208  }
209 
226  void set_etag(const StringPiece& value) {
227  *MutableStorage("etag") = value.data();
228  }
229 
235  bool has_iam_owned() const {
236  return Storage().isMember("iamOwned");
237  }
238 
243  MutableStorage()->removeMember("iamOwned");
244  }
245 
246 
250  bool get_iam_owned() const {
251  const Json::Value& storage = Storage("iamOwned");
252  return client::JsonValueToCppValueHelper<bool >(storage);
253  }
254 
259  void set_iam_owned(bool value) {
260  client::SetJsonValueFromCppValueHelper<bool >(
261  value, MutableStorage("iamOwned"));
262  }
263 
269  bool has_rules() const {
270  return Storage().isMember("rules");
271  }
272 
276  void clear_rules() {
277  MutableStorage()->removeMember("rules");
278  }
279 
280 
284  const client::JsonCppArray<Rule > get_rules() const;
285 
299  client::JsonCppArray<Rule > mutable_rules();
300 
306  bool has_version() const {
307  return Storage().isMember("version");
308  }
309 
313  void clear_version() {
314  MutableStorage()->removeMember("version");
315  }
316 
317 
321  int32 get_version() const {
322  const Json::Value& storage = Storage("version");
323  return client::JsonValueToCppValueHelper<int32 >(storage);
324  }
325 
335  void set_version(int32 value) {
336  client::SetJsonValueFromCppValueHelper<int32 >(
337  value, MutableStorage("version"));
338  }
339 
340  private:
341  void operator=(const Policy&);
342 }; // Policy
343 } // namespace google_deploymentmanager_api
344 #endif // GOOGLE_DEPLOYMENTMANAGER_API_POLICY_H_
const StringPiece get_etag() const
Definition: policy.h:204
void clear_iam_owned()
Definition: policy.h:242
bool get_iam_owned() const
Definition: policy.h:250
void clear_version()
Definition: policy.h:313
void clear_bindings()
Definition: policy.h:163
void clear_etag()
Definition: policy.h:196
void set_iam_owned(bool value)
Definition: policy.h:259
void set_version(int32 value)
Definition: policy.h:335
bool has_version() const
Definition: policy.h:306
void clear_rules()
Definition: policy.h:276
Definition: audit_config.h:40
bool has_iam_owned() const
Definition: policy.h:235
bool has_audit_configs() const
Definition: policy.h:124
Definition: audit_config.cc:42
bool has_etag() const
Definition: policy.h:189
void set_etag(const StringPiece &value)
Definition: policy.h:226
void clear_audit_configs()
Definition: policy.h:131
int32 get_version() const
Definition: policy.h:321
bool has_rules() const
Definition: policy.h:269
bool has_bindings() const
Definition: policy.h:156
const StringPiece GetTypeName() const
Definition: policy.h:115