cloudbilling  v1
sku.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_SKU_H_
31 #define GOOGLE_CLOUDBILLING_API_SKU_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/cloudbilling_api/category.h"
39 #include "google/cloudbilling_api/pricing_info.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_cloudbilling_api {
46 using namespace googleapis;
47 
53 class Sku : public client::JsonCppData {
54  public:
60  static Sku* New();
61 
67  explicit Sku(const Json::Value& storage);
68 
74  explicit Sku(Json::Value* storage);
75 
79  virtual ~Sku();
80 
86  const StringPiece GetTypeName() const {
87  return StringPiece("google_cloudbilling_api::Sku");
88  }
89 
95  bool has_category() const {
96  return Storage().isMember("category");
97  }
98 
102  void clear_category() {
103  MutableStorage()->removeMember("category");
104  }
105 
106 
110  const Category get_category() const;
111 
120  Category mutable_category();
121 
127  bool has_description() const {
128  return Storage().isMember("description");
129  }
130 
135  MutableStorage()->removeMember("description");
136  }
137 
138 
142  const StringPiece get_description() const {
143  const Json::Value& v = Storage("description");
144  if (v == Json::Value::null) return StringPiece("");
145  return StringPiece(v.asCString());
146  }
147 
156  void set_description(const StringPiece& value) {
157  *MutableStorage("description") = value.data();
158  }
159 
165  bool has_name() const {
166  return Storage().isMember("name");
167  }
168 
172  void clear_name() {
173  MutableStorage()->removeMember("name");
174  }
175 
176 
180  const StringPiece get_name() const {
181  const Json::Value& v = Storage("name");
182  if (v == Json::Value::null) return StringPiece("");
183  return StringPiece(v.asCString());
184  }
185 
194  void set_name(const StringPiece& value) {
195  *MutableStorage("name") = value.data();
196  }
197 
203  bool has_pricing_info() const {
204  return Storage().isMember("pricingInfo");
205  }
206 
211  MutableStorage()->removeMember("pricingInfo");
212  }
213 
214 
218  const client::JsonCppArray<PricingInfo > get_pricing_info() const;
219 
228  client::JsonCppArray<PricingInfo > mutable_pricingInfo();
229 
236  return Storage().isMember("serviceProviderName");
237  }
238 
243  MutableStorage()->removeMember("serviceProviderName");
244  }
245 
246 
250  const StringPiece get_service_provider_name() const {
251  const Json::Value& v = Storage("serviceProviderName");
252  if (v == Json::Value::null) return StringPiece("");
253  return StringPiece(v.asCString());
254  }
255 
264  void set_service_provider_name(const StringPiece& value) {
265  *MutableStorage("serviceProviderName") = value.data();
266  }
267 
273  bool has_service_regions() const {
274  return Storage().isMember("serviceRegions");
275  }
276 
281  MutableStorage()->removeMember("serviceRegions");
282  }
283 
284 
289  const client::JsonCppArray<string > get_service_regions() const {
290  const Json::Value& storage = Storage("serviceRegions");
291  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
292  }
293 
305  client::JsonCppArray<string > mutable_serviceRegions() {
306  Json::Value* storage = MutableStorage("serviceRegions");
307  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
308  }
309 
315  bool has_sku_id() const {
316  return Storage().isMember("skuId");
317  }
318 
322  void clear_sku_id() {
323  MutableStorage()->removeMember("skuId");
324  }
325 
326 
330  const StringPiece get_sku_id() const {
331  const Json::Value& v = Storage("skuId");
332  if (v == Json::Value::null) return StringPiece("");
333  return StringPiece(v.asCString());
334  }
335 
344  void set_sku_id(const StringPiece& value) {
345  *MutableStorage("skuId") = value.data();
346  }
347 
348  private:
349  void operator=(const Sku&);
350 }; // Sku
351 } // namespace google_cloudbilling_api
352 #endif // GOOGLE_CLOUDBILLING_API_SKU_H_
Definition: sku.h:53
const StringPiece get_sku_id() const
Definition: sku.h:330
void clear_sku_id()
Definition: sku.h:322
bool has_pricing_info() const
Definition: sku.h:203
const StringPiece GetTypeName() const
Definition: sku.h:86
void set_description(const StringPiece &value)
Definition: sku.h:156
bool has_sku_id() const
Definition: sku.h:315
void clear_pricing_info()
Definition: sku.h:210
const StringPiece get_description() const
Definition: sku.h:142
const client::JsonCppArray< string > get_service_regions() const
Definition: sku.h:289
const StringPiece get_service_provider_name() const
Definition: sku.h:250
void clear_description()
Definition: sku.h:134
void set_name(const StringPiece &value)
Definition: sku.h:194
void clear_service_provider_name()
Definition: sku.h:242
bool has_category() const
Definition: sku.h:95
Definition: category.h:50
Definition: aggregation_info.h:39
bool has_service_provider_name() const
Definition: sku.h:235
void clear_name()
Definition: sku.h:172
void clear_category()
Definition: sku.h:102
bool has_name() const
Definition: sku.h:165
bool has_description() const
Definition: sku.h:127
bool has_service_regions() const
Definition: sku.h:273
const StringPiece get_name() const
Definition: sku.h:180
void set_service_provider_name(const StringPiece &value)
Definition: sku.h:264
client::JsonCppArray< string > mutable_serviceRegions()
Definition: sku.h:305
void clear_service_regions()
Definition: sku.h:280
Definition: aggregation_info.cc:42
void set_sku_id(const StringPiece &value)
Definition: sku.h:344