dataflow  v1b3
status.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_STATUS_H_
31 #define GOOGLE_DATAFLOW_API_STATUS_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 
57 class Status : public client::JsonCppData {
58  public:
64  static Status* New();
65 
71  explicit Status(const Json::Value& storage);
72 
78  explicit Status(Json::Value* storage);
79 
83  virtual ~Status();
84 
90  const StringPiece GetTypeName() const {
91  return StringPiece("google_dataflow_api::Status");
92  }
93 
99  bool has_code() const {
100  return Storage().isMember("code");
101  }
102 
106  void clear_code() {
107  MutableStorage()->removeMember("code");
108  }
109 
110 
114  int32 get_code() const {
115  const Json::Value& storage = Storage("code");
116  return client::JsonValueToCppValueHelper<int32 >(storage);
117  }
118 
126  void set_code(int32 value) {
127  client::SetJsonValueFromCppValueHelper<int32 >(
128  value, MutableStorage("code"));
129  }
130 
136  bool has_details() const {
137  return Storage().isMember("details");
138  }
139 
143  void clear_details() {
144  MutableStorage()->removeMember("details");
145  }
146 
147 
151  const client::JsonCppArray<client::JsonCppAssociativeArray<client::JsonCppData > > get_details() const {
152  const Json::Value& storage = Storage("details");
153  return client::JsonValueToCppValueHelper<client::JsonCppArray<client::JsonCppAssociativeArray<client::JsonCppData > > >(storage);
154  }
155 
164  client::JsonCppArray<client::JsonCppAssociativeArray<client::JsonCppData > > mutable_details() {
165  Json::Value* storage = MutableStorage("details");
166  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<client::JsonCppAssociativeArray<client::JsonCppData > > >(storage);
167  }
168 
174  bool has_message() const {
175  return Storage().isMember("message");
176  }
177 
181  void clear_message() {
182  MutableStorage()->removeMember("message");
183  }
184 
185 
189  const StringPiece get_message() const {
190  const Json::Value& v = Storage("message");
191  if (v == Json::Value::null) return StringPiece("");
192  return StringPiece(v.asCString());
193  }
194 
204  void set_message(const StringPiece& value) {
205  *MutableStorage("message") = value.data();
206  }
207 
208  private:
209  void operator=(const Status&);
210 }; // Status
211 } // namespace google_dataflow_api
212 #endif // GOOGLE_DATAFLOW_API_STATUS_H_
bool has_code() const
Definition: status.h:99
client::JsonCppArray< client::JsonCppAssociativeArray< client::JsonCppData > > mutable_details()
Definition: status.h:164
bool has_message() const
Definition: status.h:174
const StringPiece GetTypeName() const
Definition: status.h:90
void clear_details()
Definition: status.h:143
int32 get_code() const
Definition: status.h:114
void set_code(int32 value)
Definition: status.h:126
Definition: approximate_progress.h:40
void clear_code()
Definition: status.h:106
bool has_details() const
Definition: status.h:136
Definition: approximate_progress.cc:42
Definition: status.h:57
const StringPiece get_message() const
Definition: status.h:189
void clear_message()
Definition: status.h:181
const client::JsonCppArray< client::JsonCppAssociativeArray< client::JsonCppData > > get_details() const
Definition: status.h:151
void set_message(const StringPiece &value)
Definition: status.h:204