compute  v1
http_2h_ealth_check.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_HTTP_2H_EALTH_CHECK_H_
31 #define GOOGLE_COMPUTE_API_HTTP_2H_EALTH_CHECK_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 HTTP2HealthCheck : public client::JsonCppData {
52  public:
58  static HTTP2HealthCheck* New();
59 
65  explicit HTTP2HealthCheck(const Json::Value& storage);
66 
72  explicit HTTP2HealthCheck(Json::Value* storage);
73 
77  virtual ~HTTP2HealthCheck();
78 
84  const StringPiece GetTypeName() const {
85  return StringPiece("google_compute_api::HTTP2HealthCheck");
86  }
87 
93  bool has_host() const {
94  return Storage().isMember("host");
95  }
96 
100  void clear_host() {
101  MutableStorage()->removeMember("host");
102  }
103 
104 
108  const StringPiece get_host() const {
109  const Json::Value& v = Storage("host");
110  if (v == Json::Value::null) return StringPiece("");
111  return StringPiece(v.asCString());
112  }
113 
123  void set_host(const StringPiece& value) {
124  *MutableStorage("host") = value.data();
125  }
126 
132  bool has_port() const {
133  return Storage().isMember("port");
134  }
135 
139  void clear_port() {
140  MutableStorage()->removeMember("port");
141  }
142 
143 
147  int32 get_port() const {
148  const Json::Value& storage = Storage("port");
149  return client::JsonValueToCppValueHelper<int32 >(storage);
150  }
151 
160  void set_port(int32 value) {
161  client::SetJsonValueFromCppValueHelper<int32 >(
162  value, MutableStorage("port"));
163  }
164 
170  bool has_port_name() const {
171  return Storage().isMember("portName");
172  }
173 
178  MutableStorage()->removeMember("portName");
179  }
180 
181 
185  const StringPiece get_port_name() const {
186  const Json::Value& v = Storage("portName");
187  if (v == Json::Value::null) return StringPiece("");
188  return StringPiece(v.asCString());
189  }
190 
199  void set_port_name(const StringPiece& value) {
200  *MutableStorage("portName") = value.data();
201  }
202 
208  bool has_port_specification() const {
209  return Storage().isMember("portSpecification");
210  }
211 
216  MutableStorage()->removeMember("portSpecification");
217  }
218 
219 
223  const StringPiece get_port_specification() const {
224  const Json::Value& v = Storage("portSpecification");
225  if (v == Json::Value::null) return StringPiece("");
226  return StringPiece(v.asCString());
227  }
228 
253  void set_port_specification(const StringPiece& value) {
254  *MutableStorage("portSpecification") = value.data();
255  }
256 
262  bool has_proxy_header() const {
263  return Storage().isMember("proxyHeader");
264  }
265 
270  MutableStorage()->removeMember("proxyHeader");
271  }
272 
273 
277  const StringPiece get_proxy_header() const {
278  const Json::Value& v = Storage("proxyHeader");
279  if (v == Json::Value::null) return StringPiece("");
280  return StringPiece(v.asCString());
281  }
282 
291  void set_proxy_header(const StringPiece& value) {
292  *MutableStorage("proxyHeader") = value.data();
293  }
294 
300  bool has_request_path() const {
301  return Storage().isMember("requestPath");
302  }
303 
308  MutableStorage()->removeMember("requestPath");
309  }
310 
311 
315  const StringPiece get_request_path() const {
316  const Json::Value& v = Storage("requestPath");
317  if (v == Json::Value::null) return StringPiece("");
318  return StringPiece(v.asCString());
319  }
320 
329  void set_request_path(const StringPiece& value) {
330  *MutableStorage("requestPath") = value.data();
331  }
332 
338  bool has_response() const {
339  return Storage().isMember("response");
340  }
341 
345  void clear_response() {
346  MutableStorage()->removeMember("response");
347  }
348 
349 
353  const StringPiece get_response() const {
354  const Json::Value& v = Storage("response");
355  if (v == Json::Value::null) return StringPiece("");
356  return StringPiece(v.asCString());
357  }
358 
368  void set_response(const StringPiece& value) {
369  *MutableStorage("response") = value.data();
370  }
371 
372  private:
373  void operator=(const HTTP2HealthCheck&);
374 }; // HTTP2HealthCheck
375 } // namespace google_compute_api
376 #endif // GOOGLE_COMPUTE_API_HTTP_2H_EALTH_CHECK_H_
void clear_port_specification()
Definition: http_2h_ealth_check.h:215
void set_port_name(const StringPiece &value)
Definition: http_2h_ealth_check.h:199
bool has_proxy_header() const
Definition: http_2h_ealth_check.h:262
bool has_port() const
Definition: http_2h_ealth_check.h:132
bool has_request_path() const
Definition: http_2h_ealth_check.h:300
void clear_port_name()
Definition: http_2h_ealth_check.h:177
void set_proxy_header(const StringPiece &value)
Definition: http_2h_ealth_check.h:291
const StringPiece get_response() const
Definition: http_2h_ealth_check.h:353
const StringPiece get_proxy_header() const
Definition: http_2h_ealth_check.h:277
bool has_port_specification() const
Definition: http_2h_ealth_check.h:208
const StringPiece get_port_specification() const
Definition: http_2h_ealth_check.h:223
bool has_port_name() const
Definition: http_2h_ealth_check.h:170
void clear_request_path()
Definition: http_2h_ealth_check.h:307
void set_host(const StringPiece &value)
Definition: http_2h_ealth_check.h:123
int32 get_port() const
Definition: http_2h_ealth_check.h:147
void set_port(int32 value)
Definition: http_2h_ealth_check.h:160
void clear_port()
Definition: http_2h_ealth_check.h:139
bool has_response() const
Definition: http_2h_ealth_check.h:338
void clear_response()
Definition: http_2h_ealth_check.h:345
void clear_host()
Definition: http_2h_ealth_check.h:100
const StringPiece get_host() const
Definition: http_2h_ealth_check.h:108
const StringPiece GetTypeName() const
Definition: http_2h_ealth_check.h:84
Definition: accelerator_config.h:39
void set_port_specification(const StringPiece &value)
Definition: http_2h_ealth_check.h:253
void set_request_path(const StringPiece &value)
Definition: http_2h_ealth_check.h:329
Definition: http_2h_ealth_check.h:51
Definition: accelerator_config.cc:41
const StringPiece get_request_path() const
Definition: http_2h_ealth_check.h:315
void set_response(const StringPiece &value)
Definition: http_2h_ealth_check.h:368
void clear_proxy_header()
Definition: http_2h_ealth_check.h:269
const StringPiece get_port_name() const
Definition: http_2h_ealth_check.h:185
bool has_host() const
Definition: http_2h_ealth_check.h:93