30 #ifndef GOOGLE_DATAFLOW_API_SOURCE_H_ 31 #define GOOGLE_DATAFLOW_API_SOURCE_H_ 33 #include "googleapis/base/macros.h" 34 #include "googleapis/client/data/jsoncpp_data.h" 35 #include "googleapis/strings/stringpiece.h" 37 #include "google/dataflow_api/source_metadata.h" 51 class Source :
public client::JsonCppData {
65 explicit Source(
const Json::Value& storage);
72 explicit Source(Json::Value* storage);
85 return StringPiece(
"google_dataflow_api::Source");
94 return Storage().isMember(
"baseSpecs");
101 MutableStorage()->removeMember(
"baseSpecs");
108 const client::JsonCppArray<client::JsonCppAssociativeArray<client::JsonCppData > >
get_base_specs()
const {
109 const Json::Value& storage = Storage(
"baseSpecs");
110 return client::JsonValueToCppValueHelper<client::JsonCppArray<client::JsonCppAssociativeArray<client::JsonCppData > > >(storage);
127 client::JsonCppArray<client::JsonCppAssociativeArray<client::JsonCppData > >
mutable_baseSpecs() {
128 Json::Value* storage = MutableStorage(
"baseSpecs");
129 return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<client::JsonCppAssociativeArray<client::JsonCppData > > >(storage);
138 return Storage().isMember(
"codec");
145 MutableStorage()->removeMember(
"codec");
152 const client::JsonCppAssociativeArray<client::JsonCppData >
get_codec()
const {
153 const Json::Value& storage = Storage(
"codec");
154 return client::JsonValueToCppValueHelper<client::JsonCppAssociativeArray<client::JsonCppData > >(storage);
165 Json::Value* storage = MutableStorage(
"codec");
166 return client::JsonValueToMutableCppValueHelper<client::JsonCppAssociativeArray<client::JsonCppData > >(storage);
175 return Storage().isMember(
"doesNotNeedSplitting");
182 MutableStorage()->removeMember(
"doesNotNeedSplitting");
190 const Json::Value& storage = Storage(
"doesNotNeedSplitting");
191 return client::JsonValueToCppValueHelper<bool >(storage);
218 client::SetJsonValueFromCppValueHelper<bool >(
219 value, MutableStorage(
"doesNotNeedSplitting"));
228 return Storage().isMember(
"metadata");
235 MutableStorage()->removeMember(
"metadata");
267 return Storage().isMember(
"spec");
274 MutableStorage()->removeMember(
"spec");
281 const client::JsonCppAssociativeArray<client::JsonCppData >
get_spec()
const {
282 const Json::Value& storage = Storage(
"spec");
283 return client::JsonValueToCppValueHelper<client::JsonCppAssociativeArray<client::JsonCppData > >(storage);
294 Json::Value* storage = MutableStorage(
"spec");
295 return client::JsonValueToMutableCppValueHelper<client::JsonCppAssociativeArray<client::JsonCppData > >(storage);
299 void operator=(
const Source&);
302 #endif // GOOGLE_DATAFLOW_API_SOURCE_H_ const client::JsonCppAssociativeArray< client::JsonCppData > get_spec() const
Definition: source.h:281
bool has_base_specs() const
Definition: source.h:93
bool has_does_not_need_splitting() const
Definition: source.h:174
void clear_metadata()
Definition: source.h:234
client::JsonCppAssociativeArray< client::JsonCppData > mutable_spec()
Definition: source.h:293
const StringPiece GetTypeName() const
Definition: source.h:84
void clear_does_not_need_splitting()
Definition: source.h:181
const client::JsonCppAssociativeArray< client::JsonCppData > get_codec() const
Definition: source.h:152
void clear_base_specs()
Definition: source.h:100
void clear_spec()
Definition: source.h:273
const client::JsonCppArray< client::JsonCppAssociativeArray< client::JsonCppData > > get_base_specs() const
Definition: source.h:108
void set_does_not_need_splitting(bool value)
Definition: source.h:217
Definition: approximate_progress.h:40
client::JsonCppArray< client::JsonCppAssociativeArray< client::JsonCppData > > mutable_baseSpecs()
Definition: source.h:127
client::JsonCppAssociativeArray< client::JsonCppData > mutable_codec()
Definition: source.h:164
void clear_codec()
Definition: source.h:144
Definition: approximate_progress.cc:42
bool has_codec() const
Definition: source.h:137
bool has_spec() const
Definition: source.h:266
bool has_metadata() const
Definition: source.h:227
bool get_does_not_need_splitting() const
Definition: source.h:189