compute  v1
backend.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-04-20, 05:56:52 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: 213
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_COMPUTE_API_BACKEND_H_
31 #define GOOGLE_COMPUTE_API_BACKEND_H_
32 
33 #include <string>
34 #include "googleapis/base/integral_types.h"
35 #include "googleapis/base/macros.h"
36 #include "googleapis/client/data/jsoncpp_data.h"
37 #include "googleapis/strings/stringpiece.h"
38 
39 namespace Json {
40 class Value;
41 } // namespace Json
42 
43 namespace google_compute_api {
44 using namespace googleapis;
45 
51 class Backend : public client::JsonCppData {
52  public:
58  static Backend* New();
59 
65  explicit Backend(const Json::Value& storage);
66 
72  explicit Backend(Json::Value* storage);
73 
77  virtual ~Backend();
78 
84  const StringPiece GetTypeName() const {
85  return StringPiece("google_compute_api::Backend");
86  }
87 
93  bool has_balancing_mode() const {
94  return Storage().isMember("balancingMode");
95  }
96 
101  MutableStorage()->removeMember("balancingMode");
102  }
103 
104 
108  const StringPiece get_balancing_mode() const {
109  const Json::Value& v = Storage("balancingMode");
110  if (v == Json::Value::null) return StringPiece("");
111  return StringPiece(v.asCString());
112  }
113 
126  void set_balancing_mode(const StringPiece& value) {
127  *MutableStorage("balancingMode") = value.data();
128  }
129 
135  bool has_capacity_scaler() const {
136  return Storage().isMember("capacityScaler");
137  }
138 
143  MutableStorage()->removeMember("capacityScaler");
144  }
145 
146 
150  float get_capacity_scaler() const {
151  const Json::Value& storage = Storage("capacityScaler");
152  return client::JsonValueToCppValueHelper<float >(storage);
153  }
154 
168  void set_capacity_scaler(float value) {
169  client::SetJsonValueFromCppValueHelper<float >(
170  value, MutableStorage("capacityScaler"));
171  }
172 
178  bool has_description() const {
179  return Storage().isMember("description");
180  }
181 
186  MutableStorage()->removeMember("description");
187  }
188 
189 
193  const StringPiece get_description() const {
194  const Json::Value& v = Storage("description");
195  if (v == Json::Value::null) return StringPiece("");
196  return StringPiece(v.asCString());
197  }
198 
207  void set_description(const StringPiece& value) {
208  *MutableStorage("description") = value.data();
209  }
210 
216  bool has_group() const {
217  return Storage().isMember("group");
218  }
219 
223  void clear_group() {
224  MutableStorage()->removeMember("group");
225  }
226 
227 
231  const StringPiece get_group() const {
232  const Json::Value& v = Storage("group");
233  if (v == Json::Value::null) return StringPiece("");
234  return StringPiece(v.asCString());
235  }
236 
262  void set_group(const StringPiece& value) {
263  *MutableStorage("group") = value.data();
264  }
265 
271  bool has_max_connections() const {
272  return Storage().isMember("maxConnections");
273  }
274 
279  MutableStorage()->removeMember("maxConnections");
280  }
281 
282 
286  int32 get_max_connections() const {
287  const Json::Value& storage = Storage("maxConnections");
288  return client::JsonValueToCppValueHelper<int32 >(storage);
289  }
290 
302  void set_max_connections(int32 value) {
303  client::SetJsonValueFromCppValueHelper<int32 >(
304  value, MutableStorage("maxConnections"));
305  }
306 
315  return Storage().isMember("maxConnectionsPerEndpoint");
316  }
317 
322  MutableStorage()->removeMember("maxConnectionsPerEndpoint");
323  }
324 
325 
330  const Json::Value& storage = Storage("maxConnectionsPerEndpoint");
331  return client::JsonValueToCppValueHelper<int32 >(storage);
332  }
333 
348  client::SetJsonValueFromCppValueHelper<int32 >(
349  value, MutableStorage("maxConnectionsPerEndpoint"));
350  }
351 
360  return Storage().isMember("maxConnectionsPerInstance");
361  }
362 
367  MutableStorage()->removeMember("maxConnectionsPerInstance");
368  }
369 
370 
375  const Json::Value& storage = Storage("maxConnectionsPerInstance");
376  return client::JsonValueToCppValueHelper<int32 >(storage);
377  }
378 
392  client::SetJsonValueFromCppValueHelper<int32 >(
393  value, MutableStorage("maxConnectionsPerInstance"));
394  }
395 
401  bool has_max_rate() const {
402  return Storage().isMember("maxRate");
403  }
404 
408  void clear_max_rate() {
409  MutableStorage()->removeMember("maxRate");
410  }
411 
412 
416  int32 get_max_rate() const {
417  const Json::Value& storage = Storage("maxRate");
418  return client::JsonValueToCppValueHelper<int32 >(storage);
419  }
420 
432  void set_max_rate(int32 value) {
433  client::SetJsonValueFromCppValueHelper<int32 >(
434  value, MutableStorage("maxRate"));
435  }
436 
443  return Storage().isMember("maxRatePerEndpoint");
444  }
445 
450  MutableStorage()->removeMember("maxRatePerEndpoint");
451  }
452 
453 
458  const Json::Value& storage = Storage("maxRatePerEndpoint");
459  return client::JsonValueToCppValueHelper<float >(storage);
460  }
461 
474  void set_max_rate_per_endpoint(float value) {
475  client::SetJsonValueFromCppValueHelper<float >(
476  value, MutableStorage("maxRatePerEndpoint"));
477  }
478 
485  return Storage().isMember("maxRatePerInstance");
486  }
487 
492  MutableStorage()->removeMember("maxRatePerInstance");
493  }
494 
495 
500  const Json::Value& storage = Storage("maxRatePerInstance");
501  return client::JsonValueToCppValueHelper<float >(storage);
502  }
503 
516  void set_max_rate_per_instance(float value) {
517  client::SetJsonValueFromCppValueHelper<float >(
518  value, MutableStorage("maxRatePerInstance"));
519  }
520 
526  bool has_max_utilization() const {
527  return Storage().isMember("maxUtilization");
528  }
529 
534  MutableStorage()->removeMember("maxUtilization");
535  }
536 
537 
541  float get_max_utilization() const {
542  const Json::Value& storage = Storage("maxUtilization");
543  return client::JsonValueToCppValueHelper<float >(storage);
544  }
545 
557  void set_max_utilization(float value) {
558  client::SetJsonValueFromCppValueHelper<float >(
559  value, MutableStorage("maxUtilization"));
560  }
561 
562  private:
563  void operator=(const Backend&);
564 }; // Backend
565 } // namespace google_compute_api
566 #endif // GOOGLE_COMPUTE_API_BACKEND_H_
void set_max_rate_per_instance(float value)
Definition: backend.h:516
void clear_max_connections()
Definition: backend.h:278
void set_max_connections(int32 value)
Definition: backend.h:302
bool has_balancing_mode() const
Definition: backend.h:93
void set_max_connections_per_instance(int32 value)
Definition: backend.h:391
void set_max_rate_per_endpoint(float value)
Definition: backend.h:474
void set_max_utilization(float value)
Definition: backend.h:557
int32 get_max_rate() const
Definition: backend.h:416
const StringPiece get_balancing_mode() const
Definition: backend.h:108
void set_group(const StringPiece &value)
Definition: backend.h:262
bool has_description() const
Definition: backend.h:178
const StringPiece get_description() const
Definition: backend.h:193
void clear_group()
Definition: backend.h:223
int32 get_max_connections() const
Definition: backend.h:286
void clear_capacity_scaler()
Definition: backend.h:142
const StringPiece GetTypeName() const
Definition: backend.h:84
void set_capacity_scaler(float value)
Definition: backend.h:168
void clear_max_rate()
Definition: backend.h:408
bool has_max_connections_per_instance() const
Definition: backend.h:359
void set_max_rate(int32 value)
Definition: backend.h:432
bool has_max_rate_per_instance() const
Definition: backend.h:484
void set_max_connections_per_endpoint(int32 value)
Definition: backend.h:347
void clear_balancing_mode()
Definition: backend.h:100
void clear_max_connections_per_endpoint()
Definition: backend.h:321
bool has_max_utilization() const
Definition: backend.h:526
void clear_max_utilization()
Definition: backend.h:533
Definition: backend.h:51
int32 get_max_connections_per_endpoint() const
Definition: backend.h:329
Definition: accelerator_config.h:39
const StringPiece get_group() const
Definition: backend.h:231
void clear_max_rate_per_instance()
Definition: backend.h:491
void clear_max_rate_per_endpoint()
Definition: backend.h:449
bool has_max_connections() const
Definition: backend.h:271
Definition: accelerator_config.cc:41
void clear_description()
Definition: backend.h:185
void set_balancing_mode(const StringPiece &value)
Definition: backend.h:126
bool has_max_rate_per_endpoint() const
Definition: backend.h:442
int32 get_max_connections_per_instance() const
Definition: backend.h:374
bool has_max_rate() const
Definition: backend.h:401
float get_max_rate_per_instance() const
Definition: backend.h:499
bool has_capacity_scaler() const
Definition: backend.h:135
bool has_max_connections_per_endpoint() const
Definition: backend.h:314
void clear_max_connections_per_instance()
Definition: backend.h:366
float get_max_utilization() const
Definition: backend.h:541
float get_capacity_scaler() const
Definition: backend.h:150
float get_max_rate_per_endpoint() const
Definition: backend.h:457
bool has_group() const
Definition: backend.h:216
void set_description(const StringPiece &value)
Definition: backend.h:207