cloudbilling  v1
project_billing_info.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-24, 00:22:17 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 Billing API (cloudbilling/v1)
24 // Generated from:
25 // Version: v1
26 // Revision: 56
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_CLOUDBILLING_API_PROJECT_BILLING_INFO_H_
31 #define GOOGLE_CLOUDBILLING_API_PROJECT_BILLING_INFO_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 namespace Json {
39 class Value;
40 } // namespace Json
41 
42 namespace google_cloudbilling_api {
43 using namespace googleapis;
44 
52 class ProjectBillingInfo : public client::JsonCppData {
53  public:
59  static ProjectBillingInfo* New();
60 
66  explicit ProjectBillingInfo(const Json::Value& storage);
67 
73  explicit ProjectBillingInfo(Json::Value* storage);
74 
78  virtual ~ProjectBillingInfo();
79 
85  const StringPiece GetTypeName() const {
86  return StringPiece("google_cloudbilling_api::ProjectBillingInfo");
87  }
88 
94  bool has_billing_account_name() const {
95  return Storage().isMember("billingAccountName");
96  }
97 
102  MutableStorage()->removeMember("billingAccountName");
103  }
104 
105 
109  const StringPiece get_billing_account_name() const {
110  const Json::Value& v = Storage("billingAccountName");
111  if (v == Json::Value::null) return StringPiece("");
112  return StringPiece(v.asCString());
113  }
114 
123  void set_billing_account_name(const StringPiece& value) {
124  *MutableStorage("billingAccountName") = value.data();
125  }
126 
132  bool has_billing_enabled() const {
133  return Storage().isMember("billingEnabled");
134  }
135 
140  MutableStorage()->removeMember("billingEnabled");
141  }
142 
143 
147  bool get_billing_enabled() const {
148  const Json::Value& storage = Storage("billingEnabled");
149  return client::JsonValueToCppValueHelper<bool >(storage);
150  }
151 
162  void set_billing_enabled(bool value) {
163  client::SetJsonValueFromCppValueHelper<bool >(
164  value, MutableStorage("billingEnabled"));
165  }
166 
172  bool has_name() const {
173  return Storage().isMember("name");
174  }
175 
179  void clear_name() {
180  MutableStorage()->removeMember("name");
181  }
182 
183 
187  const StringPiece get_name() const {
188  const Json::Value& v = Storage("name");
189  if (v == Json::Value::null) return StringPiece("");
190  return StringPiece(v.asCString());
191  }
192 
203  void set_name(const StringPiece& value) {
204  *MutableStorage("name") = value.data();
205  }
206 
212  bool has_project_id() const {
213  return Storage().isMember("projectId");
214  }
215 
220  MutableStorage()->removeMember("projectId");
221  }
222 
223 
227  const StringPiece get_project_id() const {
228  const Json::Value& v = Storage("projectId");
229  if (v == Json::Value::null) return StringPiece("");
230  return StringPiece(v.asCString());
231  }
232 
242  void set_project_id(const StringPiece& value) {
243  *MutableStorage("projectId") = value.data();
244  }
245 
246  private:
247  void operator=(const ProjectBillingInfo&);
248 }; // ProjectBillingInfo
249 } // namespace google_cloudbilling_api
250 #endif // GOOGLE_CLOUDBILLING_API_PROJECT_BILLING_INFO_H_
void set_billing_enabled(bool value)
Definition: project_billing_info.h:162
const StringPiece get_name() const
Definition: project_billing_info.h:187
const StringPiece get_project_id() const
Definition: project_billing_info.h:227
void set_name(const StringPiece &value)
Definition: project_billing_info.h:203
void set_project_id(const StringPiece &value)
Definition: project_billing_info.h:242
void clear_name()
Definition: project_billing_info.h:179
bool has_project_id() const
Definition: project_billing_info.h:212
const StringPiece GetTypeName() const
Definition: project_billing_info.h:85
Definition: aggregation_info.h:39
bool has_billing_enabled() const
Definition: project_billing_info.h:132
void clear_billing_enabled()
Definition: project_billing_info.h:139
bool get_billing_enabled() const
Definition: project_billing_info.h:147
const StringPiece get_billing_account_name() const
Definition: project_billing_info.h:109
bool has_name() const
Definition: project_billing_info.h:172
Definition: project_billing_info.h:52
void set_billing_account_name(const StringPiece &value)
Definition: project_billing_info.h:123
void clear_project_id()
Definition: project_billing_info.h:219
Definition: aggregation_info.cc:42
void clear_billing_account_name()
Definition: project_billing_info.h:101
bool has_billing_account_name() const
Definition: project_billing_info.h:94