container  v1
node_taint.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: 2020-03-07, 01:20:42 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // Kubernetes Engine API (container/v1)
24 // Generated from:
25 // Version: v1
26 // Revision: 93
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_CONTAINER_API_NODE_TAINT_H_
31 #define GOOGLE_CONTAINER_API_NODE_TAINT_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 namespace Json {
39 class Value;
40 } // namespace Json
41 
42 namespace google_container_api {
43 using namespace googleapis;
44 
57 class NodeTaint : public client::JsonCppData {
58  public:
64  static NodeTaint* New();
65 
71  explicit NodeTaint(const Json::Value& storage);
72 
78  explicit NodeTaint(Json::Value* storage);
79 
83  virtual ~NodeTaint();
84 
90  const StringPiece GetTypeName() const {
91  return StringPiece("google_container_api::NodeTaint");
92  }
93 
99  bool has_effect() const {
100  return Storage().isMember("effect");
101  }
102 
106  void clear_effect() {
107  MutableStorage()->removeMember("effect");
108  }
109 
110 
114  const StringPiece get_effect() const {
115  const Json::Value& v = Storage("effect");
116  if (v == Json::Value::null) return StringPiece("");
117  return StringPiece(v.asCString());
118  }
119 
127  void set_effect(const StringPiece& value) {
128  *MutableStorage("effect") = value.data();
129  }
130 
136  bool has_key() const {
137  return Storage().isMember("key");
138  }
139 
143  void clear_key() {
144  MutableStorage()->removeMember("key");
145  }
146 
147 
151  const StringPiece get_key() const {
152  const Json::Value& v = Storage("key");
153  if (v == Json::Value::null) return StringPiece("");
154  return StringPiece(v.asCString());
155  }
156 
164  void set_key(const StringPiece& value) {
165  *MutableStorage("key") = value.data();
166  }
167 
173  bool has_value() const {
174  return Storage().isMember("value");
175  }
176 
180  void clear_value() {
181  MutableStorage()->removeMember("value");
182  }
183 
184 
188  const StringPiece get_value() const {
189  const Json::Value& v = Storage("value");
190  if (v == Json::Value::null) return StringPiece("");
191  return StringPiece(v.asCString());
192  }
193 
201  void set_value(const StringPiece& value) {
202  *MutableStorage("value") = value.data();
203  }
204 
205  private:
206  void operator=(const NodeTaint&);
207 }; // NodeTaint
208 } // namespace google_container_api
209 #endif // GOOGLE_CONTAINER_API_NODE_TAINT_H_
const StringPiece get_value() const
Definition: node_taint.h:188
void clear_effect()
Definition: node_taint.h:106
void clear_key()
Definition: node_taint.h:143
void clear_value()
Definition: node_taint.h:180
bool has_key() const
Definition: node_taint.h:136
Definition: node_taint.h:57
bool has_value() const
Definition: node_taint.h:173
const StringPiece get_key() const
Definition: node_taint.h:151
Definition: accelerator_config.h:39
void set_key(const StringPiece &value)
Definition: node_taint.h:164
Definition: accelerator_config.cc:41
bool has_effect() const
Definition: node_taint.h:99
const StringPiece GetTypeName() const
Definition: node_taint.h:90
const StringPiece get_effect() const
Definition: node_taint.h:114
void set_value(const StringPiece &value)
Definition: node_taint.h:201
void set_effect(const StringPiece &value)
Definition: node_taint.h:127