dataflow  v1b3
source_split_response.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_SOURCE_SPLIT_RESPONSE_H_
31 #define GOOGLE_DATAFLOW_API_SOURCE_SPLIT_RESPONSE_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/dataflow_api/derived_source.h"
39 #include "google/dataflow_api/source_split_shard.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_dataflow_api {
46 using namespace googleapis;
47 
53 class SourceSplitResponse : public client::JsonCppData {
54  public:
60  static SourceSplitResponse* New();
61 
67  explicit SourceSplitResponse(const Json::Value& storage);
68 
74  explicit SourceSplitResponse(Json::Value* storage);
75 
79  virtual ~SourceSplitResponse();
80 
86  const StringPiece GetTypeName() const {
87  return StringPiece("google_dataflow_api::SourceSplitResponse");
88  }
89 
95  bool has_bundles() const {
96  return Storage().isMember("bundles");
97  }
98 
102  void clear_bundles() {
103  MutableStorage()->removeMember("bundles");
104  }
105 
106 
110  const client::JsonCppArray<DerivedSource > get_bundles() const;
111 
121  client::JsonCppArray<DerivedSource > mutable_bundles();
122 
128  bool has_outcome() const {
129  return Storage().isMember("outcome");
130  }
131 
135  void clear_outcome() {
136  MutableStorage()->removeMember("outcome");
137  }
138 
139 
143  const StringPiece get_outcome() const {
144  const Json::Value& v = Storage("outcome");
145  if (v == Json::Value::null) return StringPiece("");
146  return StringPiece(v.asCString());
147  }
148 
160  void set_outcome(const StringPiece& value) {
161  *MutableStorage("outcome") = value.data();
162  }
163 
169  bool has_shards() const {
170  return Storage().isMember("shards");
171  }
172 
176  void clear_shards() {
177  MutableStorage()->removeMember("shards");
178  }
179 
180 
184  const client::JsonCppArray<SourceSplitShard > get_shards() const;
185 
195  client::JsonCppArray<SourceSplitShard > mutable_shards();
196 
197  private:
198  void operator=(const SourceSplitResponse&);
199 }; // SourceSplitResponse
200 } // namespace google_dataflow_api
201 #endif // GOOGLE_DATAFLOW_API_SOURCE_SPLIT_RESPONSE_H_
Definition: source_split_response.h:53
const StringPiece GetTypeName() const
Definition: source_split_response.h:86
void clear_bundles()
Definition: source_split_response.h:102
void clear_outcome()
Definition: source_split_response.h:135
bool has_outcome() const
Definition: source_split_response.h:128
const StringPiece get_outcome() const
Definition: source_split_response.h:143
Definition: approximate_progress.h:40
void clear_shards()
Definition: source_split_response.h:176
void set_outcome(const StringPiece &value)
Definition: source_split_response.h:160
bool has_bundles() const
Definition: source_split_response.h:95
bool has_shards() const
Definition: source_split_response.h:169
Definition: approximate_progress.cc:42