cloudbilling  v1
pricing_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_PRICING_INFO_H_
31 #define GOOGLE_CLOUDBILLING_API_PRICING_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 #include "google/cloudbilling_api/aggregation_info.h"
39 #include "google/cloudbilling_api/pricing_expression.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_cloudbilling_api {
46 using namespace googleapis;
47 
53 class PricingInfo : public client::JsonCppData {
54  public:
60  static PricingInfo* New();
61 
67  explicit PricingInfo(const Json::Value& storage);
68 
74  explicit PricingInfo(Json::Value* storage);
75 
79  virtual ~PricingInfo();
80 
86  const StringPiece GetTypeName() const {
87  return StringPiece("google_cloudbilling_api::PricingInfo");
88  }
89 
95  bool has_aggregation_info() const {
96  return Storage().isMember("aggregationInfo");
97  }
98 
103  MutableStorage()->removeMember("aggregationInfo");
104  }
105 
106 
111  const AggregationInfo get_aggregation_info() const;
112 
122  AggregationInfo mutable_aggregationInfo();
123 
131  return Storage().isMember("currencyConversionRate");
132  }
133 
138  MutableStorage()->removeMember("currencyConversionRate");
139  }
140 
141 
146  const Json::Value& storage = Storage("currencyConversionRate");
147  return client::JsonValueToCppValueHelper<double >(storage);
148  }
149 
161  void set_currency_conversion_rate(double value) {
162  client::SetJsonValueFromCppValueHelper<double >(
163  value, MutableStorage("currencyConversionRate"));
164  }
165 
171  bool has_effective_time() const {
172  return Storage().isMember("effectiveTime");
173  }
174 
179  MutableStorage()->removeMember("effectiveTime");
180  }
181 
182 
186  const StringPiece get_effective_time() const {
187  const Json::Value& v = Storage("effectiveTime");
188  if (v == Json::Value::null) return StringPiece("");
189  return StringPiece(v.asCString());
190  }
191 
204  void set_effective_time(const StringPiece& value) {
205  *MutableStorage("effectiveTime") = value.data();
206  }
207 
213  bool has_pricing_expression() const {
214  return Storage().isMember("pricingExpression");
215  }
216 
221  MutableStorage()->removeMember("pricingExpression");
222  }
223 
224 
229  const PricingExpression get_pricing_expression() const;
230 
239  PricingExpression mutable_pricingExpression();
240 
246  bool has_summary() const {
247  return Storage().isMember("summary");
248  }
249 
253  void clear_summary() {
254  MutableStorage()->removeMember("summary");
255  }
256 
257 
261  const StringPiece get_summary() const {
262  const Json::Value& v = Storage("summary");
263  if (v == Json::Value::null) return StringPiece("");
264  return StringPiece(v.asCString());
265  }
266 
275  void set_summary(const StringPiece& value) {
276  *MutableStorage("summary") = value.data();
277  }
278 
279  private:
280  void operator=(const PricingInfo&);
281 }; // PricingInfo
282 } // namespace google_cloudbilling_api
283 #endif // GOOGLE_CLOUDBILLING_API_PRICING_INFO_H_
void clear_pricing_expression()
Definition: pricing_info.h:220
bool has_currency_conversion_rate() const
Definition: pricing_info.h:130
void clear_summary()
Definition: pricing_info.h:253
void set_currency_conversion_rate(double value)
Definition: pricing_info.h:161
void clear_effective_time()
Definition: pricing_info.h:178
void set_effective_time(const StringPiece &value)
Definition: pricing_info.h:204
Definition: aggregation_info.h:51
void set_summary(const StringPiece &value)
Definition: pricing_info.h:275
bool has_pricing_expression() const
Definition: pricing_info.h:213
Definition: aggregation_info.h:39
bool has_aggregation_info() const
Definition: pricing_info.h:95
void clear_aggregation_info()
Definition: pricing_info.h:102
bool has_effective_time() const
Definition: pricing_info.h:171
const StringPiece get_effective_time() const
Definition: pricing_info.h:186
const StringPiece GetTypeName() const
Definition: pricing_info.h:86
bool has_summary() const
Definition: pricing_info.h:246
void clear_currency_conversion_rate()
Definition: pricing_info.h:137
const StringPiece get_summary() const
Definition: pricing_info.h:261
Definition: aggregation_info.cc:42
Definition: pricing_info.h:53
Definition: pricing_expression.h:68
double get_currency_conversion_rate() const
Definition: pricing_info.h:145