cloudbilling  v1
billing_account.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_BILLING_ACCOUNT_H_
31 #define GOOGLE_CLOUDBILLING_API_BILLING_ACCOUNT_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 
51 class BillingAccount : public client::JsonCppData {
52  public:
58  static BillingAccount* New();
59 
65  explicit BillingAccount(const Json::Value& storage);
66 
72  explicit BillingAccount(Json::Value* storage);
73 
77  virtual ~BillingAccount();
78 
84  const StringPiece GetTypeName() const {
85  return StringPiece("google_cloudbilling_api::BillingAccount");
86  }
87 
93  bool has_display_name() const {
94  return Storage().isMember("displayName");
95  }
96 
101  MutableStorage()->removeMember("displayName");
102  }
103 
104 
108  const StringPiece get_display_name() const {
109  const Json::Value& v = Storage("displayName");
110  if (v == Json::Value::null) return StringPiece("");
111  return StringPiece(v.asCString());
112  }
113 
122  void set_display_name(const StringPiece& value) {
123  *MutableStorage("displayName") = value.data();
124  }
125 
132  return Storage().isMember("masterBillingAccount");
133  }
134 
139  MutableStorage()->removeMember("masterBillingAccount");
140  }
141 
142 
146  const StringPiece get_master_billing_account() const {
147  const Json::Value& v = Storage("masterBillingAccount");
148  if (v == Json::Value::null) return StringPiece("");
149  return StringPiece(v.asCString());
150  }
151 
163  void set_master_billing_account(const StringPiece& value) {
164  *MutableStorage("masterBillingAccount") = value.data();
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 
204  void set_name(const StringPiece& value) {
205  *MutableStorage("name") = value.data();
206  }
207 
213  bool has_open() const {
214  return Storage().isMember("open");
215  }
216 
220  void clear_open() {
221  MutableStorage()->removeMember("open");
222  }
223 
224 
228  bool get_open() const {
229  const Json::Value& storage = Storage("open");
230  return client::JsonValueToCppValueHelper<bool >(storage);
231  }
232 
243  void set_open(bool value) {
244  client::SetJsonValueFromCppValueHelper<bool >(
245  value, MutableStorage("open"));
246  }
247 
248  private:
249  void operator=(const BillingAccount&);
250 }; // BillingAccount
251 } // namespace google_cloudbilling_api
252 #endif // GOOGLE_CLOUDBILLING_API_BILLING_ACCOUNT_H_
const StringPiece get_master_billing_account() const
Definition: billing_account.h:146
void clear_display_name()
Definition: billing_account.h:100
bool has_open() const
Definition: billing_account.h:213
void set_open(bool value)
Definition: billing_account.h:243
const StringPiece GetTypeName() const
Definition: billing_account.h:84
void clear_master_billing_account()
Definition: billing_account.h:138
Definition: billing_account.h:51
void clear_name()
Definition: billing_account.h:179
const StringPiece get_display_name() const
Definition: billing_account.h:108
bool has_master_billing_account() const
Definition: billing_account.h:131
const StringPiece get_name() const
Definition: billing_account.h:187
void clear_open()
Definition: billing_account.h:220
void set_display_name(const StringPiece &value)
Definition: billing_account.h:122
Definition: aggregation_info.h:39
bool has_name() const
Definition: billing_account.h:172
void set_master_billing_account(const StringPiece &value)
Definition: billing_account.h:163
bool has_display_name() const
Definition: billing_account.h:93
bool get_open() const
Definition: billing_account.h:228
void set_name(const StringPiece &value)
Definition: billing_account.h:204
Definition: aggregation_info.cc:42