storage  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-14, 18:33:41 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 Storage JSON API (storage/v1)
24 // Generated from:
25 // Version: v1
26 // Revision: 171
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_STORAGE_API_EXPR_H_
31 #define GOOGLE_STORAGE_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_storage_api {
43 using namespace googleapis;
44 
52 class Expr : public client::JsonCppData {
53  public:
59  static Expr* New();
60 
66  explicit Expr(const Json::Value& storage);
67 
73  explicit Expr(Json::Value* storage);
74 
78  virtual ~Expr();
79 
85  const StringPiece GetTypeName() const {
86  return StringPiece("google_storage_api::Expr");
87  }
88 
94  bool has_description() const {
95  return Storage().isMember("description");
96  }
97 
102  MutableStorage()->removeMember("description");
103  }
104 
105 
109  const StringPiece get_description() const {
110  const Json::Value& v = Storage("description");
111  if (v == Json::Value::null) return StringPiece("");
112  return StringPiece(v.asCString());
113  }
114 
123  void set_description(const StringPiece& value) {
124  *MutableStorage("description") = value.data();
125  }
126 
132  bool has_expression() const {
133  return Storage().isMember("expression");
134  }
135 
140  MutableStorage()->removeMember("expression");
141  }
142 
143 
147  const StringPiece get_expression() const {
148  const Json::Value& v = Storage("expression");
149  if (v == Json::Value::null) return StringPiece("");
150  return StringPiece(v.asCString());
151  }
152 
162  void set_expression(const StringPiece& value) {
163  *MutableStorage("expression") = value.data();
164  }
165 
171  bool has_location() const {
172  return Storage().isMember("location");
173  }
174 
178  void clear_location() {
179  MutableStorage()->removeMember("location");
180  }
181 
182 
186  const StringPiece get_location() const {
187  const Json::Value& v = Storage("location");
188  if (v == Json::Value::null) return StringPiece("");
189  return StringPiece(v.asCString());
190  }
191 
200  void set_location(const StringPiece& value) {
201  *MutableStorage("location") = value.data();
202  }
203 
209  bool has_title() const {
210  return Storage().isMember("title");
211  }
212 
216  void clear_title() {
217  MutableStorage()->removeMember("title");
218  }
219 
220 
224  const StringPiece get_title() const {
225  const Json::Value& v = Storage("title");
226  if (v == Json::Value::null) return StringPiece("");
227  return StringPiece(v.asCString());
228  }
229 
238  void set_title(const StringPiece& value) {
239  *MutableStorage("title") = value.data();
240  }
241 
242  private:
243  void operator=(const Expr&);
244 }; // Expr
245 } // namespace google_storage_api
246 #endif // GOOGLE_STORAGE_API_EXPR_H_
const StringPiece get_description() const
Definition: expr.h:109
void clear_expression()
Definition: expr.h:139
void set_expression(const StringPiece &value)
Definition: expr.h:162
bool has_location() const
Definition: expr.h:171
const StringPiece get_expression() const
Definition: expr.h:147
void set_title(const StringPiece &value)
Definition: expr.h:238
void clear_location()
Definition: expr.h:178
const StringPiece get_title() const
Definition: expr.h:224
const StringPiece GetTypeName() const
Definition: expr.h:85
Definition: expr.h:52
void clear_title()
Definition: expr.h:216
Definition: bucket.h:43
void clear_description()
Definition: expr.h:101
bool has_expression() const
Definition: expr.h:132
bool has_description() const
Definition: expr.h:94
Definition: bucket.cc:45
void set_location(const StringPiece &value)
Definition: expr.h:200
bool has_title() const
Definition: expr.h:209
void set_description(const StringPiece &value)
Definition: expr.h:123
const StringPiece get_location() const
Definition: expr.h:186