cloudbilling  v1
expr.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_EXPR_H_
31 #define GOOGLE_CLOUDBILLING_API_EXPR_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 
98 class Expr : public client::JsonCppData {
99  public:
105  static Expr* New();
106 
112  explicit Expr(const Json::Value& storage);
113 
119  explicit Expr(Json::Value* storage);
120 
124  virtual ~Expr();
125 
131  const StringPiece GetTypeName() const {
132  return StringPiece("google_cloudbilling_api::Expr");
133  }
134 
140  bool has_description() const {
141  return Storage().isMember("description");
142  }
143 
148  MutableStorage()->removeMember("description");
149  }
150 
151 
155  const StringPiece get_description() const {
156  const Json::Value& v = Storage("description");
157  if (v == Json::Value::null) return StringPiece("");
158  return StringPiece(v.asCString());
159  }
160 
169  void set_description(const StringPiece& value) {
170  *MutableStorage("description") = value.data();
171  }
172 
178  bool has_expression() const {
179  return Storage().isMember("expression");
180  }
181 
186  MutableStorage()->removeMember("expression");
187  }
188 
189 
193  const StringPiece get_expression() const {
194  const Json::Value& v = Storage("expression");
195  if (v == Json::Value::null) return StringPiece("");
196  return StringPiece(v.asCString());
197  }
198 
207  void set_expression(const StringPiece& value) {
208  *MutableStorage("expression") = value.data();
209  }
210 
216  bool has_location() const {
217  return Storage().isMember("location");
218  }
219 
223  void clear_location() {
224  MutableStorage()->removeMember("location");
225  }
226 
227 
231  const StringPiece get_location() const {
232  const Json::Value& v = Storage("location");
233  if (v == Json::Value::null) return StringPiece("");
234  return StringPiece(v.asCString());
235  }
236 
245  void set_location(const StringPiece& value) {
246  *MutableStorage("location") = value.data();
247  }
248 
254  bool has_title() const {
255  return Storage().isMember("title");
256  }
257 
261  void clear_title() {
262  MutableStorage()->removeMember("title");
263  }
264 
265 
269  const StringPiece get_title() const {
270  const Json::Value& v = Storage("title");
271  if (v == Json::Value::null) return StringPiece("");
272  return StringPiece(v.asCString());
273  }
274 
284  void set_title(const StringPiece& value) {
285  *MutableStorage("title") = value.data();
286  }
287 
288  private:
289  void operator=(const Expr&);
290 }; // Expr
291 } // namespace google_cloudbilling_api
292 #endif // GOOGLE_CLOUDBILLING_API_EXPR_H_
bool has_title() const
Definition: expr.h:254
void clear_description()
Definition: expr.h:147
void clear_title()
Definition: expr.h:261
const StringPiece GetTypeName() const
Definition: expr.h:131
void set_description(const StringPiece &value)
Definition: expr.h:169
void clear_expression()
Definition: expr.h:185
void set_location(const StringPiece &value)
Definition: expr.h:245
const StringPiece get_location() const
Definition: expr.h:231
bool has_location() const
Definition: expr.h:216
void set_title(const StringPiece &value)
Definition: expr.h:284
Definition: aggregation_info.h:39
const StringPiece get_description() const
Definition: expr.h:155
Definition: expr.h:98
void clear_location()
Definition: expr.h:223
const StringPiece get_title() const
Definition: expr.h:269
void set_expression(const StringPiece &value)
Definition: expr.h:207
bool has_expression() const
Definition: expr.h:178
const StringPiece get_expression() const
Definition: expr.h:193
bool has_description() const
Definition: expr.h:140
Definition: aggregation_info.cc:42