compute  v1
tcph_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_TCPH_EALTH_CHECK_H_
31 #define GOOGLE_COMPUTE_API_TCPH_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 TCPHealthCheck : public client::JsonCppData {
52  public:
58  static TCPHealthCheck* New();
59 
65  explicit TCPHealthCheck(const Json::Value& storage);
66 
72  explicit TCPHealthCheck(Json::Value* storage);
73 
77  virtual ~TCPHealthCheck();
78 
84  const StringPiece GetTypeName() const {
85  return StringPiece("google_compute_api::TCPHealthCheck");
86  }
87 
93  bool has_port() const {
94  return Storage().isMember("port");
95  }
96 
100  void clear_port() {
101  MutableStorage()->removeMember("port");
102  }
103 
104 
108  int32 get_port() const {
109  const Json::Value& storage = Storage("port");
110  return client::JsonValueToCppValueHelper<int32 >(storage);
111  }
112 
121  void set_port(int32 value) {
122  client::SetJsonValueFromCppValueHelper<int32 >(
123  value, MutableStorage("port"));
124  }
125 
131  bool has_port_name() const {
132  return Storage().isMember("portName");
133  }
134 
139  MutableStorage()->removeMember("portName");
140  }
141 
142 
146  const StringPiece get_port_name() const {
147  const Json::Value& v = Storage("portName");
148  if (v == Json::Value::null) return StringPiece("");
149  return StringPiece(v.asCString());
150  }
151 
160  void set_port_name(const StringPiece& value) {
161  *MutableStorage("portName") = value.data();
162  }
163 
169  bool has_port_specification() const {
170  return Storage().isMember("portSpecification");
171  }
172 
177  MutableStorage()->removeMember("portSpecification");
178  }
179 
180 
184  const StringPiece get_port_specification() const {
185  const Json::Value& v = Storage("portSpecification");
186  if (v == Json::Value::null) return StringPiece("");
187  return StringPiece(v.asCString());
188  }
189 
214  void set_port_specification(const StringPiece& value) {
215  *MutableStorage("portSpecification") = value.data();
216  }
217 
223  bool has_proxy_header() const {
224  return Storage().isMember("proxyHeader");
225  }
226 
231  MutableStorage()->removeMember("proxyHeader");
232  }
233 
234 
238  const StringPiece get_proxy_header() const {
239  const Json::Value& v = Storage("proxyHeader");
240  if (v == Json::Value::null) return StringPiece("");
241  return StringPiece(v.asCString());
242  }
243 
252  void set_proxy_header(const StringPiece& value) {
253  *MutableStorage("proxyHeader") = value.data();
254  }
255 
261  bool has_request() const {
262  return Storage().isMember("request");
263  }
264 
268  void clear_request() {
269  MutableStorage()->removeMember("request");
270  }
271 
272 
276  const StringPiece get_request() const {
277  const Json::Value& v = Storage("request");
278  if (v == Json::Value::null) return StringPiece("");
279  return StringPiece(v.asCString());
280  }
281 
292  void set_request(const StringPiece& value) {
293  *MutableStorage("request") = value.data();
294  }
295 
301  bool has_response() const {
302  return Storage().isMember("response");
303  }
304 
308  void clear_response() {
309  MutableStorage()->removeMember("response");
310  }
311 
312 
316  const StringPiece get_response() const {
317  const Json::Value& v = Storage("response");
318  if (v == Json::Value::null) return StringPiece("");
319  return StringPiece(v.asCString());
320  }
321 
331  void set_response(const StringPiece& value) {
332  *MutableStorage("response") = value.data();
333  }
334 
335  private:
336  void operator=(const TCPHealthCheck&);
337 }; // TCPHealthCheck
338 } // namespace google_compute_api
339 #endif // GOOGLE_COMPUTE_API_TCPH_EALTH_CHECK_H_
bool has_port_name() const
Definition: tcph_ealth_check.h:131
const StringPiece get_port_name() const
Definition: tcph_ealth_check.h:146
void clear_request()
Definition: tcph_ealth_check.h:268
void set_proxy_header(const StringPiece &value)
Definition: tcph_ealth_check.h:252
const StringPiece GetTypeName() const
Definition: tcph_ealth_check.h:84
void clear_port()
Definition: tcph_ealth_check.h:100
void clear_port_specification()
Definition: tcph_ealth_check.h:176
bool has_port_specification() const
Definition: tcph_ealth_check.h:169
bool has_request() const
Definition: tcph_ealth_check.h:261
void set_port_name(const StringPiece &value)
Definition: tcph_ealth_check.h:160
const StringPiece get_proxy_header() const
Definition: tcph_ealth_check.h:238
Definition: tcph_ealth_check.h:51
bool has_response() const
Definition: tcph_ealth_check.h:301
void clear_proxy_header()
Definition: tcph_ealth_check.h:230
Definition: accelerator_config.h:39
void set_port_specification(const StringPiece &value)
Definition: tcph_ealth_check.h:214
void set_response(const StringPiece &value)
Definition: tcph_ealth_check.h:331
void set_port(int32 value)
Definition: tcph_ealth_check.h:121
const StringPiece get_request() const
Definition: tcph_ealth_check.h:276
const StringPiece get_response() const
Definition: tcph_ealth_check.h:316
int32 get_port() const
Definition: tcph_ealth_check.h:108
Definition: accelerator_config.cc:41
void set_request(const StringPiece &value)
Definition: tcph_ealth_check.h:292
bool has_port() const
Definition: tcph_ealth_check.h:93
void clear_response()
Definition: tcph_ealth_check.h:308
bool has_proxy_header() const
Definition: tcph_ealth_check.h:223
const StringPiece get_port_specification() const
Definition: tcph_ealth_check.h:184
void clear_port_name()
Definition: tcph_ealth_check.h:138