compute  v1
networks_add_peering_request.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_NETWORKS_ADD_PEERING_REQUEST_H_
31 #define GOOGLE_COMPUTE_API_NETWORKS_ADD_PEERING_REQUEST_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/network_peering.h"
39 
40 namespace Json {
41 class Value;
42 } // namespace Json
43 
44 namespace google_compute_api {
45 using namespace googleapis;
46 
52 class NetworksAddPeeringRequest : public client::JsonCppData {
53  public:
59  static NetworksAddPeeringRequest* New();
60 
66  explicit NetworksAddPeeringRequest(const Json::Value& storage);
67 
73  explicit NetworksAddPeeringRequest(Json::Value* storage);
74 
78  virtual ~NetworksAddPeeringRequest();
79 
85  const StringPiece GetTypeName() const {
86  return StringPiece("google_compute_api::NetworksAddPeeringRequest");
87  }
88 
94  bool has_auto_create_routes() const {
95  return Storage().isMember("autoCreateRoutes");
96  }
97 
102  MutableStorage()->removeMember("autoCreateRoutes");
103  }
104 
105 
109  bool get_auto_create_routes() const {
110  const Json::Value& storage = Storage("autoCreateRoutes");
111  return client::JsonValueToCppValueHelper<bool >(storage);
112  }
113 
123  void set_auto_create_routes(bool value) {
124  client::SetJsonValueFromCppValueHelper<bool >(
125  value, MutableStorage("autoCreateRoutes"));
126  }
127 
133  bool has_name() const {
134  return Storage().isMember("name");
135  }
136 
140  void clear_name() {
141  MutableStorage()->removeMember("name");
142  }
143 
144 
148  const StringPiece get_name() const {
149  const Json::Value& v = Storage("name");
150  if (v == Json::Value::null) return StringPiece("");
151  return StringPiece(v.asCString());
152  }
153 
161  void set_name(const StringPiece& value) {
162  *MutableStorage("name") = value.data();
163  }
164 
170  bool has_network_peering() const {
171  return Storage().isMember("networkPeering");
172  }
173 
178  MutableStorage()->removeMember("networkPeering");
179  }
180 
181 
186  const NetworkPeering get_network_peering() const;
187 
200  NetworkPeering mutable_networkPeering();
201 
207  bool has_peer_network() const {
208  return Storage().isMember("peerNetwork");
209  }
210 
215  MutableStorage()->removeMember("peerNetwork");
216  }
217 
218 
222  const StringPiece get_peer_network() const {
223  const Json::Value& v = Storage("peerNetwork");
224  if (v == Json::Value::null) return StringPiece("");
225  return StringPiece(v.asCString());
226  }
227 
238  void set_peer_network(const StringPiece& value) {
239  *MutableStorage("peerNetwork") = value.data();
240  }
241 
242  private:
243  void operator=(const NetworksAddPeeringRequest&);
244 }; // NetworksAddPeeringRequest
245 } // namespace google_compute_api
246 #endif // GOOGLE_COMPUTE_API_NETWORKS_ADD_PEERING_REQUEST_H_
void set_auto_create_routes(bool value)
Definition: networks_add_peering_request.h:123
void set_peer_network(const StringPiece &value)
Definition: networks_add_peering_request.h:238
void clear_auto_create_routes()
Definition: networks_add_peering_request.h:101
Definition: networks_add_peering_request.h:52
bool has_auto_create_routes() const
Definition: networks_add_peering_request.h:94
void clear_network_peering()
Definition: networks_add_peering_request.h:177
const StringPiece get_peer_network() const
Definition: networks_add_peering_request.h:222
const StringPiece get_name() const
Definition: networks_add_peering_request.h:148
const StringPiece GetTypeName() const
Definition: networks_add_peering_request.h:85
Definition: accelerator_config.h:39
bool has_peer_network() const
Definition: networks_add_peering_request.h:207
Definition: accelerator_config.cc:41
bool has_network_peering() const
Definition: networks_add_peering_request.h:170
void clear_name()
Definition: networks_add_peering_request.h:140
void clear_peer_network()
Definition: networks_add_peering_request.h:214
bool has_name() const
Definition: networks_add_peering_request.h:133
Definition: network_peering.h:52
void set_name(const StringPiece &value)
Definition: networks_add_peering_request.h:161
bool get_auto_create_routes() const
Definition: networks_add_peering_request.h:109