dataflow  v1b3
create_job_from_template_request.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_CREATE_JOB_FROM_TEMPLATE_REQUEST_H_
31 #define GOOGLE_DATAFLOW_API_CREATE_JOB_FROM_TEMPLATE_REQUEST_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/runtime_environment.h"
39 
40 namespace Json {
41 class Value;
42 } // namespace Json
43 
44 namespace google_dataflow_api {
45 using namespace googleapis;
46 
52 class CreateJobFromTemplateRequest : public client::JsonCppData {
53  public:
59  static CreateJobFromTemplateRequest* New();
60 
66  explicit CreateJobFromTemplateRequest(const Json::Value& storage);
67 
73  explicit CreateJobFromTemplateRequest(Json::Value* storage);
74 
79 
85  const StringPiece GetTypeName() const {
86  return StringPiece("google_dataflow_api::CreateJobFromTemplateRequest");
87  }
88 
94  bool has_environment() const {
95  return Storage().isMember("environment");
96  }
97 
102  MutableStorage()->removeMember("environment");
103  }
104 
105 
109  const RuntimeEnvironment get_environment() const;
110 
119  RuntimeEnvironment mutable_environment();
120 
126  bool has_gcs_path() const {
127  return Storage().isMember("gcsPath");
128  }
129 
133  void clear_gcs_path() {
134  MutableStorage()->removeMember("gcsPath");
135  }
136 
137 
141  const StringPiece get_gcs_path() const {
142  const Json::Value& v = Storage("gcsPath");
143  if (v == Json::Value::null) return StringPiece("");
144  return StringPiece(v.asCString());
145  }
146 
156  void set_gcs_path(const StringPiece& value) {
157  *MutableStorage("gcsPath") = value.data();
158  }
159 
165  bool has_job_name() const {
166  return Storage().isMember("jobName");
167  }
168 
172  void clear_job_name() {
173  MutableStorage()->removeMember("jobName");
174  }
175 
176 
180  const StringPiece get_job_name() const {
181  const Json::Value& v = Storage("jobName");
182  if (v == Json::Value::null) return StringPiece("");
183  return StringPiece(v.asCString());
184  }
185 
193  void set_job_name(const StringPiece& value) {
194  *MutableStorage("jobName") = value.data();
195  }
196 
202  bool has_location() const {
203  return Storage().isMember("location");
204  }
205 
209  void clear_location() {
210  MutableStorage()->removeMember("location");
211  }
212 
213 
217  const StringPiece get_location() const {
218  const Json::Value& v = Storage("location");
219  if (v == Json::Value::null) return StringPiece("");
220  return StringPiece(v.asCString());
221  }
222 
232  void set_location(const StringPiece& value) {
233  *MutableStorage("location") = value.data();
234  }
235 
241  bool has_parameters() const {
242  return Storage().isMember("parameters");
243  }
244 
249  MutableStorage()->removeMember("parameters");
250  }
251 
252 
256  const client::JsonCppAssociativeArray<string > get_parameters() const {
257  const Json::Value& storage = Storage("parameters");
258  return client::JsonValueToCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
259  }
260 
269  client::JsonCppAssociativeArray<string > mutable_parameters() {
270  Json::Value* storage = MutableStorage("parameters");
271  return client::JsonValueToMutableCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
272  }
273 
274  private:
275  void operator=(const CreateJobFromTemplateRequest&);
276 }; // CreateJobFromTemplateRequest
277 } // namespace google_dataflow_api
278 #endif // GOOGLE_DATAFLOW_API_CREATE_JOB_FROM_TEMPLATE_REQUEST_H_
bool has_environment() const
Definition: create_job_from_template_request.h:94
Definition: create_job_from_template_request.h:52
void clear_parameters()
Definition: create_job_from_template_request.h:248
void set_job_name(const StringPiece &value)
Definition: create_job_from_template_request.h:193
const client::JsonCppAssociativeArray< string > get_parameters() const
Definition: create_job_from_template_request.h:256
bool has_gcs_path() const
Definition: create_job_from_template_request.h:126
void clear_location()
Definition: create_job_from_template_request.h:209
void clear_gcs_path()
Definition: create_job_from_template_request.h:133
const StringPiece get_location() const
Definition: create_job_from_template_request.h:217
bool has_parameters() const
Definition: create_job_from_template_request.h:241
const StringPiece get_job_name() const
Definition: create_job_from_template_request.h:180
bool has_job_name() const
Definition: create_job_from_template_request.h:165
Definition: approximate_progress.h:40
Definition: runtime_environment.h:51
void clear_environment()
Definition: create_job_from_template_request.h:101
void clear_job_name()
Definition: create_job_from_template_request.h:172
const StringPiece get_gcs_path() const
Definition: create_job_from_template_request.h:141
void set_location(const StringPiece &value)
Definition: create_job_from_template_request.h:232
client::JsonCppAssociativeArray< string > mutable_parameters()
Definition: create_job_from_template_request.h:269
const StringPiece GetTypeName() const
Definition: create_job_from_template_request.h:85
void set_gcs_path(const StringPiece &value)
Definition: create_job_from_template_request.h:156
bool has_location() const
Definition: create_job_from_template_request.h:202
Definition: approximate_progress.cc:42