dataflow  v1b3
mem_info.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-19, 02:23:49 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // Dataflow API (dataflow/v1b3)
24 // Generated from:
25 // Version: v1b3
26 // Revision: 302
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_DATAFLOW_API_MEM_INFO_H_
31 #define GOOGLE_DATAFLOW_API_MEM_INFO_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_dataflow_api {
44 using namespace googleapis;
45 
52 class MemInfo : public client::JsonCppData {
53  public:
59  static MemInfo* New();
60 
66  explicit MemInfo(const Json::Value& storage);
67 
73  explicit MemInfo(Json::Value* storage);
74 
78  virtual ~MemInfo();
79 
85  const StringPiece GetTypeName() const {
86  return StringPiece("google_dataflow_api::MemInfo");
87  }
88 
94  bool has_current_limit_bytes() const {
95  return Storage().isMember("currentLimitBytes");
96  }
97 
102  MutableStorage()->removeMember("currentLimitBytes");
103  }
104 
105 
109  uint64 get_current_limit_bytes() const {
110  const Json::Value& storage = Storage("currentLimitBytes");
111  return client::JsonValueToCppValueHelper<uint64 >(storage);
112  }
113 
121  void set_current_limit_bytes(uint64 value) {
122  client::SetJsonValueFromCppValueHelper<uint64 >(
123  value, MutableStorage("currentLimitBytes"));
124  }
125 
131  bool has_current_rss_bytes() const {
132  return Storage().isMember("currentRssBytes");
133  }
134 
139  MutableStorage()->removeMember("currentRssBytes");
140  }
141 
142 
146  uint64 get_current_rss_bytes() const {
147  const Json::Value& storage = Storage("currentRssBytes");
148  return client::JsonValueToCppValueHelper<uint64 >(storage);
149  }
150 
158  void set_current_rss_bytes(uint64 value) {
159  client::SetJsonValueFromCppValueHelper<uint64 >(
160  value, MutableStorage("currentRssBytes"));
161  }
162 
168  bool has_timestamp() const {
169  return Storage().isMember("timestamp");
170  }
171 
176  MutableStorage()->removeMember("timestamp");
177  }
178 
179 
183  const StringPiece get_timestamp() const {
184  const Json::Value& v = Storage("timestamp");
185  if (v == Json::Value::null) return StringPiece("");
186  return StringPiece(v.asCString());
187  }
188 
196  void set_timestamp(const StringPiece& value) {
197  *MutableStorage("timestamp") = value.data();
198  }
199 
205  bool has_total_gb_ms() const {
206  return Storage().isMember("totalGbMs");
207  }
208 
213  MutableStorage()->removeMember("totalGbMs");
214  }
215 
216 
220  uint64 get_total_gb_ms() const {
221  const Json::Value& storage = Storage("totalGbMs");
222  return client::JsonValueToCppValueHelper<uint64 >(storage);
223  }
224 
232  void set_total_gb_ms(uint64 value) {
233  client::SetJsonValueFromCppValueHelper<uint64 >(
234  value, MutableStorage("totalGbMs"));
235  }
236 
237  private:
238  void operator=(const MemInfo&);
239 }; // MemInfo
240 } // namespace google_dataflow_api
241 #endif // GOOGLE_DATAFLOW_API_MEM_INFO_H_
void clear_total_gb_ms()
Definition: mem_info.h:212
void clear_current_limit_bytes()
Definition: mem_info.h:101
uint64 get_current_rss_bytes() const
Definition: mem_info.h:146
const StringPiece get_timestamp() const
Definition: mem_info.h:183
void set_total_gb_ms(uint64 value)
Definition: mem_info.h:232
void clear_timestamp()
Definition: mem_info.h:175
void clear_current_rss_bytes()
Definition: mem_info.h:138
Definition: mem_info.h:52
Definition: approximate_progress.h:40
uint64 get_total_gb_ms() const
Definition: mem_info.h:220
void set_current_limit_bytes(uint64 value)
Definition: mem_info.h:121
void set_current_rss_bytes(uint64 value)
Definition: mem_info.h:158
const StringPiece GetTypeName() const
Definition: mem_info.h:85
void set_timestamp(const StringPiece &value)
Definition: mem_info.h:196
bool has_total_gb_ms() const
Definition: mem_info.h:205
Definition: approximate_progress.cc:42
bool has_current_rss_bytes() const
Definition: mem_info.h:131
uint64 get_current_limit_bytes() const
Definition: mem_info.h:109
bool has_timestamp() const
Definition: mem_info.h:168
bool has_current_limit_bytes() const
Definition: mem_info.h:94