container  v1
operation_progress.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_OPERATION_PROGRESS_H_
31 #define GOOGLE_CONTAINER_API_OPERATION_PROGRESS_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 #include "google/container_api/metric.h"
39 #include "google/container_api/operation_progress.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_container_api {
46 using namespace googleapis;
47 
53 class OperationProgress : public client::JsonCppData {
54  public:
60  static OperationProgress* New();
61 
67  explicit OperationProgress(const Json::Value& storage);
68 
74  explicit OperationProgress(Json::Value* storage);
75 
79  virtual ~OperationProgress();
80 
86  const StringPiece GetTypeName() const {
87  return StringPiece("google_container_api::OperationProgress");
88  }
89 
95  bool has_metrics() const {
96  return Storage().isMember("metrics");
97  }
98 
102  void clear_metrics() {
103  MutableStorage()->removeMember("metrics");
104  }
105 
106 
110  const client::JsonCppArray<Metric > get_metrics() const;
111 
133  client::JsonCppArray<Metric > mutable_metrics();
134 
140  bool has_name() const {
141  return Storage().isMember("name");
142  }
143 
147  void clear_name() {
148  MutableStorage()->removeMember("name");
149  }
150 
151 
155  const StringPiece get_name() const {
156  const Json::Value& v = Storage("name");
157  if (v == Json::Value::null) return StringPiece("");
158  return StringPiece(v.asCString());
159  }
160 
169  void set_name(const StringPiece& value) {
170  *MutableStorage("name") = value.data();
171  }
172 
178  bool has_stages() const {
179  return Storage().isMember("stages");
180  }
181 
185  void clear_stages() {
186  MutableStorage()->removeMember("stages");
187  }
188 
189 
193  const client::JsonCppArray<OperationProgress > get_stages() const;
194 
202  client::JsonCppArray<OperationProgress > mutable_stages();
203 
209  bool has_status() const {
210  return Storage().isMember("status");
211  }
212 
216  void clear_status() {
217  MutableStorage()->removeMember("status");
218  }
219 
220 
224  const StringPiece get_status() const {
225  const Json::Value& v = Storage("status");
226  if (v == Json::Value::null) return StringPiece("");
227  return StringPiece(v.asCString());
228  }
229 
238  void set_status(const StringPiece& value) {
239  *MutableStorage("status") = value.data();
240  }
241 
242  private:
243  void operator=(const OperationProgress&);
244 }; // OperationProgress
245 } // namespace google_container_api
246 #endif // GOOGLE_CONTAINER_API_OPERATION_PROGRESS_H_
void clear_name()
Definition: operation_progress.h:147
const StringPiece GetTypeName() const
Definition: operation_progress.h:86
void set_status(const StringPiece &value)
Definition: operation_progress.h:238
Definition: operation_progress.h:53
void clear_stages()
Definition: operation_progress.h:185
bool has_name() const
Definition: operation_progress.h:140
void set_name(const StringPiece &value)
Definition: operation_progress.h:169
const StringPiece get_name() const
Definition: operation_progress.h:155
void clear_metrics()
Definition: operation_progress.h:102
Definition: accelerator_config.h:39
bool has_metrics() const
Definition: operation_progress.h:95
bool has_status() const
Definition: operation_progress.h:209
void clear_status()
Definition: operation_progress.h:216
Definition: accelerator_config.cc:41
const StringPiece get_status() const
Definition: operation_progress.h:224
bool has_stages() const
Definition: operation_progress.h:178