compute  v1
path_matcher.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: 2019-05-15, 03:08:54 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // Compute Engine API (compute/v1)
24 // Generated from:
25 // Version: v1
26 // Revision: 214
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_COMPUTE_API_PATH_MATCHER_H_
31 #define GOOGLE_COMPUTE_API_PATH_MATCHER_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/compute_api/path_rule.h"
39 
40 namespace Json {
41 class Value;
42 } // namespace Json
43 
44 namespace google_compute_api {
45 using namespace googleapis;
46 
54 class PathMatcher : public client::JsonCppData {
55  public:
61  static PathMatcher* New();
62 
68  explicit PathMatcher(const Json::Value& storage);
69 
75  explicit PathMatcher(Json::Value* storage);
76 
80  virtual ~PathMatcher();
81 
87  const StringPiece GetTypeName() const {
88  return StringPiece("google_compute_api::PathMatcher");
89  }
90 
96  bool has_default_service() const {
97  return Storage().isMember("defaultService");
98  }
99 
104  MutableStorage()->removeMember("defaultService");
105  }
106 
107 
111  const StringPiece get_default_service() const {
112  const Json::Value& v = Storage("defaultService");
113  if (v == Json::Value::null) return StringPiece("");
114  return StringPiece(v.asCString());
115  }
116 
142  void set_default_service(const StringPiece& value) {
143  *MutableStorage("defaultService") = value.data();
144  }
145 
151  bool has_description() const {
152  return Storage().isMember("description");
153  }
154 
159  MutableStorage()->removeMember("description");
160  }
161 
162 
166  const StringPiece get_description() const {
167  const Json::Value& v = Storage("description");
168  if (v == Json::Value::null) return StringPiece("");
169  return StringPiece(v.asCString());
170  }
171 
180  void set_description(const StringPiece& value) {
181  *MutableStorage("description") = value.data();
182  }
183 
189  bool has_name() const {
190  return Storage().isMember("name");
191  }
192 
196  void clear_name() {
197  MutableStorage()->removeMember("name");
198  }
199 
200 
204  const StringPiece get_name() const {
205  const Json::Value& v = Storage("name");
206  if (v == Json::Value::null) return StringPiece("");
207  return StringPiece(v.asCString());
208  }
209 
217  void set_name(const StringPiece& value) {
218  *MutableStorage("name") = value.data();
219  }
220 
226  bool has_path_rules() const {
227  return Storage().isMember("pathRules");
228  }
229 
234  MutableStorage()->removeMember("pathRules");
235  }
236 
237 
241  const client::JsonCppArray<PathRule > get_path_rules() const;
242 
257  client::JsonCppArray<PathRule > mutable_pathRules();
258 
259  private:
260  void operator=(const PathMatcher&);
261 }; // PathMatcher
262 } // namespace google_compute_api
263 #endif // GOOGLE_COMPUTE_API_PATH_MATCHER_H_
const StringPiece get_description() const
Definition: path_matcher.h:166
void set_name(const StringPiece &value)
Definition: path_matcher.h:217
void clear_description()
Definition: path_matcher.h:158
bool has_name() const
Definition: path_matcher.h:189
const StringPiece GetTypeName() const
Definition: path_matcher.h:87
void set_default_service(const StringPiece &value)
Definition: path_matcher.h:142
void clear_name()
Definition: path_matcher.h:196
const StringPiece get_name() const
Definition: path_matcher.h:204
Definition: accelerator_config.h:39
void clear_path_rules()
Definition: path_matcher.h:233
Definition: accelerator_config.cc:41
const StringPiece get_default_service() const
Definition: path_matcher.h:111
bool has_path_rules() const
Definition: path_matcher.h:226
void clear_default_service()
Definition: path_matcher.h:103
void set_description(const StringPiece &value)
Definition: path_matcher.h:180
bool has_description() const
Definition: path_matcher.h:151
bool has_default_service() const
Definition: path_matcher.h:96
Definition: path_matcher.h:54