dataflow  v1b3
disk.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_DISK_H_
31 #define GOOGLE_DATAFLOW_API_DISK_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 
51 class Disk : public client::JsonCppData {
52  public:
58  static Disk* New();
59 
65  explicit Disk(const Json::Value& storage);
66 
72  explicit Disk(Json::Value* storage);
73 
77  virtual ~Disk();
78 
84  const StringPiece GetTypeName() const {
85  return StringPiece("google_dataflow_api::Disk");
86  }
87 
93  bool has_disk_type() const {
94  return Storage().isMember("diskType");
95  }
96 
101  MutableStorage()->removeMember("diskType");
102  }
103 
104 
108  const StringPiece get_disk_type() const {
109  const Json::Value& v = Storage("diskType");
110  if (v == Json::Value::null) return StringPiece("");
111  return StringPiece(v.asCString());
112  }
113 
130  void set_disk_type(const StringPiece& value) {
131  *MutableStorage("diskType") = value.data();
132  }
133 
139  bool has_mount_point() const {
140  return Storage().isMember("mountPoint");
141  }
142 
147  MutableStorage()->removeMember("mountPoint");
148  }
149 
150 
154  const StringPiece get_mount_point() const {
155  const Json::Value& v = Storage("mountPoint");
156  if (v == Json::Value::null) return StringPiece("");
157  return StringPiece(v.asCString());
158  }
159 
167  void set_mount_point(const StringPiece& value) {
168  *MutableStorage("mountPoint") = value.data();
169  }
170 
176  bool has_size_gb() const {
177  return Storage().isMember("sizeGb");
178  }
179 
183  void clear_size_gb() {
184  MutableStorage()->removeMember("sizeGb");
185  }
186 
187 
191  int32 get_size_gb() const {
192  const Json::Value& storage = Storage("sizeGb");
193  return client::JsonValueToCppValueHelper<int32 >(storage);
194  }
195 
204  void set_size_gb(int32 value) {
205  client::SetJsonValueFromCppValueHelper<int32 >(
206  value, MutableStorage("sizeGb"));
207  }
208 
209  private:
210  void operator=(const Disk&);
211 }; // Disk
212 } // namespace google_dataflow_api
213 #endif // GOOGLE_DATAFLOW_API_DISK_H_
void clear_mount_point()
Definition: disk.h:146
void set_size_gb(int32 value)
Definition: disk.h:204
void clear_disk_type()
Definition: disk.h:100
Definition: disk.h:51
const StringPiece get_disk_type() const
Definition: disk.h:108
Definition: approximate_progress.h:40
bool has_size_gb() const
Definition: disk.h:176
bool has_disk_type() const
Definition: disk.h:93
void set_disk_type(const StringPiece &value)
Definition: disk.h:130
int32 get_size_gb() const
Definition: disk.h:191
bool has_mount_point() const
Definition: disk.h:139
void clear_size_gb()
Definition: disk.h:183
const StringPiece get_mount_point() const
Definition: disk.h:154
Definition: approximate_progress.cc:42
const StringPiece GetTypeName() const
Definition: disk.h:84
void set_mount_point(const StringPiece &value)
Definition: disk.h:167