container  v1
resource_limit.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_RESOURCE_LIMIT_H_
31 #define GOOGLE_CONTAINER_API_RESOURCE_LIMIT_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_container_api {
44 using namespace googleapis;
45 
52 class ResourceLimit : public client::JsonCppData {
53  public:
59  static ResourceLimit* New();
60 
66  explicit ResourceLimit(const Json::Value& storage);
67 
73  explicit ResourceLimit(Json::Value* storage);
74 
78  virtual ~ResourceLimit();
79 
85  const StringPiece GetTypeName() const {
86  return StringPiece("google_container_api::ResourceLimit");
87  }
88 
94  bool has_maximum() const {
95  return Storage().isMember("maximum");
96  }
97 
101  void clear_maximum() {
102  MutableStorage()->removeMember("maximum");
103  }
104 
105 
109  int64 get_maximum() const {
110  const Json::Value& storage = Storage("maximum");
111  return client::JsonValueToCppValueHelper<int64 >(storage);
112  }
113 
121  void set_maximum(int64 value) {
122  client::SetJsonValueFromCppValueHelper<int64 >(
123  value, MutableStorage("maximum"));
124  }
125 
131  bool has_minimum() const {
132  return Storage().isMember("minimum");
133  }
134 
138  void clear_minimum() {
139  MutableStorage()->removeMember("minimum");
140  }
141 
142 
146  int64 get_minimum() const {
147  const Json::Value& storage = Storage("minimum");
148  return client::JsonValueToCppValueHelper<int64 >(storage);
149  }
150 
158  void set_minimum(int64 value) {
159  client::SetJsonValueFromCppValueHelper<int64 >(
160  value, MutableStorage("minimum"));
161  }
162 
168  bool has_resource_type() const {
169  return Storage().isMember("resourceType");
170  }
171 
176  MutableStorage()->removeMember("resourceType");
177  }
178 
179 
183  const StringPiece get_resource_type() const {
184  const Json::Value& v = Storage("resourceType");
185  if (v == Json::Value::null) return StringPiece("");
186  return StringPiece(v.asCString());
187  }
188 
196  void set_resource_type(const StringPiece& value) {
197  *MutableStorage("resourceType") = value.data();
198  }
199 
200  private:
201  void operator=(const ResourceLimit&);
202 }; // ResourceLimit
203 } // namespace google_container_api
204 #endif // GOOGLE_CONTAINER_API_RESOURCE_LIMIT_H_
int64 get_minimum() const
Definition: resource_limit.h:146
bool has_resource_type() const
Definition: resource_limit.h:168
void set_minimum(int64 value)
Definition: resource_limit.h:158
bool has_maximum() const
Definition: resource_limit.h:94
Definition: resource_limit.h:52
const StringPiece GetTypeName() const
Definition: resource_limit.h:85
void clear_maximum()
Definition: resource_limit.h:101
bool has_minimum() const
Definition: resource_limit.h:131
int64 get_maximum() const
Definition: resource_limit.h:109
void set_maximum(int64 value)
Definition: resource_limit.h:121
Definition: accelerator_config.h:39
Definition: accelerator_config.cc:41
void clear_resource_type()
Definition: resource_limit.h:175
void set_resource_type(const StringPiece &value)
Definition: resource_limit.h:196
void clear_minimum()
Definition: resource_limit.h:138
const StringPiece get_resource_type() const
Definition: resource_limit.h:183