cloudresourcemanager  v1beta1
project.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: 2020-03-19, 00:30:26 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 Resource Manager API (cloudresourcemanager/v1beta1)
24 // Generated from:
25 // Version: v1beta1
26 // Revision: 577
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_CLOUDRESOURCEMANAGER_API_PROJECT_H_
31 #define GOOGLE_CLOUDRESOURCEMANAGER_API_PROJECT_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/cloudresourcemanager_api/resource_id.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
46 using namespace googleapis;
47 
55 class Project : public client::JsonCppData {
56  public:
62  static Project* New();
63 
69  explicit Project(const Json::Value& storage);
70 
76  explicit Project(Json::Value* storage);
77 
81  virtual ~Project();
82 
88  const StringPiece GetTypeName() const {
89  return StringPiece("google_cloudresourcemanager_api::Project");
90  }
91 
97  bool has_create_time() const {
98  return Storage().isMember("createTime");
99  }
100 
105  MutableStorage()->removeMember("createTime");
106  }
107 
108 
112  const StringPiece get_create_time() const {
113  const Json::Value& v = Storage("createTime");
114  if (v == Json::Value::null) return StringPiece("");
115  return StringPiece(v.asCString());
116  }
117 
127  void set_create_time(const StringPiece& value) {
128  *MutableStorage("createTime") = value.data();
129  }
130 
136  bool has_labels() const {
137  return Storage().isMember("labels");
138  }
139 
143  void clear_labels() {
144  MutableStorage()->removeMember("labels");
145  }
146 
147 
151  const client::JsonCppAssociativeArray<string > get_labels() const {
152  const Json::Value& storage = Storage("labels");
153  return client::JsonValueToCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
154  }
155 
176  client::JsonCppAssociativeArray<string > mutable_labels() {
177  Json::Value* storage = MutableStorage("labels");
178  return client::JsonValueToMutableCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
179  }
180 
186  bool has_lifecycle_state() const {
187  return Storage().isMember("lifecycleState");
188  }
189 
194  MutableStorage()->removeMember("lifecycleState");
195  }
196 
197 
201  const StringPiece get_lifecycle_state() const {
202  const Json::Value& v = Storage("lifecycleState");
203  if (v == Json::Value::null) return StringPiece("");
204  return StringPiece(v.asCString());
205  }
206 
216  void set_lifecycle_state(const StringPiece& value) {
217  *MutableStorage("lifecycleState") = value.data();
218  }
219 
225  bool has_name() const {
226  return Storage().isMember("name");
227  }
228 
232  void clear_name() {
233  MutableStorage()->removeMember("name");
234  }
235 
236 
240  const StringPiece get_name() const {
241  const Json::Value& v = Storage("name");
242  if (v == Json::Value::null) return StringPiece("");
243  return StringPiece(v.asCString());
244  }
245 
268  void set_name(const StringPiece& value) {
269  *MutableStorage("name") = value.data();
270  }
271 
277  bool has_parent() const {
278  return Storage().isMember("parent");
279  }
280 
284  void clear_parent() {
285  MutableStorage()->removeMember("parent");
286  }
287 
288 
292  const ResourceId get_parent() const;
293 
308  ResourceId mutable_parent();
309 
315  bool has_project_id() const {
316  return Storage().isMember("projectId");
317  }
318 
323  MutableStorage()->removeMember("projectId");
324  }
325 
326 
330  const StringPiece get_project_id() const {
331  const Json::Value& v = Storage("projectId");
332  if (v == Json::Value::null) return StringPiece("");
333  return StringPiece(v.asCString());
334  }
335 
353  void set_project_id(const StringPiece& value) {
354  *MutableStorage("projectId") = value.data();
355  }
356 
362  bool has_project_number() const {
363  return Storage().isMember("projectNumber");
364  }
365 
370  MutableStorage()->removeMember("projectNumber");
371  }
372 
373 
377  int64 get_project_number() const {
378  const Json::Value& storage = Storage("projectNumber");
379  return client::JsonValueToCppValueHelper<int64 >(storage);
380  }
381 
396  void set_project_number(int64 value) {
397  client::SetJsonValueFromCppValueHelper<int64 >(
398  value, MutableStorage("projectNumber"));
399  }
400 
401  private:
402  void operator=(const Project&);
403 }; // Project
404 } // namespace google_cloudresourcemanager_api
405 #endif // GOOGLE_CLOUDRESOURCEMANAGER_API_PROJECT_H_
bool has_labels() const
Definition: project.h:136
void clear_lifecycle_state()
Definition: project.h:193
const StringPiece get_lifecycle_state() const
Definition: project.h:201
void set_project_number(int64 value)
Definition: project.h:396
void set_lifecycle_state(const StringPiece &value)
Definition: project.h:216
int64 get_project_number() const
Definition: project.h:377
bool has_name() const
Definition: project.h:225
void clear_project_id()
Definition: project.h:322
const client::JsonCppAssociativeArray< string > get_labels() const
Definition: project.h:151
client::JsonCppAssociativeArray< string > mutable_labels()
Definition: project.h:176
void clear_project_number()
Definition: project.h:369
Definition: ancestor.cc:41
const StringPiece get_name() const
Definition: project.h:240
bool has_parent() const
Definition: project.h:277
const StringPiece get_project_id() const
Definition: project.h:330
bool has_create_time() const
Definition: project.h:97
bool has_project_number() const
Definition: project.h:362
Definition: ancestor.h:39
void set_create_time(const StringPiece &value)
Definition: project.h:127
void set_project_id(const StringPiece &value)
Definition: project.h:353
void clear_parent()
Definition: project.h:284
const StringPiece GetTypeName() const
Definition: project.h:88
void set_name(const StringPiece &value)
Definition: project.h:268
bool has_lifecycle_state() const
Definition: project.h:186
void clear_name()
Definition: project.h:232
void clear_create_time()
Definition: project.h:104
void clear_labels()
Definition: project.h:143
bool has_project_id() const
Definition: project.h:315
const StringPiece get_create_time() const
Definition: project.h:112