diff --git a/gen/pb-cpp/flyteidl/plugins/dask.grpc.pb.cc b/gen/pb-cpp/flyteidl/plugins/dask.grpc.pb.cc new file mode 100644 index 000000000..c004653c9 --- /dev/null +++ b/gen/pb-cpp/flyteidl/plugins/dask.grpc.pb.cc @@ -0,0 +1,24 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: flyteidl/plugins/dask.proto + +#include "flyteidl/plugins/dask.pb.h" +#include "flyteidl/plugins/dask.grpc.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +namespace flyteidl { +namespace plugins { + +} // namespace flyteidl +} // namespace plugins + diff --git a/gen/pb-cpp/flyteidl/plugins/dask.grpc.pb.h b/gen/pb-cpp/flyteidl/plugins/dask.grpc.pb.h new file mode 100644 index 000000000..825c2c6ce --- /dev/null +++ b/gen/pb-cpp/flyteidl/plugins/dask.grpc.pb.h @@ -0,0 +1,47 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: flyteidl/plugins/dask.proto +#ifndef GRPC_flyteidl_2fplugins_2fdask_2eproto__INCLUDED +#define GRPC_flyteidl_2fplugins_2fdask_2eproto__INCLUDED + +#include "flyteidl/plugins/dask.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace grpc_impl { +class Channel; +class CompletionQueue; +class ServerCompletionQueue; +} // namespace grpc_impl + +namespace grpc { +namespace experimental { +template +class MessageAllocator; +} // namespace experimental +} // namespace grpc_impl + +namespace grpc { +class ServerContext; +} // namespace grpc + +namespace flyteidl { +namespace plugins { + +} // namespace plugins +} // namespace flyteidl + + +#endif // GRPC_flyteidl_2fplugins_2fdask_2eproto__INCLUDED diff --git a/gen/pb-cpp/flyteidl/plugins/dask.pb.cc b/gen/pb-cpp/flyteidl/plugins/dask.pb.cc new file mode 100644 index 000000000..214124211 --- /dev/null +++ b/gen/pb-cpp/flyteidl/plugins/dask.pb.cc @@ -0,0 +1,1327 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: flyteidl/plugins/dask.proto + +#include "flyteidl/plugins/dask.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fcore_2ftasks_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_Resources_flyteidl_2fcore_2ftasks_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fplugins_2fdask_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_DaskScheduler_flyteidl_2fplugins_2fdask_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fplugins_2fdask_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_DaskWorkerGroup_flyteidl_2fplugins_2fdask_2eproto; +namespace flyteidl { +namespace plugins { +class DaskJobDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed _instance; +} _DaskJob_default_instance_; +class DaskSchedulerDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed _instance; +} _DaskScheduler_default_instance_; +class DaskWorkerGroupDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed _instance; +} _DaskWorkerGroup_default_instance_; +} // namespace plugins +} // namespace flyteidl +static void InitDefaultsDaskJob_flyteidl_2fplugins_2fdask_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::flyteidl::plugins::_DaskJob_default_instance_; + new (ptr) ::flyteidl::plugins::DaskJob(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::flyteidl::plugins::DaskJob::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<2> scc_info_DaskJob_flyteidl_2fplugins_2fdask_2eproto = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsDaskJob_flyteidl_2fplugins_2fdask_2eproto}, { + &scc_info_DaskScheduler_flyteidl_2fplugins_2fdask_2eproto.base, + &scc_info_DaskWorkerGroup_flyteidl_2fplugins_2fdask_2eproto.base,}}; + +static void InitDefaultsDaskScheduler_flyteidl_2fplugins_2fdask_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::flyteidl::plugins::_DaskScheduler_default_instance_; + new (ptr) ::flyteidl::plugins::DaskScheduler(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::flyteidl::plugins::DaskScheduler::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<1> scc_info_DaskScheduler_flyteidl_2fplugins_2fdask_2eproto = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsDaskScheduler_flyteidl_2fplugins_2fdask_2eproto}, { + &scc_info_Resources_flyteidl_2fcore_2ftasks_2eproto.base,}}; + +static void InitDefaultsDaskWorkerGroup_flyteidl_2fplugins_2fdask_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::flyteidl::plugins::_DaskWorkerGroup_default_instance_; + new (ptr) ::flyteidl::plugins::DaskWorkerGroup(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::flyteidl::plugins::DaskWorkerGroup::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<1> scc_info_DaskWorkerGroup_flyteidl_2fplugins_2fdask_2eproto = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsDaskWorkerGroup_flyteidl_2fplugins_2fdask_2eproto}, { + &scc_info_Resources_flyteidl_2fcore_2ftasks_2eproto.base,}}; + +void InitDefaults_flyteidl_2fplugins_2fdask_2eproto() { + ::google::protobuf::internal::InitSCC(&scc_info_DaskJob_flyteidl_2fplugins_2fdask_2eproto.base); + ::google::protobuf::internal::InitSCC(&scc_info_DaskScheduler_flyteidl_2fplugins_2fdask_2eproto.base); + ::google::protobuf::internal::InitSCC(&scc_info_DaskWorkerGroup_flyteidl_2fplugins_2fdask_2eproto.base); +} + +::google::protobuf::Metadata file_level_metadata_flyteidl_2fplugins_2fdask_2eproto[3]; +constexpr ::google::protobuf::EnumDescriptor const** file_level_enum_descriptors_flyteidl_2fplugins_2fdask_2eproto = nullptr; +constexpr ::google::protobuf::ServiceDescriptor const** file_level_service_descriptors_flyteidl_2fplugins_2fdask_2eproto = nullptr; + +const ::google::protobuf::uint32 TableStruct_flyteidl_2fplugins_2fdask_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::DaskJob, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::DaskJob, scheduler_), + PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::DaskJob, workers_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::DaskScheduler, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::DaskScheduler, image_), + PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::DaskScheduler, resources_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::DaskWorkerGroup, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::DaskWorkerGroup, number_of_workers_), + PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::DaskWorkerGroup, image_), + PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::DaskWorkerGroup, resources_), +}; +static const ::google::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, sizeof(::flyteidl::plugins::DaskJob)}, + { 7, -1, sizeof(::flyteidl::plugins::DaskScheduler)}, + { 14, -1, sizeof(::flyteidl::plugins::DaskWorkerGroup)}, +}; + +static ::google::protobuf::Message const * const file_default_instances[] = { + reinterpret_cast(&::flyteidl::plugins::_DaskJob_default_instance_), + reinterpret_cast(&::flyteidl::plugins::_DaskScheduler_default_instance_), + reinterpret_cast(&::flyteidl::plugins::_DaskWorkerGroup_default_instance_), +}; + +::google::protobuf::internal::AssignDescriptorsTable assign_descriptors_table_flyteidl_2fplugins_2fdask_2eproto = { + {}, AddDescriptors_flyteidl_2fplugins_2fdask_2eproto, "flyteidl/plugins/dask.proto", schemas, + file_default_instances, TableStruct_flyteidl_2fplugins_2fdask_2eproto::offsets, + file_level_metadata_flyteidl_2fplugins_2fdask_2eproto, 3, file_level_enum_descriptors_flyteidl_2fplugins_2fdask_2eproto, file_level_service_descriptors_flyteidl_2fplugins_2fdask_2eproto, +}; + +const char descriptor_table_protodef_flyteidl_2fplugins_2fdask_2eproto[] = + "\n\033flyteidl/plugins/dask.proto\022\020flyteidl." + "plugins\032\031flyteidl/core/tasks.proto\"q\n\007Da" + "skJob\0222\n\tscheduler\030\001 \001(\0132\037.flyteidl.plug" + "ins.DaskScheduler\0222\n\007workers\030\002 \001(\0132!.fly" + "teidl.plugins.DaskWorkerGroup\"K\n\rDaskSch" + "eduler\022\r\n\005image\030\001 \001(\t\022+\n\tresources\030\002 \001(\013" + "2\030.flyteidl.core.Resources\"h\n\017DaskWorker" + "Group\022\031\n\021number_of_workers\030\001 \001(\r\022\r\n\005imag" + "e\030\002 \001(\t\022+\n\tresources\030\003 \001(\0132\030.flyteidl.co" + "re.ResourcesB9Z7github.com/flyteorg/flyt" + "eidl/gen/pb-go/flyteidl/pluginsb\006proto3" + ; +::google::protobuf::internal::DescriptorTable descriptor_table_flyteidl_2fplugins_2fdask_2eproto = { + false, InitDefaults_flyteidl_2fplugins_2fdask_2eproto, + descriptor_table_protodef_flyteidl_2fplugins_2fdask_2eproto, + "flyteidl/plugins/dask.proto", &assign_descriptors_table_flyteidl_2fplugins_2fdask_2eproto, 439, +}; + +void AddDescriptors_flyteidl_2fplugins_2fdask_2eproto() { + static constexpr ::google::protobuf::internal::InitFunc deps[1] = + { + ::AddDescriptors_flyteidl_2fcore_2ftasks_2eproto, + }; + ::google::protobuf::internal::AddDescriptors(&descriptor_table_flyteidl_2fplugins_2fdask_2eproto, deps, 1); +} + +// Force running AddDescriptors() at dynamic initialization time. +static bool dynamic_init_dummy_flyteidl_2fplugins_2fdask_2eproto = []() { AddDescriptors_flyteidl_2fplugins_2fdask_2eproto(); return true; }(); +namespace flyteidl { +namespace plugins { + +// =================================================================== + +void DaskJob::InitAsDefaultInstance() { + ::flyteidl::plugins::_DaskJob_default_instance_._instance.get_mutable()->scheduler_ = const_cast< ::flyteidl::plugins::DaskScheduler*>( + ::flyteidl::plugins::DaskScheduler::internal_default_instance()); + ::flyteidl::plugins::_DaskJob_default_instance_._instance.get_mutable()->workers_ = const_cast< ::flyteidl::plugins::DaskWorkerGroup*>( + ::flyteidl::plugins::DaskWorkerGroup::internal_default_instance()); +} +class DaskJob::HasBitSetters { + public: + static const ::flyteidl::plugins::DaskScheduler& scheduler(const DaskJob* msg); + static const ::flyteidl::plugins::DaskWorkerGroup& workers(const DaskJob* msg); +}; + +const ::flyteidl::plugins::DaskScheduler& +DaskJob::HasBitSetters::scheduler(const DaskJob* msg) { + return *msg->scheduler_; +} +const ::flyteidl::plugins::DaskWorkerGroup& +DaskJob::HasBitSetters::workers(const DaskJob* msg) { + return *msg->workers_; +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int DaskJob::kSchedulerFieldNumber; +const int DaskJob::kWorkersFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +DaskJob::DaskJob() + : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:flyteidl.plugins.DaskJob) +} +DaskJob::DaskJob(const DaskJob& from) + : ::google::protobuf::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from.has_scheduler()) { + scheduler_ = new ::flyteidl::plugins::DaskScheduler(*from.scheduler_); + } else { + scheduler_ = nullptr; + } + if (from.has_workers()) { + workers_ = new ::flyteidl::plugins::DaskWorkerGroup(*from.workers_); + } else { + workers_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:flyteidl.plugins.DaskJob) +} + +void DaskJob::SharedCtor() { + ::google::protobuf::internal::InitSCC( + &scc_info_DaskJob_flyteidl_2fplugins_2fdask_2eproto.base); + ::memset(&scheduler_, 0, static_cast( + reinterpret_cast(&workers_) - + reinterpret_cast(&scheduler_)) + sizeof(workers_)); +} + +DaskJob::~DaskJob() { + // @@protoc_insertion_point(destructor:flyteidl.plugins.DaskJob) + SharedDtor(); +} + +void DaskJob::SharedDtor() { + if (this != internal_default_instance()) delete scheduler_; + if (this != internal_default_instance()) delete workers_; +} + +void DaskJob::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const DaskJob& DaskJob::default_instance() { + ::google::protobuf::internal::InitSCC(&::scc_info_DaskJob_flyteidl_2fplugins_2fdask_2eproto.base); + return *internal_default_instance(); +} + + +void DaskJob::Clear() { +// @@protoc_insertion_point(message_clear_start:flyteidl.plugins.DaskJob) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaNoVirtual() == nullptr && scheduler_ != nullptr) { + delete scheduler_; + } + scheduler_ = nullptr; + if (GetArenaNoVirtual() == nullptr && workers_ != nullptr) { + delete workers_; + } + workers_ = nullptr; + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* DaskJob::_InternalParse(const char* begin, const char* end, void* object, + ::google::protobuf::internal::ParseContext* ctx) { + auto msg = static_cast(object); + ::google::protobuf::int32 size; (void)size; + int depth; (void)depth; + ::google::protobuf::uint32 tag; + ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; + auto ptr = begin; + while (ptr < end) { + ptr = ::google::protobuf::io::Parse32(ptr, &tag); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + switch (tag >> 3) { + // .flyteidl.plugins.DaskScheduler scheduler = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + parser_till_end = ::flyteidl::plugins::DaskScheduler::_InternalParse; + object = msg->mutable_scheduler(); + if (size > end - ptr) goto len_delim_till_end; + ptr += size; + GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( + {parser_till_end, object}, ptr - size, ptr)); + break; + } + // .flyteidl.plugins.DaskWorkerGroup workers = 2; + case 2: { + if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + parser_till_end = ::flyteidl::plugins::DaskWorkerGroup::_InternalParse; + object = msg->mutable_workers(); + if (size > end - ptr) goto len_delim_till_end; + ptr += size; + GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( + {parser_till_end, object}, ptr - size, ptr)); + break; + } + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->EndGroup(tag); + return ptr; + } + auto res = UnknownFieldParse(tag, {_InternalParse, msg}, + ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); + ptr = res.first; + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); + if (res.second) return ptr; + } + } // switch + } // while + return ptr; +len_delim_till_end: + return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, + {parser_till_end, object}, size); +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool DaskJob::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:flyteidl.plugins.DaskJob) + for (;;) { + ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // .flyteidl.plugins.DaskScheduler scheduler = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, mutable_scheduler())); + } else { + goto handle_unusual; + } + break; + } + + // .flyteidl.plugins.DaskWorkerGroup workers = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, mutable_workers())); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:flyteidl.plugins.DaskJob) + return true; +failure: + // @@protoc_insertion_point(parse_failure:flyteidl.plugins.DaskJob) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void DaskJob::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:flyteidl.plugins.DaskJob) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .flyteidl.plugins.DaskScheduler scheduler = 1; + if (this->has_scheduler()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, HasBitSetters::scheduler(this), output); + } + + // .flyteidl.plugins.DaskWorkerGroup workers = 2; + if (this->has_workers()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, HasBitSetters::workers(this), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:flyteidl.plugins.DaskJob) +} + +::google::protobuf::uint8* DaskJob::InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:flyteidl.plugins.DaskJob) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .flyteidl.plugins.DaskScheduler scheduler = 1; + if (this->has_scheduler()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 1, HasBitSetters::scheduler(this), target); + } + + // .flyteidl.plugins.DaskWorkerGroup workers = 2; + if (this->has_workers()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 2, HasBitSetters::workers(this), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:flyteidl.plugins.DaskJob) + return target; +} + +size_t DaskJob::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:flyteidl.plugins.DaskJob) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .flyteidl.plugins.DaskScheduler scheduler = 1; + if (this->has_scheduler()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize( + *scheduler_); + } + + // .flyteidl.plugins.DaskWorkerGroup workers = 2; + if (this->has_workers()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize( + *workers_); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void DaskJob::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:flyteidl.plugins.DaskJob) + GOOGLE_DCHECK_NE(&from, this); + const DaskJob* source = + ::google::protobuf::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:flyteidl.plugins.DaskJob) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:flyteidl.plugins.DaskJob) + MergeFrom(*source); + } +} + +void DaskJob::MergeFrom(const DaskJob& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:flyteidl.plugins.DaskJob) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.has_scheduler()) { + mutable_scheduler()->::flyteidl::plugins::DaskScheduler::MergeFrom(from.scheduler()); + } + if (from.has_workers()) { + mutable_workers()->::flyteidl::plugins::DaskWorkerGroup::MergeFrom(from.workers()); + } +} + +void DaskJob::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:flyteidl.plugins.DaskJob) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void DaskJob::CopyFrom(const DaskJob& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:flyteidl.plugins.DaskJob) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool DaskJob::IsInitialized() const { + return true; +} + +void DaskJob::Swap(DaskJob* other) { + if (other == this) return; + InternalSwap(other); +} +void DaskJob::InternalSwap(DaskJob* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(scheduler_, other->scheduler_); + swap(workers_, other->workers_); +} + +::google::protobuf::Metadata DaskJob::GetMetadata() const { + ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_flyteidl_2fplugins_2fdask_2eproto); + return ::file_level_metadata_flyteidl_2fplugins_2fdask_2eproto[kIndexInFileMessages]; +} + + +// =================================================================== + +void DaskScheduler::InitAsDefaultInstance() { + ::flyteidl::plugins::_DaskScheduler_default_instance_._instance.get_mutable()->resources_ = const_cast< ::flyteidl::core::Resources*>( + ::flyteidl::core::Resources::internal_default_instance()); +} +class DaskScheduler::HasBitSetters { + public: + static const ::flyteidl::core::Resources& resources(const DaskScheduler* msg); +}; + +const ::flyteidl::core::Resources& +DaskScheduler::HasBitSetters::resources(const DaskScheduler* msg) { + return *msg->resources_; +} +void DaskScheduler::clear_resources() { + if (GetArenaNoVirtual() == nullptr && resources_ != nullptr) { + delete resources_; + } + resources_ = nullptr; +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int DaskScheduler::kImageFieldNumber; +const int DaskScheduler::kResourcesFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +DaskScheduler::DaskScheduler() + : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:flyteidl.plugins.DaskScheduler) +} +DaskScheduler::DaskScheduler(const DaskScheduler& from) + : ::google::protobuf::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + image_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.image().size() > 0) { + image_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.image_); + } + if (from.has_resources()) { + resources_ = new ::flyteidl::core::Resources(*from.resources_); + } else { + resources_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:flyteidl.plugins.DaskScheduler) +} + +void DaskScheduler::SharedCtor() { + ::google::protobuf::internal::InitSCC( + &scc_info_DaskScheduler_flyteidl_2fplugins_2fdask_2eproto.base); + image_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + resources_ = nullptr; +} + +DaskScheduler::~DaskScheduler() { + // @@protoc_insertion_point(destructor:flyteidl.plugins.DaskScheduler) + SharedDtor(); +} + +void DaskScheduler::SharedDtor() { + image_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) delete resources_; +} + +void DaskScheduler::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const DaskScheduler& DaskScheduler::default_instance() { + ::google::protobuf::internal::InitSCC(&::scc_info_DaskScheduler_flyteidl_2fplugins_2fdask_2eproto.base); + return *internal_default_instance(); +} + + +void DaskScheduler::Clear() { +// @@protoc_insertion_point(message_clear_start:flyteidl.plugins.DaskScheduler) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + image_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (GetArenaNoVirtual() == nullptr && resources_ != nullptr) { + delete resources_; + } + resources_ = nullptr; + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* DaskScheduler::_InternalParse(const char* begin, const char* end, void* object, + ::google::protobuf::internal::ParseContext* ctx) { + auto msg = static_cast(object); + ::google::protobuf::int32 size; (void)size; + int depth; (void)depth; + ::google::protobuf::uint32 tag; + ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; + auto ptr = begin; + while (ptr < end) { + ptr = ::google::protobuf::io::Parse32(ptr, &tag); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + switch (tag >> 3) { + // string image = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + ctx->extra_parse_data().SetFieldName("flyteidl.plugins.DaskScheduler.image"); + object = msg->mutable_image(); + if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { + parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; + goto string_till_end; + } + GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); + ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); + ptr += size; + break; + } + // .flyteidl.core.Resources resources = 2; + case 2: { + if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + parser_till_end = ::flyteidl::core::Resources::_InternalParse; + object = msg->mutable_resources(); + if (size > end - ptr) goto len_delim_till_end; + ptr += size; + GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( + {parser_till_end, object}, ptr - size, ptr)); + break; + } + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->EndGroup(tag); + return ptr; + } + auto res = UnknownFieldParse(tag, {_InternalParse, msg}, + ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); + ptr = res.first; + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); + if (res.second) return ptr; + } + } // switch + } // while + return ptr; +string_till_end: + static_cast<::std::string*>(object)->clear(); + static_cast<::std::string*>(object)->reserve(size); + goto len_delim_till_end; +len_delim_till_end: + return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, + {parser_till_end, object}, size); +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool DaskScheduler::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:flyteidl.plugins.DaskScheduler) + for (;;) { + ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // string image = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_image())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->image().data(), static_cast(this->image().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "flyteidl.plugins.DaskScheduler.image")); + } else { + goto handle_unusual; + } + break; + } + + // .flyteidl.core.Resources resources = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, mutable_resources())); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:flyteidl.plugins.DaskScheduler) + return true; +failure: + // @@protoc_insertion_point(parse_failure:flyteidl.plugins.DaskScheduler) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void DaskScheduler::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:flyteidl.plugins.DaskScheduler) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string image = 1; + if (this->image().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->image().data(), static_cast(this->image().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "flyteidl.plugins.DaskScheduler.image"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->image(), output); + } + + // .flyteidl.core.Resources resources = 2; + if (this->has_resources()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, HasBitSetters::resources(this), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:flyteidl.plugins.DaskScheduler) +} + +::google::protobuf::uint8* DaskScheduler::InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:flyteidl.plugins.DaskScheduler) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string image = 1; + if (this->image().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->image().data(), static_cast(this->image().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "flyteidl.plugins.DaskScheduler.image"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->image(), target); + } + + // .flyteidl.core.Resources resources = 2; + if (this->has_resources()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 2, HasBitSetters::resources(this), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:flyteidl.plugins.DaskScheduler) + return target; +} + +size_t DaskScheduler::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:flyteidl.plugins.DaskScheduler) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string image = 1; + if (this->image().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->image()); + } + + // .flyteidl.core.Resources resources = 2; + if (this->has_resources()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize( + *resources_); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void DaskScheduler::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:flyteidl.plugins.DaskScheduler) + GOOGLE_DCHECK_NE(&from, this); + const DaskScheduler* source = + ::google::protobuf::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:flyteidl.plugins.DaskScheduler) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:flyteidl.plugins.DaskScheduler) + MergeFrom(*source); + } +} + +void DaskScheduler::MergeFrom(const DaskScheduler& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:flyteidl.plugins.DaskScheduler) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.image().size() > 0) { + + image_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.image_); + } + if (from.has_resources()) { + mutable_resources()->::flyteidl::core::Resources::MergeFrom(from.resources()); + } +} + +void DaskScheduler::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:flyteidl.plugins.DaskScheduler) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void DaskScheduler::CopyFrom(const DaskScheduler& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:flyteidl.plugins.DaskScheduler) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool DaskScheduler::IsInitialized() const { + return true; +} + +void DaskScheduler::Swap(DaskScheduler* other) { + if (other == this) return; + InternalSwap(other); +} +void DaskScheduler::InternalSwap(DaskScheduler* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + image_.Swap(&other->image_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(resources_, other->resources_); +} + +::google::protobuf::Metadata DaskScheduler::GetMetadata() const { + ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_flyteidl_2fplugins_2fdask_2eproto); + return ::file_level_metadata_flyteidl_2fplugins_2fdask_2eproto[kIndexInFileMessages]; +} + + +// =================================================================== + +void DaskWorkerGroup::InitAsDefaultInstance() { + ::flyteidl::plugins::_DaskWorkerGroup_default_instance_._instance.get_mutable()->resources_ = const_cast< ::flyteidl::core::Resources*>( + ::flyteidl::core::Resources::internal_default_instance()); +} +class DaskWorkerGroup::HasBitSetters { + public: + static const ::flyteidl::core::Resources& resources(const DaskWorkerGroup* msg); +}; + +const ::flyteidl::core::Resources& +DaskWorkerGroup::HasBitSetters::resources(const DaskWorkerGroup* msg) { + return *msg->resources_; +} +void DaskWorkerGroup::clear_resources() { + if (GetArenaNoVirtual() == nullptr && resources_ != nullptr) { + delete resources_; + } + resources_ = nullptr; +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int DaskWorkerGroup::kNumberOfWorkersFieldNumber; +const int DaskWorkerGroup::kImageFieldNumber; +const int DaskWorkerGroup::kResourcesFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +DaskWorkerGroup::DaskWorkerGroup() + : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:flyteidl.plugins.DaskWorkerGroup) +} +DaskWorkerGroup::DaskWorkerGroup(const DaskWorkerGroup& from) + : ::google::protobuf::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + image_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.image().size() > 0) { + image_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.image_); + } + if (from.has_resources()) { + resources_ = new ::flyteidl::core::Resources(*from.resources_); + } else { + resources_ = nullptr; + } + number_of_workers_ = from.number_of_workers_; + // @@protoc_insertion_point(copy_constructor:flyteidl.plugins.DaskWorkerGroup) +} + +void DaskWorkerGroup::SharedCtor() { + ::google::protobuf::internal::InitSCC( + &scc_info_DaskWorkerGroup_flyteidl_2fplugins_2fdask_2eproto.base); + image_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::memset(&resources_, 0, static_cast( + reinterpret_cast(&number_of_workers_) - + reinterpret_cast(&resources_)) + sizeof(number_of_workers_)); +} + +DaskWorkerGroup::~DaskWorkerGroup() { + // @@protoc_insertion_point(destructor:flyteidl.plugins.DaskWorkerGroup) + SharedDtor(); +} + +void DaskWorkerGroup::SharedDtor() { + image_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) delete resources_; +} + +void DaskWorkerGroup::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const DaskWorkerGroup& DaskWorkerGroup::default_instance() { + ::google::protobuf::internal::InitSCC(&::scc_info_DaskWorkerGroup_flyteidl_2fplugins_2fdask_2eproto.base); + return *internal_default_instance(); +} + + +void DaskWorkerGroup::Clear() { +// @@protoc_insertion_point(message_clear_start:flyteidl.plugins.DaskWorkerGroup) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + image_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (GetArenaNoVirtual() == nullptr && resources_ != nullptr) { + delete resources_; + } + resources_ = nullptr; + number_of_workers_ = 0u; + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* DaskWorkerGroup::_InternalParse(const char* begin, const char* end, void* object, + ::google::protobuf::internal::ParseContext* ctx) { + auto msg = static_cast(object); + ::google::protobuf::int32 size; (void)size; + int depth; (void)depth; + ::google::protobuf::uint32 tag; + ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; + auto ptr = begin; + while (ptr < end) { + ptr = ::google::protobuf::io::Parse32(ptr, &tag); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + switch (tag >> 3) { + // uint32 number_of_workers = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual; + msg->set_number_of_workers(::google::protobuf::internal::ReadVarint(&ptr)); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + break; + } + // string image = 2; + case 2: { + if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + ctx->extra_parse_data().SetFieldName("flyteidl.plugins.DaskWorkerGroup.image"); + object = msg->mutable_image(); + if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { + parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; + goto string_till_end; + } + GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); + ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); + ptr += size; + break; + } + // .flyteidl.core.Resources resources = 3; + case 3: { + if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual; + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + parser_till_end = ::flyteidl::core::Resources::_InternalParse; + object = msg->mutable_resources(); + if (size > end - ptr) goto len_delim_till_end; + ptr += size; + GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( + {parser_till_end, object}, ptr - size, ptr)); + break; + } + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->EndGroup(tag); + return ptr; + } + auto res = UnknownFieldParse(tag, {_InternalParse, msg}, + ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); + ptr = res.first; + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); + if (res.second) return ptr; + } + } // switch + } // while + return ptr; +string_till_end: + static_cast<::std::string*>(object)->clear(); + static_cast<::std::string*>(object)->reserve(size); + goto len_delim_till_end; +len_delim_till_end: + return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, + {parser_till_end, object}, size); +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool DaskWorkerGroup::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:flyteidl.plugins.DaskWorkerGroup) + for (;;) { + ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // uint32 number_of_workers = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) { + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &number_of_workers_))); + } else { + goto handle_unusual; + } + break; + } + + // string image = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_image())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->image().data(), static_cast(this->image().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "flyteidl.plugins.DaskWorkerGroup.image")); + } else { + goto handle_unusual; + } + break; + } + + // .flyteidl.core.Resources resources = 3; + case 3: { + if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, mutable_resources())); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:flyteidl.plugins.DaskWorkerGroup) + return true; +failure: + // @@protoc_insertion_point(parse_failure:flyteidl.plugins.DaskWorkerGroup) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void DaskWorkerGroup::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:flyteidl.plugins.DaskWorkerGroup) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // uint32 number_of_workers = 1; + if (this->number_of_workers() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->number_of_workers(), output); + } + + // string image = 2; + if (this->image().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->image().data(), static_cast(this->image().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "flyteidl.plugins.DaskWorkerGroup.image"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->image(), output); + } + + // .flyteidl.core.Resources resources = 3; + if (this->has_resources()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 3, HasBitSetters::resources(this), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:flyteidl.plugins.DaskWorkerGroup) +} + +::google::protobuf::uint8* DaskWorkerGroup::InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:flyteidl.plugins.DaskWorkerGroup) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // uint32 number_of_workers = 1; + if (this->number_of_workers() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->number_of_workers(), target); + } + + // string image = 2; + if (this->image().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->image().data(), static_cast(this->image().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "flyteidl.plugins.DaskWorkerGroup.image"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->image(), target); + } + + // .flyteidl.core.Resources resources = 3; + if (this->has_resources()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 3, HasBitSetters::resources(this), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:flyteidl.plugins.DaskWorkerGroup) + return target; +} + +size_t DaskWorkerGroup::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:flyteidl.plugins.DaskWorkerGroup) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string image = 2; + if (this->image().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->image()); + } + + // .flyteidl.core.Resources resources = 3; + if (this->has_resources()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize( + *resources_); + } + + // uint32 number_of_workers = 1; + if (this->number_of_workers() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->number_of_workers()); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void DaskWorkerGroup::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:flyteidl.plugins.DaskWorkerGroup) + GOOGLE_DCHECK_NE(&from, this); + const DaskWorkerGroup* source = + ::google::protobuf::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:flyteidl.plugins.DaskWorkerGroup) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:flyteidl.plugins.DaskWorkerGroup) + MergeFrom(*source); + } +} + +void DaskWorkerGroup::MergeFrom(const DaskWorkerGroup& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:flyteidl.plugins.DaskWorkerGroup) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.image().size() > 0) { + + image_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.image_); + } + if (from.has_resources()) { + mutable_resources()->::flyteidl::core::Resources::MergeFrom(from.resources()); + } + if (from.number_of_workers() != 0) { + set_number_of_workers(from.number_of_workers()); + } +} + +void DaskWorkerGroup::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:flyteidl.plugins.DaskWorkerGroup) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void DaskWorkerGroup::CopyFrom(const DaskWorkerGroup& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:flyteidl.plugins.DaskWorkerGroup) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool DaskWorkerGroup::IsInitialized() const { + return true; +} + +void DaskWorkerGroup::Swap(DaskWorkerGroup* other) { + if (other == this) return; + InternalSwap(other); +} +void DaskWorkerGroup::InternalSwap(DaskWorkerGroup* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + image_.Swap(&other->image_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(resources_, other->resources_); + swap(number_of_workers_, other->number_of_workers_); +} + +::google::protobuf::Metadata DaskWorkerGroup::GetMetadata() const { + ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_flyteidl_2fplugins_2fdask_2eproto); + return ::file_level_metadata_flyteidl_2fplugins_2fdask_2eproto[kIndexInFileMessages]; +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace plugins +} // namespace flyteidl +namespace google { +namespace protobuf { +template<> PROTOBUF_NOINLINE ::flyteidl::plugins::DaskJob* Arena::CreateMaybeMessage< ::flyteidl::plugins::DaskJob >(Arena* arena) { + return Arena::CreateInternal< ::flyteidl::plugins::DaskJob >(arena); +} +template<> PROTOBUF_NOINLINE ::flyteidl::plugins::DaskScheduler* Arena::CreateMaybeMessage< ::flyteidl::plugins::DaskScheduler >(Arena* arena) { + return Arena::CreateInternal< ::flyteidl::plugins::DaskScheduler >(arena); +} +template<> PROTOBUF_NOINLINE ::flyteidl::plugins::DaskWorkerGroup* Arena::CreateMaybeMessage< ::flyteidl::plugins::DaskWorkerGroup >(Arena* arena) { + return Arena::CreateInternal< ::flyteidl::plugins::DaskWorkerGroup >(arena); +} +} // namespace protobuf +} // namespace google + +// @@protoc_insertion_point(global_scope) +#include diff --git a/gen/pb-cpp/flyteidl/plugins/dask.pb.h b/gen/pb-cpp/flyteidl/plugins/dask.pb.h new file mode 100644 index 000000000..e1371fc2a --- /dev/null +++ b/gen/pb-cpp/flyteidl/plugins/dask.pb.h @@ -0,0 +1,814 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: flyteidl/plugins/dask.proto + +#ifndef PROTOBUF_INCLUDED_flyteidl_2fplugins_2fdask_2eproto +#define PROTOBUF_INCLUDED_flyteidl_2fplugins_2fdask_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3007000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3007000 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include "flyteidl/core/tasks.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_flyteidl_2fplugins_2fdask_2eproto + +// Internal implementation detail -- do not use these members. +struct TableStruct_flyteidl_2fplugins_2fdask_2eproto { + static const ::google::protobuf::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::google::protobuf::internal::AuxillaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::google::protobuf::internal::ParseTable schema[3] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::google::protobuf::internal::FieldMetadata field_metadata[]; + static const ::google::protobuf::internal::SerializationTable serialization_table[]; + static const ::google::protobuf::uint32 offsets[]; +}; +void AddDescriptors_flyteidl_2fplugins_2fdask_2eproto(); +namespace flyteidl { +namespace plugins { +class DaskJob; +class DaskJobDefaultTypeInternal; +extern DaskJobDefaultTypeInternal _DaskJob_default_instance_; +class DaskScheduler; +class DaskSchedulerDefaultTypeInternal; +extern DaskSchedulerDefaultTypeInternal _DaskScheduler_default_instance_; +class DaskWorkerGroup; +class DaskWorkerGroupDefaultTypeInternal; +extern DaskWorkerGroupDefaultTypeInternal _DaskWorkerGroup_default_instance_; +} // namespace plugins +} // namespace flyteidl +namespace google { +namespace protobuf { +template<> ::flyteidl::plugins::DaskJob* Arena::CreateMaybeMessage<::flyteidl::plugins::DaskJob>(Arena*); +template<> ::flyteidl::plugins::DaskScheduler* Arena::CreateMaybeMessage<::flyteidl::plugins::DaskScheduler>(Arena*); +template<> ::flyteidl::plugins::DaskWorkerGroup* Arena::CreateMaybeMessage<::flyteidl::plugins::DaskWorkerGroup>(Arena*); +} // namespace protobuf +} // namespace google +namespace flyteidl { +namespace plugins { + +// =================================================================== + +class DaskJob final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:flyteidl.plugins.DaskJob) */ { + public: + DaskJob(); + virtual ~DaskJob(); + + DaskJob(const DaskJob& from); + + inline DaskJob& operator=(const DaskJob& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + DaskJob(DaskJob&& from) noexcept + : DaskJob() { + *this = ::std::move(from); + } + + inline DaskJob& operator=(DaskJob&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor() { + return default_instance().GetDescriptor(); + } + static const DaskJob& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const DaskJob* internal_default_instance() { + return reinterpret_cast( + &_DaskJob_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + void Swap(DaskJob* other); + friend void swap(DaskJob& a, DaskJob& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline DaskJob* New() const final { + return CreateMaybeMessage(nullptr); + } + + DaskJob* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const DaskJob& from); + void MergeFrom(const DaskJob& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); + ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + #else + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) final; + #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const final; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(DaskJob* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // .flyteidl.plugins.DaskScheduler scheduler = 1; + bool has_scheduler() const; + void clear_scheduler(); + static const int kSchedulerFieldNumber = 1; + const ::flyteidl::plugins::DaskScheduler& scheduler() const; + ::flyteidl::plugins::DaskScheduler* release_scheduler(); + ::flyteidl::plugins::DaskScheduler* mutable_scheduler(); + void set_allocated_scheduler(::flyteidl::plugins::DaskScheduler* scheduler); + + // .flyteidl.plugins.DaskWorkerGroup workers = 2; + bool has_workers() const; + void clear_workers(); + static const int kWorkersFieldNumber = 2; + const ::flyteidl::plugins::DaskWorkerGroup& workers() const; + ::flyteidl::plugins::DaskWorkerGroup* release_workers(); + ::flyteidl::plugins::DaskWorkerGroup* mutable_workers(); + void set_allocated_workers(::flyteidl::plugins::DaskWorkerGroup* workers); + + // @@protoc_insertion_point(class_scope:flyteidl.plugins.DaskJob) + private: + class HasBitSetters; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::flyteidl::plugins::DaskScheduler* scheduler_; + ::flyteidl::plugins::DaskWorkerGroup* workers_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::TableStruct_flyteidl_2fplugins_2fdask_2eproto; +}; +// ------------------------------------------------------------------- + +class DaskScheduler final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:flyteidl.plugins.DaskScheduler) */ { + public: + DaskScheduler(); + virtual ~DaskScheduler(); + + DaskScheduler(const DaskScheduler& from); + + inline DaskScheduler& operator=(const DaskScheduler& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + DaskScheduler(DaskScheduler&& from) noexcept + : DaskScheduler() { + *this = ::std::move(from); + } + + inline DaskScheduler& operator=(DaskScheduler&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor() { + return default_instance().GetDescriptor(); + } + static const DaskScheduler& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const DaskScheduler* internal_default_instance() { + return reinterpret_cast( + &_DaskScheduler_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + void Swap(DaskScheduler* other); + friend void swap(DaskScheduler& a, DaskScheduler& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline DaskScheduler* New() const final { + return CreateMaybeMessage(nullptr); + } + + DaskScheduler* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const DaskScheduler& from); + void MergeFrom(const DaskScheduler& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); + ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + #else + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) final; + #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const final; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(DaskScheduler* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // string image = 1; + void clear_image(); + static const int kImageFieldNumber = 1; + const ::std::string& image() const; + void set_image(const ::std::string& value); + #if LANG_CXX11 + void set_image(::std::string&& value); + #endif + void set_image(const char* value); + void set_image(const char* value, size_t size); + ::std::string* mutable_image(); + ::std::string* release_image(); + void set_allocated_image(::std::string* image); + + // .flyteidl.core.Resources resources = 2; + bool has_resources() const; + void clear_resources(); + static const int kResourcesFieldNumber = 2; + const ::flyteidl::core::Resources& resources() const; + ::flyteidl::core::Resources* release_resources(); + ::flyteidl::core::Resources* mutable_resources(); + void set_allocated_resources(::flyteidl::core::Resources* resources); + + // @@protoc_insertion_point(class_scope:flyteidl.plugins.DaskScheduler) + private: + class HasBitSetters; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::ArenaStringPtr image_; + ::flyteidl::core::Resources* resources_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::TableStruct_flyteidl_2fplugins_2fdask_2eproto; +}; +// ------------------------------------------------------------------- + +class DaskWorkerGroup final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:flyteidl.plugins.DaskWorkerGroup) */ { + public: + DaskWorkerGroup(); + virtual ~DaskWorkerGroup(); + + DaskWorkerGroup(const DaskWorkerGroup& from); + + inline DaskWorkerGroup& operator=(const DaskWorkerGroup& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + DaskWorkerGroup(DaskWorkerGroup&& from) noexcept + : DaskWorkerGroup() { + *this = ::std::move(from); + } + + inline DaskWorkerGroup& operator=(DaskWorkerGroup&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor() { + return default_instance().GetDescriptor(); + } + static const DaskWorkerGroup& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const DaskWorkerGroup* internal_default_instance() { + return reinterpret_cast( + &_DaskWorkerGroup_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + void Swap(DaskWorkerGroup* other); + friend void swap(DaskWorkerGroup& a, DaskWorkerGroup& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline DaskWorkerGroup* New() const final { + return CreateMaybeMessage(nullptr); + } + + DaskWorkerGroup* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const DaskWorkerGroup& from); + void MergeFrom(const DaskWorkerGroup& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); + ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + #else + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) final; + #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const final; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(DaskWorkerGroup* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // string image = 2; + void clear_image(); + static const int kImageFieldNumber = 2; + const ::std::string& image() const; + void set_image(const ::std::string& value); + #if LANG_CXX11 + void set_image(::std::string&& value); + #endif + void set_image(const char* value); + void set_image(const char* value, size_t size); + ::std::string* mutable_image(); + ::std::string* release_image(); + void set_allocated_image(::std::string* image); + + // .flyteidl.core.Resources resources = 3; + bool has_resources() const; + void clear_resources(); + static const int kResourcesFieldNumber = 3; + const ::flyteidl::core::Resources& resources() const; + ::flyteidl::core::Resources* release_resources(); + ::flyteidl::core::Resources* mutable_resources(); + void set_allocated_resources(::flyteidl::core::Resources* resources); + + // uint32 number_of_workers = 1; + void clear_number_of_workers(); + static const int kNumberOfWorkersFieldNumber = 1; + ::google::protobuf::uint32 number_of_workers() const; + void set_number_of_workers(::google::protobuf::uint32 value); + + // @@protoc_insertion_point(class_scope:flyteidl.plugins.DaskWorkerGroup) + private: + class HasBitSetters; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::ArenaStringPtr image_; + ::flyteidl::core::Resources* resources_; + ::google::protobuf::uint32 number_of_workers_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::TableStruct_flyteidl_2fplugins_2fdask_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// DaskJob + +// .flyteidl.plugins.DaskScheduler scheduler = 1; +inline bool DaskJob::has_scheduler() const { + return this != internal_default_instance() && scheduler_ != nullptr; +} +inline void DaskJob::clear_scheduler() { + if (GetArenaNoVirtual() == nullptr && scheduler_ != nullptr) { + delete scheduler_; + } + scheduler_ = nullptr; +} +inline const ::flyteidl::plugins::DaskScheduler& DaskJob::scheduler() const { + const ::flyteidl::plugins::DaskScheduler* p = scheduler_; + // @@protoc_insertion_point(field_get:flyteidl.plugins.DaskJob.scheduler) + return p != nullptr ? *p : *reinterpret_cast( + &::flyteidl::plugins::_DaskScheduler_default_instance_); +} +inline ::flyteidl::plugins::DaskScheduler* DaskJob::release_scheduler() { + // @@protoc_insertion_point(field_release:flyteidl.plugins.DaskJob.scheduler) + + ::flyteidl::plugins::DaskScheduler* temp = scheduler_; + scheduler_ = nullptr; + return temp; +} +inline ::flyteidl::plugins::DaskScheduler* DaskJob::mutable_scheduler() { + + if (scheduler_ == nullptr) { + auto* p = CreateMaybeMessage<::flyteidl::plugins::DaskScheduler>(GetArenaNoVirtual()); + scheduler_ = p; + } + // @@protoc_insertion_point(field_mutable:flyteidl.plugins.DaskJob.scheduler) + return scheduler_; +} +inline void DaskJob::set_allocated_scheduler(::flyteidl::plugins::DaskScheduler* scheduler) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == nullptr) { + delete scheduler_; + } + if (scheduler) { + ::google::protobuf::Arena* submessage_arena = nullptr; + if (message_arena != submessage_arena) { + scheduler = ::google::protobuf::internal::GetOwnedMessage( + message_arena, scheduler, submessage_arena); + } + + } else { + + } + scheduler_ = scheduler; + // @@protoc_insertion_point(field_set_allocated:flyteidl.plugins.DaskJob.scheduler) +} + +// .flyteidl.plugins.DaskWorkerGroup workers = 2; +inline bool DaskJob::has_workers() const { + return this != internal_default_instance() && workers_ != nullptr; +} +inline void DaskJob::clear_workers() { + if (GetArenaNoVirtual() == nullptr && workers_ != nullptr) { + delete workers_; + } + workers_ = nullptr; +} +inline const ::flyteidl::plugins::DaskWorkerGroup& DaskJob::workers() const { + const ::flyteidl::plugins::DaskWorkerGroup* p = workers_; + // @@protoc_insertion_point(field_get:flyteidl.plugins.DaskJob.workers) + return p != nullptr ? *p : *reinterpret_cast( + &::flyteidl::plugins::_DaskWorkerGroup_default_instance_); +} +inline ::flyteidl::plugins::DaskWorkerGroup* DaskJob::release_workers() { + // @@protoc_insertion_point(field_release:flyteidl.plugins.DaskJob.workers) + + ::flyteidl::plugins::DaskWorkerGroup* temp = workers_; + workers_ = nullptr; + return temp; +} +inline ::flyteidl::plugins::DaskWorkerGroup* DaskJob::mutable_workers() { + + if (workers_ == nullptr) { + auto* p = CreateMaybeMessage<::flyteidl::plugins::DaskWorkerGroup>(GetArenaNoVirtual()); + workers_ = p; + } + // @@protoc_insertion_point(field_mutable:flyteidl.plugins.DaskJob.workers) + return workers_; +} +inline void DaskJob::set_allocated_workers(::flyteidl::plugins::DaskWorkerGroup* workers) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == nullptr) { + delete workers_; + } + if (workers) { + ::google::protobuf::Arena* submessage_arena = nullptr; + if (message_arena != submessage_arena) { + workers = ::google::protobuf::internal::GetOwnedMessage( + message_arena, workers, submessage_arena); + } + + } else { + + } + workers_ = workers; + // @@protoc_insertion_point(field_set_allocated:flyteidl.plugins.DaskJob.workers) +} + +// ------------------------------------------------------------------- + +// DaskScheduler + +// string image = 1; +inline void DaskScheduler::clear_image() { + image_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& DaskScheduler::image() const { + // @@protoc_insertion_point(field_get:flyteidl.plugins.DaskScheduler.image) + return image_.GetNoArena(); +} +inline void DaskScheduler::set_image(const ::std::string& value) { + + image_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:flyteidl.plugins.DaskScheduler.image) +} +#if LANG_CXX11 +inline void DaskScheduler::set_image(::std::string&& value) { + + image_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:flyteidl.plugins.DaskScheduler.image) +} +#endif +inline void DaskScheduler::set_image(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + image_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:flyteidl.plugins.DaskScheduler.image) +} +inline void DaskScheduler::set_image(const char* value, size_t size) { + + image_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:flyteidl.plugins.DaskScheduler.image) +} +inline ::std::string* DaskScheduler::mutable_image() { + + // @@protoc_insertion_point(field_mutable:flyteidl.plugins.DaskScheduler.image) + return image_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* DaskScheduler::release_image() { + // @@protoc_insertion_point(field_release:flyteidl.plugins.DaskScheduler.image) + + return image_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void DaskScheduler::set_allocated_image(::std::string* image) { + if (image != nullptr) { + + } else { + + } + image_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), image); + // @@protoc_insertion_point(field_set_allocated:flyteidl.plugins.DaskScheduler.image) +} + +// .flyteidl.core.Resources resources = 2; +inline bool DaskScheduler::has_resources() const { + return this != internal_default_instance() && resources_ != nullptr; +} +inline const ::flyteidl::core::Resources& DaskScheduler::resources() const { + const ::flyteidl::core::Resources* p = resources_; + // @@protoc_insertion_point(field_get:flyteidl.plugins.DaskScheduler.resources) + return p != nullptr ? *p : *reinterpret_cast( + &::flyteidl::core::_Resources_default_instance_); +} +inline ::flyteidl::core::Resources* DaskScheduler::release_resources() { + // @@protoc_insertion_point(field_release:flyteidl.plugins.DaskScheduler.resources) + + ::flyteidl::core::Resources* temp = resources_; + resources_ = nullptr; + return temp; +} +inline ::flyteidl::core::Resources* DaskScheduler::mutable_resources() { + + if (resources_ == nullptr) { + auto* p = CreateMaybeMessage<::flyteidl::core::Resources>(GetArenaNoVirtual()); + resources_ = p; + } + // @@protoc_insertion_point(field_mutable:flyteidl.plugins.DaskScheduler.resources) + return resources_; +} +inline void DaskScheduler::set_allocated_resources(::flyteidl::core::Resources* resources) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::google::protobuf::MessageLite*>(resources_); + } + if (resources) { + ::google::protobuf::Arena* submessage_arena = nullptr; + if (message_arena != submessage_arena) { + resources = ::google::protobuf::internal::GetOwnedMessage( + message_arena, resources, submessage_arena); + } + + } else { + + } + resources_ = resources; + // @@protoc_insertion_point(field_set_allocated:flyteidl.plugins.DaskScheduler.resources) +} + +// ------------------------------------------------------------------- + +// DaskWorkerGroup + +// uint32 number_of_workers = 1; +inline void DaskWorkerGroup::clear_number_of_workers() { + number_of_workers_ = 0u; +} +inline ::google::protobuf::uint32 DaskWorkerGroup::number_of_workers() const { + // @@protoc_insertion_point(field_get:flyteidl.plugins.DaskWorkerGroup.number_of_workers) + return number_of_workers_; +} +inline void DaskWorkerGroup::set_number_of_workers(::google::protobuf::uint32 value) { + + number_of_workers_ = value; + // @@protoc_insertion_point(field_set:flyteidl.plugins.DaskWorkerGroup.number_of_workers) +} + +// string image = 2; +inline void DaskWorkerGroup::clear_image() { + image_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& DaskWorkerGroup::image() const { + // @@protoc_insertion_point(field_get:flyteidl.plugins.DaskWorkerGroup.image) + return image_.GetNoArena(); +} +inline void DaskWorkerGroup::set_image(const ::std::string& value) { + + image_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:flyteidl.plugins.DaskWorkerGroup.image) +} +#if LANG_CXX11 +inline void DaskWorkerGroup::set_image(::std::string&& value) { + + image_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:flyteidl.plugins.DaskWorkerGroup.image) +} +#endif +inline void DaskWorkerGroup::set_image(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + image_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:flyteidl.plugins.DaskWorkerGroup.image) +} +inline void DaskWorkerGroup::set_image(const char* value, size_t size) { + + image_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:flyteidl.plugins.DaskWorkerGroup.image) +} +inline ::std::string* DaskWorkerGroup::mutable_image() { + + // @@protoc_insertion_point(field_mutable:flyteidl.plugins.DaskWorkerGroup.image) + return image_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* DaskWorkerGroup::release_image() { + // @@protoc_insertion_point(field_release:flyteidl.plugins.DaskWorkerGroup.image) + + return image_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void DaskWorkerGroup::set_allocated_image(::std::string* image) { + if (image != nullptr) { + + } else { + + } + image_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), image); + // @@protoc_insertion_point(field_set_allocated:flyteidl.plugins.DaskWorkerGroup.image) +} + +// .flyteidl.core.Resources resources = 3; +inline bool DaskWorkerGroup::has_resources() const { + return this != internal_default_instance() && resources_ != nullptr; +} +inline const ::flyteidl::core::Resources& DaskWorkerGroup::resources() const { + const ::flyteidl::core::Resources* p = resources_; + // @@protoc_insertion_point(field_get:flyteidl.plugins.DaskWorkerGroup.resources) + return p != nullptr ? *p : *reinterpret_cast( + &::flyteidl::core::_Resources_default_instance_); +} +inline ::flyteidl::core::Resources* DaskWorkerGroup::release_resources() { + // @@protoc_insertion_point(field_release:flyteidl.plugins.DaskWorkerGroup.resources) + + ::flyteidl::core::Resources* temp = resources_; + resources_ = nullptr; + return temp; +} +inline ::flyteidl::core::Resources* DaskWorkerGroup::mutable_resources() { + + if (resources_ == nullptr) { + auto* p = CreateMaybeMessage<::flyteidl::core::Resources>(GetArenaNoVirtual()); + resources_ = p; + } + // @@protoc_insertion_point(field_mutable:flyteidl.plugins.DaskWorkerGroup.resources) + return resources_; +} +inline void DaskWorkerGroup::set_allocated_resources(::flyteidl::core::Resources* resources) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::google::protobuf::MessageLite*>(resources_); + } + if (resources) { + ::google::protobuf::Arena* submessage_arena = nullptr; + if (message_arena != submessage_arena) { + resources = ::google::protobuf::internal::GetOwnedMessage( + message_arena, resources, submessage_arena); + } + + } else { + + } + resources_ = resources; + // @@protoc_insertion_point(field_set_allocated:flyteidl.plugins.DaskWorkerGroup.resources) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace plugins +} // namespace flyteidl + +// @@protoc_insertion_point(global_scope) + +#include +#endif // PROTOBUF_INCLUDED_flyteidl_2fplugins_2fdask_2eproto diff --git a/gen/pb-go/flyteidl/plugins/dask.pb.go b/gen/pb-go/flyteidl/plugins/dask.pb.go new file mode 100644 index 000000000..427630790 --- /dev/null +++ b/gen/pb-go/flyteidl/plugins/dask.pb.go @@ -0,0 +1,214 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: flyteidl/plugins/dask.proto + +package plugins + +import ( + fmt "fmt" + core "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + proto "github.com/golang/protobuf/proto" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +// Custom Proto for Dask Plugin. +type DaskJob struct { + // Spec for the scheduler pod. + Scheduler *DaskScheduler `protobuf:"bytes,1,opt,name=scheduler,proto3" json:"scheduler,omitempty"` + // Spec of the default worker group. + Workers *DaskWorkerGroup `protobuf:"bytes,2,opt,name=workers,proto3" json:"workers,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DaskJob) Reset() { *m = DaskJob{} } +func (m *DaskJob) String() string { return proto.CompactTextString(m) } +func (*DaskJob) ProtoMessage() {} +func (*DaskJob) Descriptor() ([]byte, []int) { + return fileDescriptor_d719e18eb4f4b89f, []int{0} +} + +func (m *DaskJob) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DaskJob.Unmarshal(m, b) +} +func (m *DaskJob) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DaskJob.Marshal(b, m, deterministic) +} +func (m *DaskJob) XXX_Merge(src proto.Message) { + xxx_messageInfo_DaskJob.Merge(m, src) +} +func (m *DaskJob) XXX_Size() int { + return xxx_messageInfo_DaskJob.Size(m) +} +func (m *DaskJob) XXX_DiscardUnknown() { + xxx_messageInfo_DaskJob.DiscardUnknown(m) +} + +var xxx_messageInfo_DaskJob proto.InternalMessageInfo + +func (m *DaskJob) GetScheduler() *DaskScheduler { + if m != nil { + return m.Scheduler + } + return nil +} + +func (m *DaskJob) GetWorkers() *DaskWorkerGroup { + if m != nil { + return m.Workers + } + return nil +} + +// Specification for the scheduler pod. +type DaskScheduler struct { + // Optional image to use. If unset, will use the default image. + Image string `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"` + // Resources assigned to the scheduler pod. + Resources *core.Resources `protobuf:"bytes,2,opt,name=resources,proto3" json:"resources,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DaskScheduler) Reset() { *m = DaskScheduler{} } +func (m *DaskScheduler) String() string { return proto.CompactTextString(m) } +func (*DaskScheduler) ProtoMessage() {} +func (*DaskScheduler) Descriptor() ([]byte, []int) { + return fileDescriptor_d719e18eb4f4b89f, []int{1} +} + +func (m *DaskScheduler) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DaskScheduler.Unmarshal(m, b) +} +func (m *DaskScheduler) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DaskScheduler.Marshal(b, m, deterministic) +} +func (m *DaskScheduler) XXX_Merge(src proto.Message) { + xxx_messageInfo_DaskScheduler.Merge(m, src) +} +func (m *DaskScheduler) XXX_Size() int { + return xxx_messageInfo_DaskScheduler.Size(m) +} +func (m *DaskScheduler) XXX_DiscardUnknown() { + xxx_messageInfo_DaskScheduler.DiscardUnknown(m) +} + +var xxx_messageInfo_DaskScheduler proto.InternalMessageInfo + +func (m *DaskScheduler) GetImage() string { + if m != nil { + return m.Image + } + return "" +} + +func (m *DaskScheduler) GetResources() *core.Resources { + if m != nil { + return m.Resources + } + return nil +} + +type DaskWorkerGroup struct { + // Number of workers in the group. + NumberOfWorkers uint32 `protobuf:"varint,1,opt,name=number_of_workers,json=numberOfWorkers,proto3" json:"number_of_workers,omitempty"` + // Optional image to use for the pods of the worker group. If unset, will use the default image. + Image string `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"` + // Resources assigned to the all pods of the worker group. + // As per https://kubernetes.dask.org/en/latest/kubecluster.html?highlight=limit#best-practices + // it is advised to only set limits. If requests are not explicitly set, the plugin will make + // sure to set requests==limits. + // The plugin sets ` --memory-limit` as well as `--nthreads` for the workers according to the limit. + Resources *core.Resources `protobuf:"bytes,3,opt,name=resources,proto3" json:"resources,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DaskWorkerGroup) Reset() { *m = DaskWorkerGroup{} } +func (m *DaskWorkerGroup) String() string { return proto.CompactTextString(m) } +func (*DaskWorkerGroup) ProtoMessage() {} +func (*DaskWorkerGroup) Descriptor() ([]byte, []int) { + return fileDescriptor_d719e18eb4f4b89f, []int{2} +} + +func (m *DaskWorkerGroup) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DaskWorkerGroup.Unmarshal(m, b) +} +func (m *DaskWorkerGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DaskWorkerGroup.Marshal(b, m, deterministic) +} +func (m *DaskWorkerGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_DaskWorkerGroup.Merge(m, src) +} +func (m *DaskWorkerGroup) XXX_Size() int { + return xxx_messageInfo_DaskWorkerGroup.Size(m) +} +func (m *DaskWorkerGroup) XXX_DiscardUnknown() { + xxx_messageInfo_DaskWorkerGroup.DiscardUnknown(m) +} + +var xxx_messageInfo_DaskWorkerGroup proto.InternalMessageInfo + +func (m *DaskWorkerGroup) GetNumberOfWorkers() uint32 { + if m != nil { + return m.NumberOfWorkers + } + return 0 +} + +func (m *DaskWorkerGroup) GetImage() string { + if m != nil { + return m.Image + } + return "" +} + +func (m *DaskWorkerGroup) GetResources() *core.Resources { + if m != nil { + return m.Resources + } + return nil +} + +func init() { + proto.RegisterType((*DaskJob)(nil), "flyteidl.plugins.DaskJob") + proto.RegisterType((*DaskScheduler)(nil), "flyteidl.plugins.DaskScheduler") + proto.RegisterType((*DaskWorkerGroup)(nil), "flyteidl.plugins.DaskWorkerGroup") +} + +func init() { proto.RegisterFile("flyteidl/plugins/dask.proto", fileDescriptor_d719e18eb4f4b89f) } + +var fileDescriptor_d719e18eb4f4b89f = []byte{ + // 281 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0x4f, 0x4b, 0xc4, 0x30, + 0x14, 0xc4, 0xe9, 0x8a, 0x2e, 0x8d, 0x2c, 0xab, 0xc1, 0x43, 0xd5, 0x83, 0xda, 0x93, 0x08, 0x26, + 0xa0, 0xa0, 0x88, 0x78, 0x11, 0x41, 0xf0, 0x22, 0xc4, 0x83, 0x20, 0xc8, 0xd2, 0x3f, 0x69, 0xb6, + 0xf4, 0xcf, 0x2b, 0x2f, 0x0d, 0xe2, 0x07, 0xf0, 0xe4, 0x97, 0x96, 0xa6, 0x66, 0x8b, 0x45, 0xc1, + 0x63, 0x98, 0xdf, 0xbc, 0x99, 0x30, 0x64, 0x3f, 0x2b, 0xdf, 0x5b, 0x99, 0xa7, 0x25, 0x6f, 0x4a, + 0xa3, 0xf2, 0x5a, 0xf3, 0x34, 0xd2, 0x05, 0x6b, 0x10, 0x5a, 0xa0, 0x5b, 0x4e, 0x64, 0xdf, 0xe2, + 0xde, 0xee, 0x0a, 0x4f, 0x00, 0x25, 0x6f, 0x23, 0x5d, 0xe8, 0x1e, 0x0e, 0x3f, 0x3c, 0x32, 0xbd, + 0x8b, 0x74, 0xf1, 0x00, 0x31, 0xbd, 0x21, 0xbe, 0x4e, 0x96, 0x32, 0x35, 0xa5, 0xc4, 0xc0, 0x3b, + 0xf4, 0x8e, 0x37, 0xcf, 0x0e, 0xd8, 0xf8, 0x18, 0xeb, 0xe8, 0x27, 0x87, 0x89, 0xc1, 0x41, 0xaf, + 0xc9, 0xf4, 0x0d, 0xb0, 0x90, 0xa8, 0x83, 0x89, 0x35, 0x1f, 0xfd, 0x6e, 0x7e, 0xb6, 0xd0, 0x3d, + 0x82, 0x69, 0x84, 0x73, 0x84, 0xaf, 0x64, 0xf6, 0xe3, 0x30, 0xdd, 0x21, 0xeb, 0x79, 0x15, 0x29, + 0x69, 0x8b, 0xf8, 0xa2, 0x7f, 0xd0, 0x0b, 0xe2, 0xa3, 0xd4, 0x60, 0x30, 0x91, 0x2e, 0x25, 0x18, + 0x52, 0xba, 0xdf, 0x31, 0xe1, 0x74, 0x31, 0xa0, 0xe1, 0xa7, 0x47, 0xe6, 0xa3, 0x6c, 0x7a, 0x42, + 0xb6, 0x6b, 0x53, 0xc5, 0x12, 0x17, 0x90, 0x2d, 0x5c, 0xf3, 0x2e, 0x6d, 0x26, 0xe6, 0xbd, 0xf0, + 0x98, 0xf5, 0xbc, 0x1e, 0xda, 0x4c, 0xfe, 0x6c, 0xb3, 0xf6, 0xef, 0x36, 0xb7, 0x57, 0x2f, 0x97, + 0x2a, 0x6f, 0x97, 0x26, 0x66, 0x09, 0x54, 0xdc, 0x1a, 0x00, 0x15, 0x5f, 0xad, 0xa4, 0x64, 0xcd, + 0x9b, 0xf8, 0x54, 0x01, 0x1f, 0xef, 0x1c, 0x6f, 0xd8, 0xd9, 0xce, 0xbf, 0x02, 0x00, 0x00, 0xff, + 0xff, 0x4c, 0xea, 0xa6, 0xac, 0x02, 0x02, 0x00, 0x00, +} diff --git a/gen/pb-go/flyteidl/plugins/dask.pb.validate.go b/gen/pb-go/flyteidl/plugins/dask.pb.validate.go new file mode 100644 index 000000000..74037528b --- /dev/null +++ b/gen/pb-go/flyteidl/plugins/dask.pb.validate.go @@ -0,0 +1,277 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: flyteidl/plugins/dask.proto + +package plugins + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "github.com/golang/protobuf/ptypes" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = ptypes.DynamicAny{} +) + +// define the regex for a UUID once up-front +var _dask_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + +// Validate checks the field values on DaskJob with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *DaskJob) Validate() error { + if m == nil { + return nil + } + + if v, ok := interface{}(m.GetScheduler()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DaskJobValidationError{ + field: "Scheduler", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if v, ok := interface{}(m.GetWorkers()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DaskJobValidationError{ + field: "Workers", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// DaskJobValidationError is the validation error returned by DaskJob.Validate +// if the designated constraints aren't met. +type DaskJobValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DaskJobValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DaskJobValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DaskJobValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DaskJobValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DaskJobValidationError) ErrorName() string { return "DaskJobValidationError" } + +// Error satisfies the builtin error interface +func (e DaskJobValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sDaskJob.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DaskJobValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DaskJobValidationError{} + +// Validate checks the field values on DaskScheduler with the rules defined in +// the proto definition for this message. If any rules are violated, an error +// is returned. +func (m *DaskScheduler) Validate() error { + if m == nil { + return nil + } + + // no validation rules for Image + + if v, ok := interface{}(m.GetResources()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DaskSchedulerValidationError{ + field: "Resources", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// DaskSchedulerValidationError is the validation error returned by +// DaskScheduler.Validate if the designated constraints aren't met. +type DaskSchedulerValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DaskSchedulerValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DaskSchedulerValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DaskSchedulerValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DaskSchedulerValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DaskSchedulerValidationError) ErrorName() string { return "DaskSchedulerValidationError" } + +// Error satisfies the builtin error interface +func (e DaskSchedulerValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sDaskScheduler.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DaskSchedulerValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DaskSchedulerValidationError{} + +// Validate checks the field values on DaskWorkerGroup with the rules defined +// in the proto definition for this message. If any rules are violated, an +// error is returned. +func (m *DaskWorkerGroup) Validate() error { + if m == nil { + return nil + } + + // no validation rules for NumberOfWorkers + + // no validation rules for Image + + if v, ok := interface{}(m.GetResources()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DaskWorkerGroupValidationError{ + field: "Resources", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// DaskWorkerGroupValidationError is the validation error returned by +// DaskWorkerGroup.Validate if the designated constraints aren't met. +type DaskWorkerGroupValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DaskWorkerGroupValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DaskWorkerGroupValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DaskWorkerGroupValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DaskWorkerGroupValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DaskWorkerGroupValidationError) ErrorName() string { return "DaskWorkerGroupValidationError" } + +// Error satisfies the builtin error interface +func (e DaskWorkerGroupValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sDaskWorkerGroup.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DaskWorkerGroupValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DaskWorkerGroupValidationError{} diff --git a/gen/pb-java/flyteidl/plugins/Dask.java b/gen/pb-java/flyteidl/plugins/Dask.java new file mode 100644 index 000000000..0961e20e7 --- /dev/null +++ b/gen/pb-java/flyteidl/plugins/Dask.java @@ -0,0 +1,2844 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: flyteidl/plugins/dask.proto + +package flyteidl.plugins; + +public final class Dask { + private Dask() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface DaskJobOrBuilder extends + // @@protoc_insertion_point(interface_extends:flyteidl.plugins.DaskJob) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Spec for the scheduler pod.
+     * 
+ * + * .flyteidl.plugins.DaskScheduler scheduler = 1; + */ + boolean hasScheduler(); + /** + *
+     * Spec for the scheduler pod.
+     * 
+ * + * .flyteidl.plugins.DaskScheduler scheduler = 1; + */ + flyteidl.plugins.Dask.DaskScheduler getScheduler(); + /** + *
+     * Spec for the scheduler pod.
+     * 
+ * + * .flyteidl.plugins.DaskScheduler scheduler = 1; + */ + flyteidl.plugins.Dask.DaskSchedulerOrBuilder getSchedulerOrBuilder(); + + /** + *
+     * Spec of the default worker group.
+     * 
+ * + * .flyteidl.plugins.DaskWorkerGroup workers = 2; + */ + boolean hasWorkers(); + /** + *
+     * Spec of the default worker group.
+     * 
+ * + * .flyteidl.plugins.DaskWorkerGroup workers = 2; + */ + flyteidl.plugins.Dask.DaskWorkerGroup getWorkers(); + /** + *
+     * Spec of the default worker group.
+     * 
+ * + * .flyteidl.plugins.DaskWorkerGroup workers = 2; + */ + flyteidl.plugins.Dask.DaskWorkerGroupOrBuilder getWorkersOrBuilder(); + } + /** + *
+   * Custom Proto for Dask Plugin.
+   * 
+ * + * Protobuf type {@code flyteidl.plugins.DaskJob} + */ + public static final class DaskJob extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flyteidl.plugins.DaskJob) + DaskJobOrBuilder { + private static final long serialVersionUID = 0L; + // Use DaskJob.newBuilder() to construct. + private DaskJob(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DaskJob() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DaskJob( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + flyteidl.plugins.Dask.DaskScheduler.Builder subBuilder = null; + if (scheduler_ != null) { + subBuilder = scheduler_.toBuilder(); + } + scheduler_ = input.readMessage(flyteidl.plugins.Dask.DaskScheduler.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(scheduler_); + scheduler_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + flyteidl.plugins.Dask.DaskWorkerGroup.Builder subBuilder = null; + if (workers_ != null) { + subBuilder = workers_.toBuilder(); + } + workers_ = input.readMessage(flyteidl.plugins.Dask.DaskWorkerGroup.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(workers_); + workers_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return flyteidl.plugins.Dask.internal_static_flyteidl_plugins_DaskJob_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return flyteidl.plugins.Dask.internal_static_flyteidl_plugins_DaskJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + flyteidl.plugins.Dask.DaskJob.class, flyteidl.plugins.Dask.DaskJob.Builder.class); + } + + public static final int SCHEDULER_FIELD_NUMBER = 1; + private flyteidl.plugins.Dask.DaskScheduler scheduler_; + /** + *
+     * Spec for the scheduler pod.
+     * 
+ * + * .flyteidl.plugins.DaskScheduler scheduler = 1; + */ + public boolean hasScheduler() { + return scheduler_ != null; + } + /** + *
+     * Spec for the scheduler pod.
+     * 
+ * + * .flyteidl.plugins.DaskScheduler scheduler = 1; + */ + public flyteidl.plugins.Dask.DaskScheduler getScheduler() { + return scheduler_ == null ? flyteidl.plugins.Dask.DaskScheduler.getDefaultInstance() : scheduler_; + } + /** + *
+     * Spec for the scheduler pod.
+     * 
+ * + * .flyteidl.plugins.DaskScheduler scheduler = 1; + */ + public flyteidl.plugins.Dask.DaskSchedulerOrBuilder getSchedulerOrBuilder() { + return getScheduler(); + } + + public static final int WORKERS_FIELD_NUMBER = 2; + private flyteidl.plugins.Dask.DaskWorkerGroup workers_; + /** + *
+     * Spec of the default worker group.
+     * 
+ * + * .flyteidl.plugins.DaskWorkerGroup workers = 2; + */ + public boolean hasWorkers() { + return workers_ != null; + } + /** + *
+     * Spec of the default worker group.
+     * 
+ * + * .flyteidl.plugins.DaskWorkerGroup workers = 2; + */ + public flyteidl.plugins.Dask.DaskWorkerGroup getWorkers() { + return workers_ == null ? flyteidl.plugins.Dask.DaskWorkerGroup.getDefaultInstance() : workers_; + } + /** + *
+     * Spec of the default worker group.
+     * 
+ * + * .flyteidl.plugins.DaskWorkerGroup workers = 2; + */ + public flyteidl.plugins.Dask.DaskWorkerGroupOrBuilder getWorkersOrBuilder() { + return getWorkers(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (scheduler_ != null) { + output.writeMessage(1, getScheduler()); + } + if (workers_ != null) { + output.writeMessage(2, getWorkers()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (scheduler_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getScheduler()); + } + if (workers_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getWorkers()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof flyteidl.plugins.Dask.DaskJob)) { + return super.equals(obj); + } + flyteidl.plugins.Dask.DaskJob other = (flyteidl.plugins.Dask.DaskJob) obj; + + if (hasScheduler() != other.hasScheduler()) return false; + if (hasScheduler()) { + if (!getScheduler() + .equals(other.getScheduler())) return false; + } + if (hasWorkers() != other.hasWorkers()) return false; + if (hasWorkers()) { + if (!getWorkers() + .equals(other.getWorkers())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasScheduler()) { + hash = (37 * hash) + SCHEDULER_FIELD_NUMBER; + hash = (53 * hash) + getScheduler().hashCode(); + } + if (hasWorkers()) { + hash = (37 * hash) + WORKERS_FIELD_NUMBER; + hash = (53 * hash) + getWorkers().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static flyteidl.plugins.Dask.DaskJob parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.plugins.Dask.DaskJob parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static flyteidl.plugins.Dask.DaskJob parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.plugins.Dask.DaskJob parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static flyteidl.plugins.Dask.DaskJob parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.plugins.Dask.DaskJob parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static flyteidl.plugins.Dask.DaskJob parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static flyteidl.plugins.Dask.DaskJob parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static flyteidl.plugins.Dask.DaskJob parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static flyteidl.plugins.Dask.DaskJob parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static flyteidl.plugins.Dask.DaskJob parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static flyteidl.plugins.Dask.DaskJob parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(flyteidl.plugins.Dask.DaskJob prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Custom Proto for Dask Plugin.
+     * 
+ * + * Protobuf type {@code flyteidl.plugins.DaskJob} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flyteidl.plugins.DaskJob) + flyteidl.plugins.Dask.DaskJobOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return flyteidl.plugins.Dask.internal_static_flyteidl_plugins_DaskJob_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return flyteidl.plugins.Dask.internal_static_flyteidl_plugins_DaskJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + flyteidl.plugins.Dask.DaskJob.class, flyteidl.plugins.Dask.DaskJob.Builder.class); + } + + // Construct using flyteidl.plugins.Dask.DaskJob.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (schedulerBuilder_ == null) { + scheduler_ = null; + } else { + scheduler_ = null; + schedulerBuilder_ = null; + } + if (workersBuilder_ == null) { + workers_ = null; + } else { + workers_ = null; + workersBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return flyteidl.plugins.Dask.internal_static_flyteidl_plugins_DaskJob_descriptor; + } + + @java.lang.Override + public flyteidl.plugins.Dask.DaskJob getDefaultInstanceForType() { + return flyteidl.plugins.Dask.DaskJob.getDefaultInstance(); + } + + @java.lang.Override + public flyteidl.plugins.Dask.DaskJob build() { + flyteidl.plugins.Dask.DaskJob result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public flyteidl.plugins.Dask.DaskJob buildPartial() { + flyteidl.plugins.Dask.DaskJob result = new flyteidl.plugins.Dask.DaskJob(this); + if (schedulerBuilder_ == null) { + result.scheduler_ = scheduler_; + } else { + result.scheduler_ = schedulerBuilder_.build(); + } + if (workersBuilder_ == null) { + result.workers_ = workers_; + } else { + result.workers_ = workersBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof flyteidl.plugins.Dask.DaskJob) { + return mergeFrom((flyteidl.plugins.Dask.DaskJob)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(flyteidl.plugins.Dask.DaskJob other) { + if (other == flyteidl.plugins.Dask.DaskJob.getDefaultInstance()) return this; + if (other.hasScheduler()) { + mergeScheduler(other.getScheduler()); + } + if (other.hasWorkers()) { + mergeWorkers(other.getWorkers()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + flyteidl.plugins.Dask.DaskJob parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (flyteidl.plugins.Dask.DaskJob) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private flyteidl.plugins.Dask.DaskScheduler scheduler_; + private com.google.protobuf.SingleFieldBuilderV3< + flyteidl.plugins.Dask.DaskScheduler, flyteidl.plugins.Dask.DaskScheduler.Builder, flyteidl.plugins.Dask.DaskSchedulerOrBuilder> schedulerBuilder_; + /** + *
+       * Spec for the scheduler pod.
+       * 
+ * + * .flyteidl.plugins.DaskScheduler scheduler = 1; + */ + public boolean hasScheduler() { + return schedulerBuilder_ != null || scheduler_ != null; + } + /** + *
+       * Spec for the scheduler pod.
+       * 
+ * + * .flyteidl.plugins.DaskScheduler scheduler = 1; + */ + public flyteidl.plugins.Dask.DaskScheduler getScheduler() { + if (schedulerBuilder_ == null) { + return scheduler_ == null ? flyteidl.plugins.Dask.DaskScheduler.getDefaultInstance() : scheduler_; + } else { + return schedulerBuilder_.getMessage(); + } + } + /** + *
+       * Spec for the scheduler pod.
+       * 
+ * + * .flyteidl.plugins.DaskScheduler scheduler = 1; + */ + public Builder setScheduler(flyteidl.plugins.Dask.DaskScheduler value) { + if (schedulerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + scheduler_ = value; + onChanged(); + } else { + schedulerBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Spec for the scheduler pod.
+       * 
+ * + * .flyteidl.plugins.DaskScheduler scheduler = 1; + */ + public Builder setScheduler( + flyteidl.plugins.Dask.DaskScheduler.Builder builderForValue) { + if (schedulerBuilder_ == null) { + scheduler_ = builderForValue.build(); + onChanged(); + } else { + schedulerBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Spec for the scheduler pod.
+       * 
+ * + * .flyteidl.plugins.DaskScheduler scheduler = 1; + */ + public Builder mergeScheduler(flyteidl.plugins.Dask.DaskScheduler value) { + if (schedulerBuilder_ == null) { + if (scheduler_ != null) { + scheduler_ = + flyteidl.plugins.Dask.DaskScheduler.newBuilder(scheduler_).mergeFrom(value).buildPartial(); + } else { + scheduler_ = value; + } + onChanged(); + } else { + schedulerBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Spec for the scheduler pod.
+       * 
+ * + * .flyteidl.plugins.DaskScheduler scheduler = 1; + */ + public Builder clearScheduler() { + if (schedulerBuilder_ == null) { + scheduler_ = null; + onChanged(); + } else { + scheduler_ = null; + schedulerBuilder_ = null; + } + + return this; + } + /** + *
+       * Spec for the scheduler pod.
+       * 
+ * + * .flyteidl.plugins.DaskScheduler scheduler = 1; + */ + public flyteidl.plugins.Dask.DaskScheduler.Builder getSchedulerBuilder() { + + onChanged(); + return getSchedulerFieldBuilder().getBuilder(); + } + /** + *
+       * Spec for the scheduler pod.
+       * 
+ * + * .flyteidl.plugins.DaskScheduler scheduler = 1; + */ + public flyteidl.plugins.Dask.DaskSchedulerOrBuilder getSchedulerOrBuilder() { + if (schedulerBuilder_ != null) { + return schedulerBuilder_.getMessageOrBuilder(); + } else { + return scheduler_ == null ? + flyteidl.plugins.Dask.DaskScheduler.getDefaultInstance() : scheduler_; + } + } + /** + *
+       * Spec for the scheduler pod.
+       * 
+ * + * .flyteidl.plugins.DaskScheduler scheduler = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + flyteidl.plugins.Dask.DaskScheduler, flyteidl.plugins.Dask.DaskScheduler.Builder, flyteidl.plugins.Dask.DaskSchedulerOrBuilder> + getSchedulerFieldBuilder() { + if (schedulerBuilder_ == null) { + schedulerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + flyteidl.plugins.Dask.DaskScheduler, flyteidl.plugins.Dask.DaskScheduler.Builder, flyteidl.plugins.Dask.DaskSchedulerOrBuilder>( + getScheduler(), + getParentForChildren(), + isClean()); + scheduler_ = null; + } + return schedulerBuilder_; + } + + private flyteidl.plugins.Dask.DaskWorkerGroup workers_; + private com.google.protobuf.SingleFieldBuilderV3< + flyteidl.plugins.Dask.DaskWorkerGroup, flyteidl.plugins.Dask.DaskWorkerGroup.Builder, flyteidl.plugins.Dask.DaskWorkerGroupOrBuilder> workersBuilder_; + /** + *
+       * Spec of the default worker group.
+       * 
+ * + * .flyteidl.plugins.DaskWorkerGroup workers = 2; + */ + public boolean hasWorkers() { + return workersBuilder_ != null || workers_ != null; + } + /** + *
+       * Spec of the default worker group.
+       * 
+ * + * .flyteidl.plugins.DaskWorkerGroup workers = 2; + */ + public flyteidl.plugins.Dask.DaskWorkerGroup getWorkers() { + if (workersBuilder_ == null) { + return workers_ == null ? flyteidl.plugins.Dask.DaskWorkerGroup.getDefaultInstance() : workers_; + } else { + return workersBuilder_.getMessage(); + } + } + /** + *
+       * Spec of the default worker group.
+       * 
+ * + * .flyteidl.plugins.DaskWorkerGroup workers = 2; + */ + public Builder setWorkers(flyteidl.plugins.Dask.DaskWorkerGroup value) { + if (workersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + workers_ = value; + onChanged(); + } else { + workersBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Spec of the default worker group.
+       * 
+ * + * .flyteidl.plugins.DaskWorkerGroup workers = 2; + */ + public Builder setWorkers( + flyteidl.plugins.Dask.DaskWorkerGroup.Builder builderForValue) { + if (workersBuilder_ == null) { + workers_ = builderForValue.build(); + onChanged(); + } else { + workersBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Spec of the default worker group.
+       * 
+ * + * .flyteidl.plugins.DaskWorkerGroup workers = 2; + */ + public Builder mergeWorkers(flyteidl.plugins.Dask.DaskWorkerGroup value) { + if (workersBuilder_ == null) { + if (workers_ != null) { + workers_ = + flyteidl.plugins.Dask.DaskWorkerGroup.newBuilder(workers_).mergeFrom(value).buildPartial(); + } else { + workers_ = value; + } + onChanged(); + } else { + workersBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Spec of the default worker group.
+       * 
+ * + * .flyteidl.plugins.DaskWorkerGroup workers = 2; + */ + public Builder clearWorkers() { + if (workersBuilder_ == null) { + workers_ = null; + onChanged(); + } else { + workers_ = null; + workersBuilder_ = null; + } + + return this; + } + /** + *
+       * Spec of the default worker group.
+       * 
+ * + * .flyteidl.plugins.DaskWorkerGroup workers = 2; + */ + public flyteidl.plugins.Dask.DaskWorkerGroup.Builder getWorkersBuilder() { + + onChanged(); + return getWorkersFieldBuilder().getBuilder(); + } + /** + *
+       * Spec of the default worker group.
+       * 
+ * + * .flyteidl.plugins.DaskWorkerGroup workers = 2; + */ + public flyteidl.plugins.Dask.DaskWorkerGroupOrBuilder getWorkersOrBuilder() { + if (workersBuilder_ != null) { + return workersBuilder_.getMessageOrBuilder(); + } else { + return workers_ == null ? + flyteidl.plugins.Dask.DaskWorkerGroup.getDefaultInstance() : workers_; + } + } + /** + *
+       * Spec of the default worker group.
+       * 
+ * + * .flyteidl.plugins.DaskWorkerGroup workers = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + flyteidl.plugins.Dask.DaskWorkerGroup, flyteidl.plugins.Dask.DaskWorkerGroup.Builder, flyteidl.plugins.Dask.DaskWorkerGroupOrBuilder> + getWorkersFieldBuilder() { + if (workersBuilder_ == null) { + workersBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + flyteidl.plugins.Dask.DaskWorkerGroup, flyteidl.plugins.Dask.DaskWorkerGroup.Builder, flyteidl.plugins.Dask.DaskWorkerGroupOrBuilder>( + getWorkers(), + getParentForChildren(), + isClean()); + workers_ = null; + } + return workersBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flyteidl.plugins.DaskJob) + } + + // @@protoc_insertion_point(class_scope:flyteidl.plugins.DaskJob) + private static final flyteidl.plugins.Dask.DaskJob DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new flyteidl.plugins.Dask.DaskJob(); + } + + public static flyteidl.plugins.Dask.DaskJob getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DaskJob parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DaskJob(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public flyteidl.plugins.Dask.DaskJob getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DaskSchedulerOrBuilder extends + // @@protoc_insertion_point(interface_extends:flyteidl.plugins.DaskScheduler) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Optional image to use. If unset, will use the default image.
+     * 
+ * + * string image = 1; + */ + java.lang.String getImage(); + /** + *
+     * Optional image to use. If unset, will use the default image.
+     * 
+ * + * string image = 1; + */ + com.google.protobuf.ByteString + getImageBytes(); + + /** + *
+     * Resources assigned to the scheduler pod.
+     * 
+ * + * .flyteidl.core.Resources resources = 2; + */ + boolean hasResources(); + /** + *
+     * Resources assigned to the scheduler pod.
+     * 
+ * + * .flyteidl.core.Resources resources = 2; + */ + flyteidl.core.Tasks.Resources getResources(); + /** + *
+     * Resources assigned to the scheduler pod.
+     * 
+ * + * .flyteidl.core.Resources resources = 2; + */ + flyteidl.core.Tasks.ResourcesOrBuilder getResourcesOrBuilder(); + } + /** + *
+   * Specification for the scheduler pod.
+   * 
+ * + * Protobuf type {@code flyteidl.plugins.DaskScheduler} + */ + public static final class DaskScheduler extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flyteidl.plugins.DaskScheduler) + DaskSchedulerOrBuilder { + private static final long serialVersionUID = 0L; + // Use DaskScheduler.newBuilder() to construct. + private DaskScheduler(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DaskScheduler() { + image_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DaskScheduler( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + image_ = s; + break; + } + case 18: { + flyteidl.core.Tasks.Resources.Builder subBuilder = null; + if (resources_ != null) { + subBuilder = resources_.toBuilder(); + } + resources_ = input.readMessage(flyteidl.core.Tasks.Resources.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(resources_); + resources_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return flyteidl.plugins.Dask.internal_static_flyteidl_plugins_DaskScheduler_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return flyteidl.plugins.Dask.internal_static_flyteidl_plugins_DaskScheduler_fieldAccessorTable + .ensureFieldAccessorsInitialized( + flyteidl.plugins.Dask.DaskScheduler.class, flyteidl.plugins.Dask.DaskScheduler.Builder.class); + } + + public static final int IMAGE_FIELD_NUMBER = 1; + private volatile java.lang.Object image_; + /** + *
+     * Optional image to use. If unset, will use the default image.
+     * 
+ * + * string image = 1; + */ + public java.lang.String getImage() { + java.lang.Object ref = image_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + image_ = s; + return s; + } + } + /** + *
+     * Optional image to use. If unset, will use the default image.
+     * 
+ * + * string image = 1; + */ + public com.google.protobuf.ByteString + getImageBytes() { + java.lang.Object ref = image_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + image_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCES_FIELD_NUMBER = 2; + private flyteidl.core.Tasks.Resources resources_; + /** + *
+     * Resources assigned to the scheduler pod.
+     * 
+ * + * .flyteidl.core.Resources resources = 2; + */ + public boolean hasResources() { + return resources_ != null; + } + /** + *
+     * Resources assigned to the scheduler pod.
+     * 
+ * + * .flyteidl.core.Resources resources = 2; + */ + public flyteidl.core.Tasks.Resources getResources() { + return resources_ == null ? flyteidl.core.Tasks.Resources.getDefaultInstance() : resources_; + } + /** + *
+     * Resources assigned to the scheduler pod.
+     * 
+ * + * .flyteidl.core.Resources resources = 2; + */ + public flyteidl.core.Tasks.ResourcesOrBuilder getResourcesOrBuilder() { + return getResources(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getImageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, image_); + } + if (resources_ != null) { + output.writeMessage(2, getResources()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getImageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, image_); + } + if (resources_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getResources()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof flyteidl.plugins.Dask.DaskScheduler)) { + return super.equals(obj); + } + flyteidl.plugins.Dask.DaskScheduler other = (flyteidl.plugins.Dask.DaskScheduler) obj; + + if (!getImage() + .equals(other.getImage())) return false; + if (hasResources() != other.hasResources()) return false; + if (hasResources()) { + if (!getResources() + .equals(other.getResources())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getImage().hashCode(); + if (hasResources()) { + hash = (37 * hash) + RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getResources().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static flyteidl.plugins.Dask.DaskScheduler parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.plugins.Dask.DaskScheduler parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static flyteidl.plugins.Dask.DaskScheduler parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.plugins.Dask.DaskScheduler parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static flyteidl.plugins.Dask.DaskScheduler parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.plugins.Dask.DaskScheduler parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static flyteidl.plugins.Dask.DaskScheduler parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static flyteidl.plugins.Dask.DaskScheduler parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static flyteidl.plugins.Dask.DaskScheduler parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static flyteidl.plugins.Dask.DaskScheduler parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static flyteidl.plugins.Dask.DaskScheduler parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static flyteidl.plugins.Dask.DaskScheduler parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(flyteidl.plugins.Dask.DaskScheduler prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Specification for the scheduler pod.
+     * 
+ * + * Protobuf type {@code flyteidl.plugins.DaskScheduler} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flyteidl.plugins.DaskScheduler) + flyteidl.plugins.Dask.DaskSchedulerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return flyteidl.plugins.Dask.internal_static_flyteidl_plugins_DaskScheduler_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return flyteidl.plugins.Dask.internal_static_flyteidl_plugins_DaskScheduler_fieldAccessorTable + .ensureFieldAccessorsInitialized( + flyteidl.plugins.Dask.DaskScheduler.class, flyteidl.plugins.Dask.DaskScheduler.Builder.class); + } + + // Construct using flyteidl.plugins.Dask.DaskScheduler.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + image_ = ""; + + if (resourcesBuilder_ == null) { + resources_ = null; + } else { + resources_ = null; + resourcesBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return flyteidl.plugins.Dask.internal_static_flyteidl_plugins_DaskScheduler_descriptor; + } + + @java.lang.Override + public flyteidl.plugins.Dask.DaskScheduler getDefaultInstanceForType() { + return flyteidl.plugins.Dask.DaskScheduler.getDefaultInstance(); + } + + @java.lang.Override + public flyteidl.plugins.Dask.DaskScheduler build() { + flyteidl.plugins.Dask.DaskScheduler result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public flyteidl.plugins.Dask.DaskScheduler buildPartial() { + flyteidl.plugins.Dask.DaskScheduler result = new flyteidl.plugins.Dask.DaskScheduler(this); + result.image_ = image_; + if (resourcesBuilder_ == null) { + result.resources_ = resources_; + } else { + result.resources_ = resourcesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof flyteidl.plugins.Dask.DaskScheduler) { + return mergeFrom((flyteidl.plugins.Dask.DaskScheduler)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(flyteidl.plugins.Dask.DaskScheduler other) { + if (other == flyteidl.plugins.Dask.DaskScheduler.getDefaultInstance()) return this; + if (!other.getImage().isEmpty()) { + image_ = other.image_; + onChanged(); + } + if (other.hasResources()) { + mergeResources(other.getResources()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + flyteidl.plugins.Dask.DaskScheduler parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (flyteidl.plugins.Dask.DaskScheduler) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object image_ = ""; + /** + *
+       * Optional image to use. If unset, will use the default image.
+       * 
+ * + * string image = 1; + */ + public java.lang.String getImage() { + java.lang.Object ref = image_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + image_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Optional image to use. If unset, will use the default image.
+       * 
+ * + * string image = 1; + */ + public com.google.protobuf.ByteString + getImageBytes() { + java.lang.Object ref = image_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + image_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Optional image to use. If unset, will use the default image.
+       * 
+ * + * string image = 1; + */ + public Builder setImage( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + image_ = value; + onChanged(); + return this; + } + /** + *
+       * Optional image to use. If unset, will use the default image.
+       * 
+ * + * string image = 1; + */ + public Builder clearImage() { + + image_ = getDefaultInstance().getImage(); + onChanged(); + return this; + } + /** + *
+       * Optional image to use. If unset, will use the default image.
+       * 
+ * + * string image = 1; + */ + public Builder setImageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + image_ = value; + onChanged(); + return this; + } + + private flyteidl.core.Tasks.Resources resources_; + private com.google.protobuf.SingleFieldBuilderV3< + flyteidl.core.Tasks.Resources, flyteidl.core.Tasks.Resources.Builder, flyteidl.core.Tasks.ResourcesOrBuilder> resourcesBuilder_; + /** + *
+       * Resources assigned to the scheduler pod.
+       * 
+ * + * .flyteidl.core.Resources resources = 2; + */ + public boolean hasResources() { + return resourcesBuilder_ != null || resources_ != null; + } + /** + *
+       * Resources assigned to the scheduler pod.
+       * 
+ * + * .flyteidl.core.Resources resources = 2; + */ + public flyteidl.core.Tasks.Resources getResources() { + if (resourcesBuilder_ == null) { + return resources_ == null ? flyteidl.core.Tasks.Resources.getDefaultInstance() : resources_; + } else { + return resourcesBuilder_.getMessage(); + } + } + /** + *
+       * Resources assigned to the scheduler pod.
+       * 
+ * + * .flyteidl.core.Resources resources = 2; + */ + public Builder setResources(flyteidl.core.Tasks.Resources value) { + if (resourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resources_ = value; + onChanged(); + } else { + resourcesBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Resources assigned to the scheduler pod.
+       * 
+ * + * .flyteidl.core.Resources resources = 2; + */ + public Builder setResources( + flyteidl.core.Tasks.Resources.Builder builderForValue) { + if (resourcesBuilder_ == null) { + resources_ = builderForValue.build(); + onChanged(); + } else { + resourcesBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Resources assigned to the scheduler pod.
+       * 
+ * + * .flyteidl.core.Resources resources = 2; + */ + public Builder mergeResources(flyteidl.core.Tasks.Resources value) { + if (resourcesBuilder_ == null) { + if (resources_ != null) { + resources_ = + flyteidl.core.Tasks.Resources.newBuilder(resources_).mergeFrom(value).buildPartial(); + } else { + resources_ = value; + } + onChanged(); + } else { + resourcesBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Resources assigned to the scheduler pod.
+       * 
+ * + * .flyteidl.core.Resources resources = 2; + */ + public Builder clearResources() { + if (resourcesBuilder_ == null) { + resources_ = null; + onChanged(); + } else { + resources_ = null; + resourcesBuilder_ = null; + } + + return this; + } + /** + *
+       * Resources assigned to the scheduler pod.
+       * 
+ * + * .flyteidl.core.Resources resources = 2; + */ + public flyteidl.core.Tasks.Resources.Builder getResourcesBuilder() { + + onChanged(); + return getResourcesFieldBuilder().getBuilder(); + } + /** + *
+       * Resources assigned to the scheduler pod.
+       * 
+ * + * .flyteidl.core.Resources resources = 2; + */ + public flyteidl.core.Tasks.ResourcesOrBuilder getResourcesOrBuilder() { + if (resourcesBuilder_ != null) { + return resourcesBuilder_.getMessageOrBuilder(); + } else { + return resources_ == null ? + flyteidl.core.Tasks.Resources.getDefaultInstance() : resources_; + } + } + /** + *
+       * Resources assigned to the scheduler pod.
+       * 
+ * + * .flyteidl.core.Resources resources = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + flyteidl.core.Tasks.Resources, flyteidl.core.Tasks.Resources.Builder, flyteidl.core.Tasks.ResourcesOrBuilder> + getResourcesFieldBuilder() { + if (resourcesBuilder_ == null) { + resourcesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + flyteidl.core.Tasks.Resources, flyteidl.core.Tasks.Resources.Builder, flyteidl.core.Tasks.ResourcesOrBuilder>( + getResources(), + getParentForChildren(), + isClean()); + resources_ = null; + } + return resourcesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flyteidl.plugins.DaskScheduler) + } + + // @@protoc_insertion_point(class_scope:flyteidl.plugins.DaskScheduler) + private static final flyteidl.plugins.Dask.DaskScheduler DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new flyteidl.plugins.Dask.DaskScheduler(); + } + + public static flyteidl.plugins.Dask.DaskScheduler getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DaskScheduler parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DaskScheduler(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public flyteidl.plugins.Dask.DaskScheduler getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DaskWorkerGroupOrBuilder extends + // @@protoc_insertion_point(interface_extends:flyteidl.plugins.DaskWorkerGroup) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Number of workers in the group.
+     * 
+ * + * uint32 number_of_workers = 1; + */ + int getNumberOfWorkers(); + + /** + *
+     * Optional image to use for the pods of the worker group. If unset, will use the default image.
+     * 
+ * + * string image = 2; + */ + java.lang.String getImage(); + /** + *
+     * Optional image to use for the pods of the worker group. If unset, will use the default image.
+     * 
+ * + * string image = 2; + */ + com.google.protobuf.ByteString + getImageBytes(); + + /** + *
+     * Resources assigned to the all pods of the worker group.
+     * As per https://kubernetes.dask.org/en/latest/kubecluster.html?highlight=limit#best-practices 
+     * it is advised to only set limits. If requests are not explicitly set, the plugin will make
+     * sure to set requests==limits.
+     * The plugin sets ` --memory-limit` as well as `--nthreads` for the workers according to the limit.
+     * 
+ * + * .flyteidl.core.Resources resources = 3; + */ + boolean hasResources(); + /** + *
+     * Resources assigned to the all pods of the worker group.
+     * As per https://kubernetes.dask.org/en/latest/kubecluster.html?highlight=limit#best-practices 
+     * it is advised to only set limits. If requests are not explicitly set, the plugin will make
+     * sure to set requests==limits.
+     * The plugin sets ` --memory-limit` as well as `--nthreads` for the workers according to the limit.
+     * 
+ * + * .flyteidl.core.Resources resources = 3; + */ + flyteidl.core.Tasks.Resources getResources(); + /** + *
+     * Resources assigned to the all pods of the worker group.
+     * As per https://kubernetes.dask.org/en/latest/kubecluster.html?highlight=limit#best-practices 
+     * it is advised to only set limits. If requests are not explicitly set, the plugin will make
+     * sure to set requests==limits.
+     * The plugin sets ` --memory-limit` as well as `--nthreads` for the workers according to the limit.
+     * 
+ * + * .flyteidl.core.Resources resources = 3; + */ + flyteidl.core.Tasks.ResourcesOrBuilder getResourcesOrBuilder(); + } + /** + * Protobuf type {@code flyteidl.plugins.DaskWorkerGroup} + */ + public static final class DaskWorkerGroup extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flyteidl.plugins.DaskWorkerGroup) + DaskWorkerGroupOrBuilder { + private static final long serialVersionUID = 0L; + // Use DaskWorkerGroup.newBuilder() to construct. + private DaskWorkerGroup(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DaskWorkerGroup() { + image_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DaskWorkerGroup( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + numberOfWorkers_ = input.readUInt32(); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + image_ = s; + break; + } + case 26: { + flyteidl.core.Tasks.Resources.Builder subBuilder = null; + if (resources_ != null) { + subBuilder = resources_.toBuilder(); + } + resources_ = input.readMessage(flyteidl.core.Tasks.Resources.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(resources_); + resources_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return flyteidl.plugins.Dask.internal_static_flyteidl_plugins_DaskWorkerGroup_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return flyteidl.plugins.Dask.internal_static_flyteidl_plugins_DaskWorkerGroup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + flyteidl.plugins.Dask.DaskWorkerGroup.class, flyteidl.plugins.Dask.DaskWorkerGroup.Builder.class); + } + + public static final int NUMBER_OF_WORKERS_FIELD_NUMBER = 1; + private int numberOfWorkers_; + /** + *
+     * Number of workers in the group.
+     * 
+ * + * uint32 number_of_workers = 1; + */ + public int getNumberOfWorkers() { + return numberOfWorkers_; + } + + public static final int IMAGE_FIELD_NUMBER = 2; + private volatile java.lang.Object image_; + /** + *
+     * Optional image to use for the pods of the worker group. If unset, will use the default image.
+     * 
+ * + * string image = 2; + */ + public java.lang.String getImage() { + java.lang.Object ref = image_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + image_ = s; + return s; + } + } + /** + *
+     * Optional image to use for the pods of the worker group. If unset, will use the default image.
+     * 
+ * + * string image = 2; + */ + public com.google.protobuf.ByteString + getImageBytes() { + java.lang.Object ref = image_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + image_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCES_FIELD_NUMBER = 3; + private flyteidl.core.Tasks.Resources resources_; + /** + *
+     * Resources assigned to the all pods of the worker group.
+     * As per https://kubernetes.dask.org/en/latest/kubecluster.html?highlight=limit#best-practices 
+     * it is advised to only set limits. If requests are not explicitly set, the plugin will make
+     * sure to set requests==limits.
+     * The plugin sets ` --memory-limit` as well as `--nthreads` for the workers according to the limit.
+     * 
+ * + * .flyteidl.core.Resources resources = 3; + */ + public boolean hasResources() { + return resources_ != null; + } + /** + *
+     * Resources assigned to the all pods of the worker group.
+     * As per https://kubernetes.dask.org/en/latest/kubecluster.html?highlight=limit#best-practices 
+     * it is advised to only set limits. If requests are not explicitly set, the plugin will make
+     * sure to set requests==limits.
+     * The plugin sets ` --memory-limit` as well as `--nthreads` for the workers according to the limit.
+     * 
+ * + * .flyteidl.core.Resources resources = 3; + */ + public flyteidl.core.Tasks.Resources getResources() { + return resources_ == null ? flyteidl.core.Tasks.Resources.getDefaultInstance() : resources_; + } + /** + *
+     * Resources assigned to the all pods of the worker group.
+     * As per https://kubernetes.dask.org/en/latest/kubecluster.html?highlight=limit#best-practices 
+     * it is advised to only set limits. If requests are not explicitly set, the plugin will make
+     * sure to set requests==limits.
+     * The plugin sets ` --memory-limit` as well as `--nthreads` for the workers according to the limit.
+     * 
+ * + * .flyteidl.core.Resources resources = 3; + */ + public flyteidl.core.Tasks.ResourcesOrBuilder getResourcesOrBuilder() { + return getResources(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (numberOfWorkers_ != 0) { + output.writeUInt32(1, numberOfWorkers_); + } + if (!getImageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, image_); + } + if (resources_ != null) { + output.writeMessage(3, getResources()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (numberOfWorkers_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, numberOfWorkers_); + } + if (!getImageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, image_); + } + if (resources_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getResources()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof flyteidl.plugins.Dask.DaskWorkerGroup)) { + return super.equals(obj); + } + flyteidl.plugins.Dask.DaskWorkerGroup other = (flyteidl.plugins.Dask.DaskWorkerGroup) obj; + + if (getNumberOfWorkers() + != other.getNumberOfWorkers()) return false; + if (!getImage() + .equals(other.getImage())) return false; + if (hasResources() != other.hasResources()) return false; + if (hasResources()) { + if (!getResources() + .equals(other.getResources())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NUMBER_OF_WORKERS_FIELD_NUMBER; + hash = (53 * hash) + getNumberOfWorkers(); + hash = (37 * hash) + IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getImage().hashCode(); + if (hasResources()) { + hash = (37 * hash) + RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getResources().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static flyteidl.plugins.Dask.DaskWorkerGroup parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.plugins.Dask.DaskWorkerGroup parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static flyteidl.plugins.Dask.DaskWorkerGroup parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.plugins.Dask.DaskWorkerGroup parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static flyteidl.plugins.Dask.DaskWorkerGroup parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.plugins.Dask.DaskWorkerGroup parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static flyteidl.plugins.Dask.DaskWorkerGroup parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static flyteidl.plugins.Dask.DaskWorkerGroup parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static flyteidl.plugins.Dask.DaskWorkerGroup parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static flyteidl.plugins.Dask.DaskWorkerGroup parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static flyteidl.plugins.Dask.DaskWorkerGroup parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static flyteidl.plugins.Dask.DaskWorkerGroup parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(flyteidl.plugins.Dask.DaskWorkerGroup prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code flyteidl.plugins.DaskWorkerGroup} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flyteidl.plugins.DaskWorkerGroup) + flyteidl.plugins.Dask.DaskWorkerGroupOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return flyteidl.plugins.Dask.internal_static_flyteidl_plugins_DaskWorkerGroup_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return flyteidl.plugins.Dask.internal_static_flyteidl_plugins_DaskWorkerGroup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + flyteidl.plugins.Dask.DaskWorkerGroup.class, flyteidl.plugins.Dask.DaskWorkerGroup.Builder.class); + } + + // Construct using flyteidl.plugins.Dask.DaskWorkerGroup.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + numberOfWorkers_ = 0; + + image_ = ""; + + if (resourcesBuilder_ == null) { + resources_ = null; + } else { + resources_ = null; + resourcesBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return flyteidl.plugins.Dask.internal_static_flyteidl_plugins_DaskWorkerGroup_descriptor; + } + + @java.lang.Override + public flyteidl.plugins.Dask.DaskWorkerGroup getDefaultInstanceForType() { + return flyteidl.plugins.Dask.DaskWorkerGroup.getDefaultInstance(); + } + + @java.lang.Override + public flyteidl.plugins.Dask.DaskWorkerGroup build() { + flyteidl.plugins.Dask.DaskWorkerGroup result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public flyteidl.plugins.Dask.DaskWorkerGroup buildPartial() { + flyteidl.plugins.Dask.DaskWorkerGroup result = new flyteidl.plugins.Dask.DaskWorkerGroup(this); + result.numberOfWorkers_ = numberOfWorkers_; + result.image_ = image_; + if (resourcesBuilder_ == null) { + result.resources_ = resources_; + } else { + result.resources_ = resourcesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof flyteidl.plugins.Dask.DaskWorkerGroup) { + return mergeFrom((flyteidl.plugins.Dask.DaskWorkerGroup)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(flyteidl.plugins.Dask.DaskWorkerGroup other) { + if (other == flyteidl.plugins.Dask.DaskWorkerGroup.getDefaultInstance()) return this; + if (other.getNumberOfWorkers() != 0) { + setNumberOfWorkers(other.getNumberOfWorkers()); + } + if (!other.getImage().isEmpty()) { + image_ = other.image_; + onChanged(); + } + if (other.hasResources()) { + mergeResources(other.getResources()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + flyteidl.plugins.Dask.DaskWorkerGroup parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (flyteidl.plugins.Dask.DaskWorkerGroup) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int numberOfWorkers_ ; + /** + *
+       * Number of workers in the group.
+       * 
+ * + * uint32 number_of_workers = 1; + */ + public int getNumberOfWorkers() { + return numberOfWorkers_; + } + /** + *
+       * Number of workers in the group.
+       * 
+ * + * uint32 number_of_workers = 1; + */ + public Builder setNumberOfWorkers(int value) { + + numberOfWorkers_ = value; + onChanged(); + return this; + } + /** + *
+       * Number of workers in the group.
+       * 
+ * + * uint32 number_of_workers = 1; + */ + public Builder clearNumberOfWorkers() { + + numberOfWorkers_ = 0; + onChanged(); + return this; + } + + private java.lang.Object image_ = ""; + /** + *
+       * Optional image to use for the pods of the worker group. If unset, will use the default image.
+       * 
+ * + * string image = 2; + */ + public java.lang.String getImage() { + java.lang.Object ref = image_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + image_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Optional image to use for the pods of the worker group. If unset, will use the default image.
+       * 
+ * + * string image = 2; + */ + public com.google.protobuf.ByteString + getImageBytes() { + java.lang.Object ref = image_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + image_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Optional image to use for the pods of the worker group. If unset, will use the default image.
+       * 
+ * + * string image = 2; + */ + public Builder setImage( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + image_ = value; + onChanged(); + return this; + } + /** + *
+       * Optional image to use for the pods of the worker group. If unset, will use the default image.
+       * 
+ * + * string image = 2; + */ + public Builder clearImage() { + + image_ = getDefaultInstance().getImage(); + onChanged(); + return this; + } + /** + *
+       * Optional image to use for the pods of the worker group. If unset, will use the default image.
+       * 
+ * + * string image = 2; + */ + public Builder setImageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + image_ = value; + onChanged(); + return this; + } + + private flyteidl.core.Tasks.Resources resources_; + private com.google.protobuf.SingleFieldBuilderV3< + flyteidl.core.Tasks.Resources, flyteidl.core.Tasks.Resources.Builder, flyteidl.core.Tasks.ResourcesOrBuilder> resourcesBuilder_; + /** + *
+       * Resources assigned to the all pods of the worker group.
+       * As per https://kubernetes.dask.org/en/latest/kubecluster.html?highlight=limit#best-practices 
+       * it is advised to only set limits. If requests are not explicitly set, the plugin will make
+       * sure to set requests==limits.
+       * The plugin sets ` --memory-limit` as well as `--nthreads` for the workers according to the limit.
+       * 
+ * + * .flyteidl.core.Resources resources = 3; + */ + public boolean hasResources() { + return resourcesBuilder_ != null || resources_ != null; + } + /** + *
+       * Resources assigned to the all pods of the worker group.
+       * As per https://kubernetes.dask.org/en/latest/kubecluster.html?highlight=limit#best-practices 
+       * it is advised to only set limits. If requests are not explicitly set, the plugin will make
+       * sure to set requests==limits.
+       * The plugin sets ` --memory-limit` as well as `--nthreads` for the workers according to the limit.
+       * 
+ * + * .flyteidl.core.Resources resources = 3; + */ + public flyteidl.core.Tasks.Resources getResources() { + if (resourcesBuilder_ == null) { + return resources_ == null ? flyteidl.core.Tasks.Resources.getDefaultInstance() : resources_; + } else { + return resourcesBuilder_.getMessage(); + } + } + /** + *
+       * Resources assigned to the all pods of the worker group.
+       * As per https://kubernetes.dask.org/en/latest/kubecluster.html?highlight=limit#best-practices 
+       * it is advised to only set limits. If requests are not explicitly set, the plugin will make
+       * sure to set requests==limits.
+       * The plugin sets ` --memory-limit` as well as `--nthreads` for the workers according to the limit.
+       * 
+ * + * .flyteidl.core.Resources resources = 3; + */ + public Builder setResources(flyteidl.core.Tasks.Resources value) { + if (resourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resources_ = value; + onChanged(); + } else { + resourcesBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Resources assigned to the all pods of the worker group.
+       * As per https://kubernetes.dask.org/en/latest/kubecluster.html?highlight=limit#best-practices 
+       * it is advised to only set limits. If requests are not explicitly set, the plugin will make
+       * sure to set requests==limits.
+       * The plugin sets ` --memory-limit` as well as `--nthreads` for the workers according to the limit.
+       * 
+ * + * .flyteidl.core.Resources resources = 3; + */ + public Builder setResources( + flyteidl.core.Tasks.Resources.Builder builderForValue) { + if (resourcesBuilder_ == null) { + resources_ = builderForValue.build(); + onChanged(); + } else { + resourcesBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Resources assigned to the all pods of the worker group.
+       * As per https://kubernetes.dask.org/en/latest/kubecluster.html?highlight=limit#best-practices 
+       * it is advised to only set limits. If requests are not explicitly set, the plugin will make
+       * sure to set requests==limits.
+       * The plugin sets ` --memory-limit` as well as `--nthreads` for the workers according to the limit.
+       * 
+ * + * .flyteidl.core.Resources resources = 3; + */ + public Builder mergeResources(flyteidl.core.Tasks.Resources value) { + if (resourcesBuilder_ == null) { + if (resources_ != null) { + resources_ = + flyteidl.core.Tasks.Resources.newBuilder(resources_).mergeFrom(value).buildPartial(); + } else { + resources_ = value; + } + onChanged(); + } else { + resourcesBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Resources assigned to the all pods of the worker group.
+       * As per https://kubernetes.dask.org/en/latest/kubecluster.html?highlight=limit#best-practices 
+       * it is advised to only set limits. If requests are not explicitly set, the plugin will make
+       * sure to set requests==limits.
+       * The plugin sets ` --memory-limit` as well as `--nthreads` for the workers according to the limit.
+       * 
+ * + * .flyteidl.core.Resources resources = 3; + */ + public Builder clearResources() { + if (resourcesBuilder_ == null) { + resources_ = null; + onChanged(); + } else { + resources_ = null; + resourcesBuilder_ = null; + } + + return this; + } + /** + *
+       * Resources assigned to the all pods of the worker group.
+       * As per https://kubernetes.dask.org/en/latest/kubecluster.html?highlight=limit#best-practices 
+       * it is advised to only set limits. If requests are not explicitly set, the plugin will make
+       * sure to set requests==limits.
+       * The plugin sets ` --memory-limit` as well as `--nthreads` for the workers according to the limit.
+       * 
+ * + * .flyteidl.core.Resources resources = 3; + */ + public flyteidl.core.Tasks.Resources.Builder getResourcesBuilder() { + + onChanged(); + return getResourcesFieldBuilder().getBuilder(); + } + /** + *
+       * Resources assigned to the all pods of the worker group.
+       * As per https://kubernetes.dask.org/en/latest/kubecluster.html?highlight=limit#best-practices 
+       * it is advised to only set limits. If requests are not explicitly set, the plugin will make
+       * sure to set requests==limits.
+       * The plugin sets ` --memory-limit` as well as `--nthreads` for the workers according to the limit.
+       * 
+ * + * .flyteidl.core.Resources resources = 3; + */ + public flyteidl.core.Tasks.ResourcesOrBuilder getResourcesOrBuilder() { + if (resourcesBuilder_ != null) { + return resourcesBuilder_.getMessageOrBuilder(); + } else { + return resources_ == null ? + flyteidl.core.Tasks.Resources.getDefaultInstance() : resources_; + } + } + /** + *
+       * Resources assigned to the all pods of the worker group.
+       * As per https://kubernetes.dask.org/en/latest/kubecluster.html?highlight=limit#best-practices 
+       * it is advised to only set limits. If requests are not explicitly set, the plugin will make
+       * sure to set requests==limits.
+       * The plugin sets ` --memory-limit` as well as `--nthreads` for the workers according to the limit.
+       * 
+ * + * .flyteidl.core.Resources resources = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + flyteidl.core.Tasks.Resources, flyteidl.core.Tasks.Resources.Builder, flyteidl.core.Tasks.ResourcesOrBuilder> + getResourcesFieldBuilder() { + if (resourcesBuilder_ == null) { + resourcesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + flyteidl.core.Tasks.Resources, flyteidl.core.Tasks.Resources.Builder, flyteidl.core.Tasks.ResourcesOrBuilder>( + getResources(), + getParentForChildren(), + isClean()); + resources_ = null; + } + return resourcesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flyteidl.plugins.DaskWorkerGroup) + } + + // @@protoc_insertion_point(class_scope:flyteidl.plugins.DaskWorkerGroup) + private static final flyteidl.plugins.Dask.DaskWorkerGroup DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new flyteidl.plugins.Dask.DaskWorkerGroup(); + } + + public static flyteidl.plugins.Dask.DaskWorkerGroup getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DaskWorkerGroup parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DaskWorkerGroup(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public flyteidl.plugins.Dask.DaskWorkerGroup getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flyteidl_plugins_DaskJob_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flyteidl_plugins_DaskJob_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flyteidl_plugins_DaskScheduler_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flyteidl_plugins_DaskScheduler_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flyteidl_plugins_DaskWorkerGroup_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flyteidl_plugins_DaskWorkerGroup_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\033flyteidl/plugins/dask.proto\022\020flyteidl." + + "plugins\032\031flyteidl/core/tasks.proto\"q\n\007Da" + + "skJob\0222\n\tscheduler\030\001 \001(\0132\037.flyteidl.plug" + + "ins.DaskScheduler\0222\n\007workers\030\002 \001(\0132!.fly" + + "teidl.plugins.DaskWorkerGroup\"K\n\rDaskSch" + + "eduler\022\r\n\005image\030\001 \001(\t\022+\n\tresources\030\002 \001(\013" + + "2\030.flyteidl.core.Resources\"h\n\017DaskWorker" + + "Group\022\031\n\021number_of_workers\030\001 \001(\r\022\r\n\005imag" + + "e\030\002 \001(\t\022+\n\tresources\030\003 \001(\0132\030.flyteidl.co" + + "re.ResourcesB9Z7github.com/flyteorg/flyt" + + "eidl/gen/pb-go/flyteidl/pluginsb\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + flyteidl.core.Tasks.getDescriptor(), + }, assigner); + internal_static_flyteidl_plugins_DaskJob_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_flyteidl_plugins_DaskJob_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flyteidl_plugins_DaskJob_descriptor, + new java.lang.String[] { "Scheduler", "Workers", }); + internal_static_flyteidl_plugins_DaskScheduler_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_flyteidl_plugins_DaskScheduler_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flyteidl_plugins_DaskScheduler_descriptor, + new java.lang.String[] { "Image", "Resources", }); + internal_static_flyteidl_plugins_DaskWorkerGroup_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_flyteidl_plugins_DaskWorkerGroup_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flyteidl_plugins_DaskWorkerGroup_descriptor, + new java.lang.String[] { "NumberOfWorkers", "Image", "Resources", }); + flyteidl.core.Tasks.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gen/pb_python/flyteidl/plugins/dask_pb2.py b/gen/pb_python/flyteidl/plugins/dask_pb2.py new file mode 100644 index 000000000..d9e4b1bb8 --- /dev/null +++ b/gen/pb_python/flyteidl/plugins/dask_pb2.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: flyteidl/plugins/dask.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from flyteidl.core import tasks_pb2 as flyteidl_dot_core_dot_tasks__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1b\x66lyteidl/plugins/dask.proto\x12\x10\x66lyteidl.plugins\x1a\x19\x66lyteidl/core/tasks.proto\"\x85\x01\n\x07\x44\x61skJob\x12=\n\tscheduler\x18\x01 \x01(\x0b\x32\x1f.flyteidl.plugins.DaskSchedulerR\tscheduler\x12;\n\x07workers\x18\x02 \x01(\x0b\x32!.flyteidl.plugins.DaskWorkerGroupR\x07workers\"]\n\rDaskScheduler\x12\x14\n\x05image\x18\x01 \x01(\tR\x05image\x12\x36\n\tresources\x18\x02 \x01(\x0b\x32\x18.flyteidl.core.ResourcesR\tresources\"\x8b\x01\n\x0f\x44\x61skWorkerGroup\x12*\n\x11number_of_workers\x18\x01 \x01(\rR\x0fnumberOfWorkers\x12\x14\n\x05image\x18\x02 \x01(\tR\x05image\x12\x36\n\tresources\x18\x03 \x01(\x0b\x32\x18.flyteidl.core.ResourcesR\tresourcesB\xbb\x01\n\x14\x63om.flyteidl.pluginsB\tDaskProtoP\x01Z7github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/plugins\xa2\x02\x03\x46PX\xaa\x02\x10\x46lyteidl.Plugins\xca\x02\x10\x46lyteidl\\Plugins\xe2\x02\x1c\x46lyteidl\\Plugins\\GPBMetadata\xea\x02\x11\x46lyteidl::Pluginsb\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'flyteidl.plugins.dask_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\024com.flyteidl.pluginsB\tDaskProtoP\001Z7github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/plugins\242\002\003FPX\252\002\020Flyteidl.Plugins\312\002\020Flyteidl\\Plugins\342\002\034Flyteidl\\Plugins\\GPBMetadata\352\002\021Flyteidl::Plugins' + _DASKJOB._serialized_start=77 + _DASKJOB._serialized_end=210 + _DASKSCHEDULER._serialized_start=212 + _DASKSCHEDULER._serialized_end=305 + _DASKWORKERGROUP._serialized_start=308 + _DASKWORKERGROUP._serialized_end=447 +# @@protoc_insertion_point(module_scope) diff --git a/gen/pb_python/flyteidl/plugins/dask_pb2.pyi b/gen/pb_python/flyteidl/plugins/dask_pb2.pyi new file mode 100644 index 000000000..dfbddf8d8 --- /dev/null +++ b/gen/pb_python/flyteidl/plugins/dask_pb2.pyi @@ -0,0 +1,32 @@ +from flyteidl.core import tasks_pb2 as _tasks_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class DaskJob(_message.Message): + __slots__ = ["scheduler", "workers"] + SCHEDULER_FIELD_NUMBER: _ClassVar[int] + WORKERS_FIELD_NUMBER: _ClassVar[int] + scheduler: DaskScheduler + workers: DaskWorkerGroup + def __init__(self, scheduler: _Optional[_Union[DaskScheduler, _Mapping]] = ..., workers: _Optional[_Union[DaskWorkerGroup, _Mapping]] = ...) -> None: ... + +class DaskScheduler(_message.Message): + __slots__ = ["image", "resources"] + IMAGE_FIELD_NUMBER: _ClassVar[int] + RESOURCES_FIELD_NUMBER: _ClassVar[int] + image: str + resources: _tasks_pb2.Resources + def __init__(self, image: _Optional[str] = ..., resources: _Optional[_Union[_tasks_pb2.Resources, _Mapping]] = ...) -> None: ... + +class DaskWorkerGroup(_message.Message): + __slots__ = ["image", "number_of_workers", "resources"] + IMAGE_FIELD_NUMBER: _ClassVar[int] + NUMBER_OF_WORKERS_FIELD_NUMBER: _ClassVar[int] + RESOURCES_FIELD_NUMBER: _ClassVar[int] + image: str + number_of_workers: int + resources: _tasks_pb2.Resources + def __init__(self, number_of_workers: _Optional[int] = ..., image: _Optional[str] = ..., resources: _Optional[_Union[_tasks_pb2.Resources, _Mapping]] = ...) -> None: ... diff --git a/gen/pb_python/flyteidl/plugins/dask_pb2_grpc.py b/gen/pb_python/flyteidl/plugins/dask_pb2_grpc.py new file mode 100644 index 000000000..2daafffeb --- /dev/null +++ b/gen/pb_python/flyteidl/plugins/dask_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/protos/docs/plugins/plugins.rst b/protos/docs/plugins/plugins.rst index d53688246..995dc7c08 100644 --- a/protos/docs/plugins/plugins.rst +++ b/protos/docs/plugins/plugins.rst @@ -38,6 +38,100 @@ will be executed concurrently. +.. + end messages + + +.. + end enums + + +.. + end HasExtensions + + +.. + end services + + + + +.. _ref_flyteidl/plugins/dask.proto: + +flyteidl/plugins/dask.proto +================================================================== + + + + + +.. _ref_flyteidl.plugins.DaskCluster: + +DaskCluster +------------------------------------------------------------------ + + + + + +.. csv-table:: DaskCluster type fields + :header: "Field", "Type", "Label", "Description" + :widths: auto + + "image", ":ref:`ref_string`", "", "Optional image to use for the scheduler as well as the default worker group. If unset, will use the default image." + "nWorkers", ":ref:`ref_int32`", "", "Number of workers in the default worker group" + "resources", ":ref:`ref_flyteidl.core.Resources`", "", "Resources assigned to the scheduler as well as all pods of the default worker group. As per https://kubernetes.dask.org/en/latest/kubecluster.html?highlight=limit#best-practices it is advised to only set limits. If requests are not explicitly set, the plugin will make sure to set requests==limits. The plugin sets ` --memory-limit` as well as `--nthreads` for the workers according to the limit." + + + + + + + +.. _ref_flyteidl.plugins.DaskJob: + +DaskJob +------------------------------------------------------------------ + +Custom Proto for Dask Plugin + + + +.. csv-table:: DaskJob type fields + :header: "Field", "Type", "Label", "Description" + :widths: auto + + "namespace", ":ref:`ref_string`", "", "Optional namespace to use for the dask pods. If none is given, the namespace of the Flyte task is used" + "jobPodSpec", ":ref:`ref_flyteidl.plugins.JobPodSpec`", "", "Spec for the job pod" + "cluster", ":ref:`ref_flyteidl.plugins.DaskCluster`", "", "Cluster" + + + + + + + +.. _ref_flyteidl.plugins.JobPodSpec: + +JobPodSpec +------------------------------------------------------------------ + +Specification for the job pod + + + +.. csv-table:: JobPodSpec type fields + :header: "Field", "Type", "Label", "Description" + :widths: auto + + "image", ":ref:`ref_string`", "", "Optional image to use. If unset, will use the default image." + "resources", ":ref:`ref_flyteidl.core.Resources`", "", "Resources assigned to the job pod." + + + + + + .. end messages diff --git a/protos/flyteidl/plugins/dask.proto b/protos/flyteidl/plugins/dask.proto new file mode 100644 index 000000000..32707b64a --- /dev/null +++ b/protos/flyteidl/plugins/dask.proto @@ -0,0 +1,41 @@ +syntax = "proto3"; + +import "flyteidl/core/tasks.proto"; + +package flyteidl.plugins; + +option go_package = "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/plugins"; + + +// Custom Proto for Dask Plugin. +message DaskJob { + // Spec for the scheduler pod. + DaskScheduler scheduler = 1; + + // Spec of the default worker group. + DaskWorkerGroup workers = 2; +} + +// Specification for the scheduler pod. +message DaskScheduler { + // Optional image to use. If unset, will use the default image. + string image = 1; + + // Resources assigned to the scheduler pod. + core.Resources resources = 2; +} + +message DaskWorkerGroup { + // Number of workers in the group. + uint32 number_of_workers = 1; + + // Optional image to use for the pods of the worker group. If unset, will use the default image. + string image = 2; + + // Resources assigned to the all pods of the worker group. + // As per https://kubernetes.dask.org/en/latest/kubecluster.html?highlight=limit#best-practices + // it is advised to only set limits. If requests are not explicitly set, the plugin will make + // sure to set requests==limits. + // The plugin sets ` --memory-limit` as well as `--nthreads` for the workers according to the limit. + core.Resources resources = 3; +}