compute  v1
router_status.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_ROUTER_STATUS_H_
31 #define GOOGLE_COMPUTE_API_ROUTER_STATUS_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/route.h"
39 #include "google/compute_api/router_status_bgp_peer_status.h"
40 #include "google/compute_api/router_status_nat_status.h"
41 
42 namespace Json {
43 class Value;
44 } // namespace Json
45 
46 namespace google_compute_api {
47 using namespace googleapis;
48 
54 class RouterStatus : public client::JsonCppData {
55  public:
61  static RouterStatus* New();
62 
68  explicit RouterStatus(const Json::Value& storage);
69 
75  explicit RouterStatus(Json::Value* storage);
76 
80  virtual ~RouterStatus();
81 
87  const StringPiece GetTypeName() const {
88  return StringPiece("google_compute_api::RouterStatus");
89  }
90 
96  bool has_best_routes() const {
97  return Storage().isMember("bestRoutes");
98  }
99 
104  MutableStorage()->removeMember("bestRoutes");
105  }
106 
107 
111  const client::JsonCppArray<Route > get_best_routes() const;
112 
121  client::JsonCppArray<Route > mutable_bestRoutes();
122 
129  return Storage().isMember("bestRoutesForRouter");
130  }
131 
136  MutableStorage()->removeMember("bestRoutesForRouter");
137  }
138 
139 
144  const client::JsonCppArray<Route > get_best_routes_for_router() const;
145 
154  client::JsonCppArray<Route > mutable_bestRoutesForRouter();
155 
161  bool has_bgp_peer_status() const {
162  return Storage().isMember("bgpPeerStatus");
163  }
164 
169  MutableStorage()->removeMember("bgpPeerStatus");
170  }
171 
172 
176  const client::JsonCppArray<RouterStatusBgpPeerStatus > get_bgp_peer_status() const;
177 
183  client::JsonCppArray<RouterStatusBgpPeerStatus > mutable_bgpPeerStatus();
184 
190  bool has_nat_status() const {
191  return Storage().isMember("natStatus");
192  }
193 
198  MutableStorage()->removeMember("natStatus");
199  }
200 
201 
205  const client::JsonCppArray<RouterStatusNatStatus > get_nat_status() const;
206 
212  client::JsonCppArray<RouterStatusNatStatus > mutable_natStatus();
213 
219  bool has_network() const {
220  return Storage().isMember("network");
221  }
222 
226  void clear_network() {
227  MutableStorage()->removeMember("network");
228  }
229 
230 
234  const StringPiece get_network() const {
235  const Json::Value& v = Storage("network");
236  if (v == Json::Value::null) return StringPiece("");
237  return StringPiece(v.asCString());
238  }
239 
247  void set_network(const StringPiece& value) {
248  *MutableStorage("network") = value.data();
249  }
250 
251  private:
252  void operator=(const RouterStatus&);
253 }; // RouterStatus
254 } // namespace google_compute_api
255 #endif // GOOGLE_COMPUTE_API_ROUTER_STATUS_H_
bool has_nat_status() const
Definition: router_status.h:190
bool has_best_routes_for_router() const
Definition: router_status.h:128
Definition: router_status.h:54
const StringPiece GetTypeName() const
Definition: router_status.h:87
void clear_best_routes()
Definition: router_status.h:103
bool has_network() const
Definition: router_status.h:219
Definition: accelerator_config.h:39
bool has_best_routes() const
Definition: router_status.h:96
const StringPiece get_network() const
Definition: router_status.h:234
Definition: accelerator_config.cc:41
void clear_nat_status()
Definition: router_status.h:197
void clear_best_routes_for_router()
Definition: router_status.h:135
void set_network(const StringPiece &value)
Definition: router_status.h:247
void clear_bgp_peer_status()
Definition: router_status.h:168
bool has_bgp_peer_status() const
Definition: router_status.h:161
void clear_network()
Definition: router_status.h:226