diff --git a/flyteidl/boilerplate/update.cfg b/flyteidl/boilerplate/update.cfg index caa58e0db1..d163cc3e72 100644 --- a/flyteidl/boilerplate/update.cfg +++ b/flyteidl/boilerplate/update.cfg @@ -1,5 +1,4 @@ flyte/golang_test_targets flyte/golang_support_tools flyte/pull_request_template -flyte/welcome_bot flyte/code_of_conduct diff --git a/flyteidl/clients/go/admin/pkce/auth_flow_orchestrator.go b/flyteidl/clients/go/admin/pkce/auth_flow_orchestrator.go index 1d3414aefc..a915cdc709 100644 --- a/flyteidl/clients/go/admin/pkce/auth_flow_orchestrator.go +++ b/flyteidl/clients/go/admin/pkce/auth_flow_orchestrator.go @@ -112,7 +112,7 @@ func (f TokenOrchestrator) FetchTokenFromAuthFlow(ctx context.Context) (*oauth2. pkceCodeChallenge + "&code_challenge_method=S256" serveMux := http.NewServeMux() - server := &http.Server{Addr: redirectURL.Host, Handler: serveMux} + server := &http.Server{Addr: redirectURL.Host, Handler: serveMux, ReadHeaderTimeout: 0} // Register the call back handler serveMux.HandleFunc(redirectURL.Path, getAuthServerCallbackHandler(f.clientConfig, pkceCodeVerifier, tokenChannel, errorChannel, stateString)) // the oauth2 callback endpoint diff --git a/flyteidl/gen/pb-cpp/flyteidl/plugins/ray.grpc.pb.cc b/flyteidl/gen/pb-cpp/flyteidl/plugins/ray.grpc.pb.cc new file mode 100644 index 0000000000..035ec928b1 --- /dev/null +++ b/flyteidl/gen/pb-cpp/flyteidl/plugins/ray.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/ray.proto + +#include "flyteidl/plugins/ray.pb.h" +#include "flyteidl/plugins/ray.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/flyteidl/gen/pb-cpp/flyteidl/plugins/ray.grpc.pb.h b/flyteidl/gen/pb-cpp/flyteidl/plugins/ray.grpc.pb.h new file mode 100644 index 0000000000..44c8bae408 --- /dev/null +++ b/flyteidl/gen/pb-cpp/flyteidl/plugins/ray.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/ray.proto +#ifndef GRPC_flyteidl_2fplugins_2fray_2eproto__INCLUDED +#define GRPC_flyteidl_2fplugins_2fray_2eproto__INCLUDED + +#include "flyteidl/plugins/ray.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_2fray_2eproto__INCLUDED diff --git a/flyteidl/gen/pb-cpp/flyteidl/plugins/ray.pb.cc b/flyteidl/gen/pb-cpp/flyteidl/plugins/ray.pb.cc new file mode 100644 index 0000000000..a07cd16210 --- /dev/null +++ b/flyteidl/gen/pb-cpp/flyteidl/plugins/ray.pb.cc @@ -0,0 +1,2062 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: flyteidl/plugins/ray.proto + +#include "flyteidl/plugins/ray.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fplugins_2fray_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_HeadGroupSpec_RayStartParamsEntry_DoNotUse_flyteidl_2fplugins_2fray_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fplugins_2fray_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_WorkerGroupSpec_RayStartParamsEntry_DoNotUse_flyteidl_2fplugins_2fray_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fplugins_2fray_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_HeadGroupSpec_flyteidl_2fplugins_2fray_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fplugins_2fray_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_WorkerGroupSpec_flyteidl_2fplugins_2fray_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fplugins_2fray_2eproto ::google::protobuf::internal::SCCInfo<2> scc_info_RayCluster_flyteidl_2fplugins_2fray_2eproto; +namespace flyteidl { +namespace plugins { +class RayJobDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed _instance; +} _RayJob_default_instance_; +class RayClusterDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed _instance; +} _RayCluster_default_instance_; +class HeadGroupSpec_RayStartParamsEntry_DoNotUseDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed _instance; +} _HeadGroupSpec_RayStartParamsEntry_DoNotUse_default_instance_; +class HeadGroupSpecDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed _instance; +} _HeadGroupSpec_default_instance_; +class WorkerGroupSpec_RayStartParamsEntry_DoNotUseDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed _instance; +} _WorkerGroupSpec_RayStartParamsEntry_DoNotUse_default_instance_; +class WorkerGroupSpecDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed _instance; +} _WorkerGroupSpec_default_instance_; +} // namespace plugins +} // namespace flyteidl +static void InitDefaultsRayJob_flyteidl_2fplugins_2fray_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::flyteidl::plugins::_RayJob_default_instance_; + new (ptr) ::flyteidl::plugins::RayJob(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::flyteidl::plugins::RayJob::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<1> scc_info_RayJob_flyteidl_2fplugins_2fray_2eproto = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsRayJob_flyteidl_2fplugins_2fray_2eproto}, { + &scc_info_RayCluster_flyteidl_2fplugins_2fray_2eproto.base,}}; + +static void InitDefaultsRayCluster_flyteidl_2fplugins_2fray_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::flyteidl::plugins::_RayCluster_default_instance_; + new (ptr) ::flyteidl::plugins::RayCluster(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::flyteidl::plugins::RayCluster::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<2> scc_info_RayCluster_flyteidl_2fplugins_2fray_2eproto = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsRayCluster_flyteidl_2fplugins_2fray_2eproto}, { + &scc_info_HeadGroupSpec_flyteidl_2fplugins_2fray_2eproto.base, + &scc_info_WorkerGroupSpec_flyteidl_2fplugins_2fray_2eproto.base,}}; + +static void InitDefaultsHeadGroupSpec_RayStartParamsEntry_DoNotUse_flyteidl_2fplugins_2fray_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::flyteidl::plugins::_HeadGroupSpec_RayStartParamsEntry_DoNotUse_default_instance_; + new (ptr) ::flyteidl::plugins::HeadGroupSpec_RayStartParamsEntry_DoNotUse(); + } + ::flyteidl::plugins::HeadGroupSpec_RayStartParamsEntry_DoNotUse::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<0> scc_info_HeadGroupSpec_RayStartParamsEntry_DoNotUse_flyteidl_2fplugins_2fray_2eproto = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsHeadGroupSpec_RayStartParamsEntry_DoNotUse_flyteidl_2fplugins_2fray_2eproto}, {}}; + +static void InitDefaultsHeadGroupSpec_flyteidl_2fplugins_2fray_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::flyteidl::plugins::_HeadGroupSpec_default_instance_; + new (ptr) ::flyteidl::plugins::HeadGroupSpec(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::flyteidl::plugins::HeadGroupSpec::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<1> scc_info_HeadGroupSpec_flyteidl_2fplugins_2fray_2eproto = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsHeadGroupSpec_flyteidl_2fplugins_2fray_2eproto}, { + &scc_info_HeadGroupSpec_RayStartParamsEntry_DoNotUse_flyteidl_2fplugins_2fray_2eproto.base,}}; + +static void InitDefaultsWorkerGroupSpec_RayStartParamsEntry_DoNotUse_flyteidl_2fplugins_2fray_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::flyteidl::plugins::_WorkerGroupSpec_RayStartParamsEntry_DoNotUse_default_instance_; + new (ptr) ::flyteidl::plugins::WorkerGroupSpec_RayStartParamsEntry_DoNotUse(); + } + ::flyteidl::plugins::WorkerGroupSpec_RayStartParamsEntry_DoNotUse::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<0> scc_info_WorkerGroupSpec_RayStartParamsEntry_DoNotUse_flyteidl_2fplugins_2fray_2eproto = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsWorkerGroupSpec_RayStartParamsEntry_DoNotUse_flyteidl_2fplugins_2fray_2eproto}, {}}; + +static void InitDefaultsWorkerGroupSpec_flyteidl_2fplugins_2fray_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::flyteidl::plugins::_WorkerGroupSpec_default_instance_; + new (ptr) ::flyteidl::plugins::WorkerGroupSpec(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::flyteidl::plugins::WorkerGroupSpec::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<1> scc_info_WorkerGroupSpec_flyteidl_2fplugins_2fray_2eproto = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsWorkerGroupSpec_flyteidl_2fplugins_2fray_2eproto}, { + &scc_info_WorkerGroupSpec_RayStartParamsEntry_DoNotUse_flyteidl_2fplugins_2fray_2eproto.base,}}; + +void InitDefaults_flyteidl_2fplugins_2fray_2eproto() { + ::google::protobuf::internal::InitSCC(&scc_info_RayJob_flyteidl_2fplugins_2fray_2eproto.base); + ::google::protobuf::internal::InitSCC(&scc_info_RayCluster_flyteidl_2fplugins_2fray_2eproto.base); + ::google::protobuf::internal::InitSCC(&scc_info_HeadGroupSpec_RayStartParamsEntry_DoNotUse_flyteidl_2fplugins_2fray_2eproto.base); + ::google::protobuf::internal::InitSCC(&scc_info_HeadGroupSpec_flyteidl_2fplugins_2fray_2eproto.base); + ::google::protobuf::internal::InitSCC(&scc_info_WorkerGroupSpec_RayStartParamsEntry_DoNotUse_flyteidl_2fplugins_2fray_2eproto.base); + ::google::protobuf::internal::InitSCC(&scc_info_WorkerGroupSpec_flyteidl_2fplugins_2fray_2eproto.base); +} + +::google::protobuf::Metadata file_level_metadata_flyteidl_2fplugins_2fray_2eproto[6]; +constexpr ::google::protobuf::EnumDescriptor const** file_level_enum_descriptors_flyteidl_2fplugins_2fray_2eproto = nullptr; +constexpr ::google::protobuf::ServiceDescriptor const** file_level_service_descriptors_flyteidl_2fplugins_2fray_2eproto = nullptr; + +const ::google::protobuf::uint32 TableStruct_flyteidl_2fplugins_2fray_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::RayJob, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::RayJob, ray_cluster_), + PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::RayJob, runtime_env_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::RayCluster, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::RayCluster, head_group_spec_), + PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::RayCluster, worker_group_spec_), + PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::HeadGroupSpec_RayStartParamsEntry_DoNotUse, _has_bits_), + PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::HeadGroupSpec_RayStartParamsEntry_DoNotUse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::HeadGroupSpec_RayStartParamsEntry_DoNotUse, key_), + PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::HeadGroupSpec_RayStartParamsEntry_DoNotUse, value_), + 0, + 1, + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::HeadGroupSpec, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::HeadGroupSpec, ray_start_params_), + PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::WorkerGroupSpec_RayStartParamsEntry_DoNotUse, _has_bits_), + PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::WorkerGroupSpec_RayStartParamsEntry_DoNotUse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::WorkerGroupSpec_RayStartParamsEntry_DoNotUse, key_), + PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::WorkerGroupSpec_RayStartParamsEntry_DoNotUse, value_), + 0, + 1, + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::WorkerGroupSpec, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::WorkerGroupSpec, group_name_), + PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::WorkerGroupSpec, replicas_), + PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::WorkerGroupSpec, min_replicas_), + PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::WorkerGroupSpec, max_replicas_), + PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::WorkerGroupSpec, ray_start_params_), +}; +static const ::google::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, sizeof(::flyteidl::plugins::RayJob)}, + { 7, -1, sizeof(::flyteidl::plugins::RayCluster)}, + { 14, 21, sizeof(::flyteidl::plugins::HeadGroupSpec_RayStartParamsEntry_DoNotUse)}, + { 23, -1, sizeof(::flyteidl::plugins::HeadGroupSpec)}, + { 29, 36, sizeof(::flyteidl::plugins::WorkerGroupSpec_RayStartParamsEntry_DoNotUse)}, + { 38, -1, sizeof(::flyteidl::plugins::WorkerGroupSpec)}, +}; + +static ::google::protobuf::Message const * const file_default_instances[] = { + reinterpret_cast(&::flyteidl::plugins::_RayJob_default_instance_), + reinterpret_cast(&::flyteidl::plugins::_RayCluster_default_instance_), + reinterpret_cast(&::flyteidl::plugins::_HeadGroupSpec_RayStartParamsEntry_DoNotUse_default_instance_), + reinterpret_cast(&::flyteidl::plugins::_HeadGroupSpec_default_instance_), + reinterpret_cast(&::flyteidl::plugins::_WorkerGroupSpec_RayStartParamsEntry_DoNotUse_default_instance_), + reinterpret_cast(&::flyteidl::plugins::_WorkerGroupSpec_default_instance_), +}; + +::google::protobuf::internal::AssignDescriptorsTable assign_descriptors_table_flyteidl_2fplugins_2fray_2eproto = { + {}, AddDescriptors_flyteidl_2fplugins_2fray_2eproto, "flyteidl/plugins/ray.proto", schemas, + file_default_instances, TableStruct_flyteidl_2fplugins_2fray_2eproto::offsets, + file_level_metadata_flyteidl_2fplugins_2fray_2eproto, 6, file_level_enum_descriptors_flyteidl_2fplugins_2fray_2eproto, file_level_service_descriptors_flyteidl_2fplugins_2fray_2eproto, +}; + +const char descriptor_table_protodef_flyteidl_2fplugins_2fray_2eproto[] = + "\n\032flyteidl/plugins/ray.proto\022\020flyteidl.p" + "lugins\032\037google/protobuf/timestamp.proto\"" + "P\n\006RayJob\0221\n\013ray_cluster\030\001 \001(\0132\034.flyteid" + "l.plugins.RayCluster\022\023\n\013runtime_env\030\002 \001(" + "\t\"\204\001\n\nRayCluster\0228\n\017head_group_spec\030\001 \001(" + "\0132\037.flyteidl.plugins.HeadGroupSpec\022<\n\021wo" + "rker_group_spec\030\002 \003(\0132!.flyteidl.plugins" + ".WorkerGroupSpec\"\225\001\n\rHeadGroupSpec\022M\n\020ra" + "y_start_params\030\001 \003(\01323.flyteidl.plugins." + "HeadGroupSpec.RayStartParamsEntry\0325\n\023Ray" + "StartParamsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002" + " \001(\t:\0028\001\"\353\001\n\017WorkerGroupSpec\022\022\n\ngroup_na" + "me\030\001 \001(\t\022\020\n\010replicas\030\002 \001(\005\022\024\n\014min_replic" + "as\030\003 \001(\005\022\024\n\014max_replicas\030\004 \001(\005\022O\n\020ray_st" + "art_params\030\005 \003(\01325.flyteidl.plugins.Work" + "erGroupSpec.RayStartParamsEntry\0325\n\023RaySt" + "artParamsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001" + "(\t:\0028\001B9Z7github.com/flyteorg/flyteidl/g" + "en/pb-go/flyteidl/pluginsb\006proto3" + ; +::google::protobuf::internal::DescriptorTable descriptor_table_flyteidl_2fplugins_2fray_2eproto = { + false, InitDefaults_flyteidl_2fplugins_2fray_2eproto, + descriptor_table_protodef_flyteidl_2fplugins_2fray_2eproto, + "flyteidl/plugins/ray.proto", &assign_descriptors_table_flyteidl_2fplugins_2fray_2eproto, 753, +}; + +void AddDescriptors_flyteidl_2fplugins_2fray_2eproto() { + static constexpr ::google::protobuf::internal::InitFunc deps[1] = + { + ::AddDescriptors_google_2fprotobuf_2ftimestamp_2eproto, + }; + ::google::protobuf::internal::AddDescriptors(&descriptor_table_flyteidl_2fplugins_2fray_2eproto, deps, 1); +} + +// Force running AddDescriptors() at dynamic initialization time. +static bool dynamic_init_dummy_flyteidl_2fplugins_2fray_2eproto = []() { AddDescriptors_flyteidl_2fplugins_2fray_2eproto(); return true; }(); +namespace flyteidl { +namespace plugins { + +// =================================================================== + +void RayJob::InitAsDefaultInstance() { + ::flyteidl::plugins::_RayJob_default_instance_._instance.get_mutable()->ray_cluster_ = const_cast< ::flyteidl::plugins::RayCluster*>( + ::flyteidl::plugins::RayCluster::internal_default_instance()); +} +class RayJob::HasBitSetters { + public: + static const ::flyteidl::plugins::RayCluster& ray_cluster(const RayJob* msg); +}; + +const ::flyteidl::plugins::RayCluster& +RayJob::HasBitSetters::ray_cluster(const RayJob* msg) { + return *msg->ray_cluster_; +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int RayJob::kRayClusterFieldNumber; +const int RayJob::kRuntimeEnvFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +RayJob::RayJob() + : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:flyteidl.plugins.RayJob) +} +RayJob::RayJob(const RayJob& from) + : ::google::protobuf::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + runtime_env_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.runtime_env().size() > 0) { + runtime_env_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.runtime_env_); + } + if (from.has_ray_cluster()) { + ray_cluster_ = new ::flyteidl::plugins::RayCluster(*from.ray_cluster_); + } else { + ray_cluster_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:flyteidl.plugins.RayJob) +} + +void RayJob::SharedCtor() { + ::google::protobuf::internal::InitSCC( + &scc_info_RayJob_flyteidl_2fplugins_2fray_2eproto.base); + runtime_env_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ray_cluster_ = nullptr; +} + +RayJob::~RayJob() { + // @@protoc_insertion_point(destructor:flyteidl.plugins.RayJob) + SharedDtor(); +} + +void RayJob::SharedDtor() { + runtime_env_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) delete ray_cluster_; +} + +void RayJob::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const RayJob& RayJob::default_instance() { + ::google::protobuf::internal::InitSCC(&::scc_info_RayJob_flyteidl_2fplugins_2fray_2eproto.base); + return *internal_default_instance(); +} + + +void RayJob::Clear() { +// @@protoc_insertion_point(message_clear_start:flyteidl.plugins.RayJob) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + runtime_env_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (GetArenaNoVirtual() == nullptr && ray_cluster_ != nullptr) { + delete ray_cluster_; + } + ray_cluster_ = nullptr; + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* RayJob::_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.RayCluster ray_cluster = 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::RayCluster::_InternalParse; + object = msg->mutable_ray_cluster(); + 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; + } + // string runtime_env = 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.RayJob.runtime_env"); + object = msg->mutable_runtime_env(); + 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; + } + 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 RayJob::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.RayJob) + 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.RayCluster ray_cluster = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, mutable_ray_cluster())); + } else { + goto handle_unusual; + } + break; + } + + // string runtime_env = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_runtime_env())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->runtime_env().data(), static_cast(this->runtime_env().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "flyteidl.plugins.RayJob.runtime_env")); + } 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.RayJob) + return true; +failure: + // @@protoc_insertion_point(parse_failure:flyteidl.plugins.RayJob) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void RayJob::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:flyteidl.plugins.RayJob) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .flyteidl.plugins.RayCluster ray_cluster = 1; + if (this->has_ray_cluster()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, HasBitSetters::ray_cluster(this), output); + } + + // string runtime_env = 2; + if (this->runtime_env().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->runtime_env().data(), static_cast(this->runtime_env().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "flyteidl.plugins.RayJob.runtime_env"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->runtime_env(), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:flyteidl.plugins.RayJob) +} + +::google::protobuf::uint8* RayJob::InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:flyteidl.plugins.RayJob) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .flyteidl.plugins.RayCluster ray_cluster = 1; + if (this->has_ray_cluster()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 1, HasBitSetters::ray_cluster(this), target); + } + + // string runtime_env = 2; + if (this->runtime_env().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->runtime_env().data(), static_cast(this->runtime_env().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "flyteidl.plugins.RayJob.runtime_env"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->runtime_env(), 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.RayJob) + return target; +} + +size_t RayJob::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:flyteidl.plugins.RayJob) + 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 runtime_env = 2; + if (this->runtime_env().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->runtime_env()); + } + + // .flyteidl.plugins.RayCluster ray_cluster = 1; + if (this->has_ray_cluster()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize( + *ray_cluster_); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void RayJob::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:flyteidl.plugins.RayJob) + GOOGLE_DCHECK_NE(&from, this); + const RayJob* source = + ::google::protobuf::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:flyteidl.plugins.RayJob) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:flyteidl.plugins.RayJob) + MergeFrom(*source); + } +} + +void RayJob::MergeFrom(const RayJob& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:flyteidl.plugins.RayJob) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.runtime_env().size() > 0) { + + runtime_env_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.runtime_env_); + } + if (from.has_ray_cluster()) { + mutable_ray_cluster()->::flyteidl::plugins::RayCluster::MergeFrom(from.ray_cluster()); + } +} + +void RayJob::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:flyteidl.plugins.RayJob) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void RayJob::CopyFrom(const RayJob& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:flyteidl.plugins.RayJob) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool RayJob::IsInitialized() const { + return true; +} + +void RayJob::Swap(RayJob* other) { + if (other == this) return; + InternalSwap(other); +} +void RayJob::InternalSwap(RayJob* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + runtime_env_.Swap(&other->runtime_env_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(ray_cluster_, other->ray_cluster_); +} + +::google::protobuf::Metadata RayJob::GetMetadata() const { + ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_flyteidl_2fplugins_2fray_2eproto); + return ::file_level_metadata_flyteidl_2fplugins_2fray_2eproto[kIndexInFileMessages]; +} + + +// =================================================================== + +void RayCluster::InitAsDefaultInstance() { + ::flyteidl::plugins::_RayCluster_default_instance_._instance.get_mutable()->head_group_spec_ = const_cast< ::flyteidl::plugins::HeadGroupSpec*>( + ::flyteidl::plugins::HeadGroupSpec::internal_default_instance()); +} +class RayCluster::HasBitSetters { + public: + static const ::flyteidl::plugins::HeadGroupSpec& head_group_spec(const RayCluster* msg); +}; + +const ::flyteidl::plugins::HeadGroupSpec& +RayCluster::HasBitSetters::head_group_spec(const RayCluster* msg) { + return *msg->head_group_spec_; +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int RayCluster::kHeadGroupSpecFieldNumber; +const int RayCluster::kWorkerGroupSpecFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +RayCluster::RayCluster() + : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:flyteidl.plugins.RayCluster) +} +RayCluster::RayCluster(const RayCluster& from) + : ::google::protobuf::Message(), + _internal_metadata_(nullptr), + worker_group_spec_(from.worker_group_spec_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from.has_head_group_spec()) { + head_group_spec_ = new ::flyteidl::plugins::HeadGroupSpec(*from.head_group_spec_); + } else { + head_group_spec_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:flyteidl.plugins.RayCluster) +} + +void RayCluster::SharedCtor() { + ::google::protobuf::internal::InitSCC( + &scc_info_RayCluster_flyteidl_2fplugins_2fray_2eproto.base); + head_group_spec_ = nullptr; +} + +RayCluster::~RayCluster() { + // @@protoc_insertion_point(destructor:flyteidl.plugins.RayCluster) + SharedDtor(); +} + +void RayCluster::SharedDtor() { + if (this != internal_default_instance()) delete head_group_spec_; +} + +void RayCluster::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const RayCluster& RayCluster::default_instance() { + ::google::protobuf::internal::InitSCC(&::scc_info_RayCluster_flyteidl_2fplugins_2fray_2eproto.base); + return *internal_default_instance(); +} + + +void RayCluster::Clear() { +// @@protoc_insertion_point(message_clear_start:flyteidl.plugins.RayCluster) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + worker_group_spec_.Clear(); + if (GetArenaNoVirtual() == nullptr && head_group_spec_ != nullptr) { + delete head_group_spec_; + } + head_group_spec_ = nullptr; + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* RayCluster::_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.HeadGroupSpec head_group_spec = 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::HeadGroupSpec::_InternalParse; + object = msg->mutable_head_group_spec(); + 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; + } + // repeated .flyteidl.plugins.WorkerGroupSpec worker_group_spec = 2; + case 2: { + if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; + do { + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + parser_till_end = ::flyteidl::plugins::WorkerGroupSpec::_InternalParse; + object = msg->add_worker_group_spec(); + if (size > end - ptr) goto len_delim_till_end; + ptr += size; + GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( + {parser_till_end, object}, ptr - size, ptr)); + if (ptr >= end) break; + } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 18 && (ptr += 1)); + 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 RayCluster::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.RayCluster) + 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.HeadGroupSpec head_group_spec = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, mutable_head_group_spec())); + } else { + goto handle_unusual; + } + break; + } + + // repeated .flyteidl.plugins.WorkerGroupSpec worker_group_spec = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, add_worker_group_spec())); + } 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.RayCluster) + return true; +failure: + // @@protoc_insertion_point(parse_failure:flyteidl.plugins.RayCluster) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void RayCluster::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:flyteidl.plugins.RayCluster) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .flyteidl.plugins.HeadGroupSpec head_group_spec = 1; + if (this->has_head_group_spec()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, HasBitSetters::head_group_spec(this), output); + } + + // repeated .flyteidl.plugins.WorkerGroupSpec worker_group_spec = 2; + for (unsigned int i = 0, + n = static_cast(this->worker_group_spec_size()); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, + this->worker_group_spec(static_cast(i)), + output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:flyteidl.plugins.RayCluster) +} + +::google::protobuf::uint8* RayCluster::InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:flyteidl.plugins.RayCluster) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .flyteidl.plugins.HeadGroupSpec head_group_spec = 1; + if (this->has_head_group_spec()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 1, HasBitSetters::head_group_spec(this), target); + } + + // repeated .flyteidl.plugins.WorkerGroupSpec worker_group_spec = 2; + for (unsigned int i = 0, + n = static_cast(this->worker_group_spec_size()); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 2, this->worker_group_spec(static_cast(i)), 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.RayCluster) + return target; +} + +size_t RayCluster::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:flyteidl.plugins.RayCluster) + 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; + + // repeated .flyteidl.plugins.WorkerGroupSpec worker_group_spec = 2; + { + unsigned int count = static_cast(this->worker_group_spec_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSize( + this->worker_group_spec(static_cast(i))); + } + } + + // .flyteidl.plugins.HeadGroupSpec head_group_spec = 1; + if (this->has_head_group_spec()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize( + *head_group_spec_); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void RayCluster::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:flyteidl.plugins.RayCluster) + GOOGLE_DCHECK_NE(&from, this); + const RayCluster* source = + ::google::protobuf::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:flyteidl.plugins.RayCluster) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:flyteidl.plugins.RayCluster) + MergeFrom(*source); + } +} + +void RayCluster::MergeFrom(const RayCluster& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:flyteidl.plugins.RayCluster) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + worker_group_spec_.MergeFrom(from.worker_group_spec_); + if (from.has_head_group_spec()) { + mutable_head_group_spec()->::flyteidl::plugins::HeadGroupSpec::MergeFrom(from.head_group_spec()); + } +} + +void RayCluster::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:flyteidl.plugins.RayCluster) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void RayCluster::CopyFrom(const RayCluster& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:flyteidl.plugins.RayCluster) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool RayCluster::IsInitialized() const { + return true; +} + +void RayCluster::Swap(RayCluster* other) { + if (other == this) return; + InternalSwap(other); +} +void RayCluster::InternalSwap(RayCluster* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + CastToBase(&worker_group_spec_)->InternalSwap(CastToBase(&other->worker_group_spec_)); + swap(head_group_spec_, other->head_group_spec_); +} + +::google::protobuf::Metadata RayCluster::GetMetadata() const { + ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_flyteidl_2fplugins_2fray_2eproto); + return ::file_level_metadata_flyteidl_2fplugins_2fray_2eproto[kIndexInFileMessages]; +} + + +// =================================================================== + +HeadGroupSpec_RayStartParamsEntry_DoNotUse::HeadGroupSpec_RayStartParamsEntry_DoNotUse() {} +HeadGroupSpec_RayStartParamsEntry_DoNotUse::HeadGroupSpec_RayStartParamsEntry_DoNotUse(::google::protobuf::Arena* arena) + : SuperType(arena) {} +void HeadGroupSpec_RayStartParamsEntry_DoNotUse::MergeFrom(const HeadGroupSpec_RayStartParamsEntry_DoNotUse& other) { + MergeFromInternal(other); +} +::google::protobuf::Metadata HeadGroupSpec_RayStartParamsEntry_DoNotUse::GetMetadata() const { + ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_flyteidl_2fplugins_2fray_2eproto); + return ::file_level_metadata_flyteidl_2fplugins_2fray_2eproto[2]; +} +void HeadGroupSpec_RayStartParamsEntry_DoNotUse::MergeFrom( + const ::google::protobuf::Message& other) { + ::google::protobuf::Message::MergeFrom(other); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool HeadGroupSpec_RayStartParamsEntry_DoNotUse::_ParseMap(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx) { + using MF = ::google::protobuf::internal::MapField< + HeadGroupSpec_RayStartParamsEntry_DoNotUse, EntryKeyType, EntryValueType, + kEntryKeyFieldType, kEntryValueFieldType, + kEntryDefaultEnumValue>; + auto mf = static_cast(object); + Parser> parser(mf); +#define DO_(x) if (!(x)) return false + DO_(parser.ParseMap(begin, end)); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + parser.key().data(), static_cast(parser.key().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "flyteidl.plugins.HeadGroupSpec.RayStartParamsEntry.key")); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + parser.value().data(), static_cast(parser.value().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "flyteidl.plugins.HeadGroupSpec.RayStartParamsEntry.value")); +#undef DO_ + return true; +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + + +// =================================================================== + +void HeadGroupSpec::InitAsDefaultInstance() { +} +class HeadGroupSpec::HasBitSetters { + public: +}; + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int HeadGroupSpec::kRayStartParamsFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +HeadGroupSpec::HeadGroupSpec() + : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:flyteidl.plugins.HeadGroupSpec) +} +HeadGroupSpec::HeadGroupSpec(const HeadGroupSpec& from) + : ::google::protobuf::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + ray_start_params_.MergeFrom(from.ray_start_params_); + // @@protoc_insertion_point(copy_constructor:flyteidl.plugins.HeadGroupSpec) +} + +void HeadGroupSpec::SharedCtor() { + ::google::protobuf::internal::InitSCC( + &scc_info_HeadGroupSpec_flyteidl_2fplugins_2fray_2eproto.base); +} + +HeadGroupSpec::~HeadGroupSpec() { + // @@protoc_insertion_point(destructor:flyteidl.plugins.HeadGroupSpec) + SharedDtor(); +} + +void HeadGroupSpec::SharedDtor() { +} + +void HeadGroupSpec::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const HeadGroupSpec& HeadGroupSpec::default_instance() { + ::google::protobuf::internal::InitSCC(&::scc_info_HeadGroupSpec_flyteidl_2fplugins_2fray_2eproto.base); + return *internal_default_instance(); +} + + +void HeadGroupSpec::Clear() { +// @@protoc_insertion_point(message_clear_start:flyteidl.plugins.HeadGroupSpec) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ray_start_params_.Clear(); + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* HeadGroupSpec::_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) { + // map ray_start_params = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; + do { + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + parser_till_end = ::google::protobuf::internal::SlowMapEntryParser; + auto parse_map = ::flyteidl::plugins::HeadGroupSpec_RayStartParamsEntry_DoNotUse::_ParseMap; + ctx->extra_parse_data().payload.clear(); + ctx->extra_parse_data().parse_map = parse_map; + object = &msg->ray_start_params_; + if (size > end - ptr) goto len_delim_till_end; + auto newend = ptr + size; + GOOGLE_PROTOBUF_PARSER_ASSERT(parse_map(ptr, newend, object, ctx)); + ptr = newend; + if (ptr >= end) break; + } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 10 && (ptr += 1)); + 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 HeadGroupSpec::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.HeadGroupSpec) + 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)) { + // map ray_start_params = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { + HeadGroupSpec_RayStartParamsEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField< + HeadGroupSpec_RayStartParamsEntry_DoNotUse, + ::std::string, ::std::string, + ::google::protobuf::internal::WireFormatLite::TYPE_STRING, + ::google::protobuf::internal::WireFormatLite::TYPE_STRING, + 0 >, + ::google::protobuf::Map< ::std::string, ::std::string > > parser(&ray_start_params_); + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, &parser)); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + parser.key().data(), static_cast(parser.key().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "flyteidl.plugins.HeadGroupSpec.RayStartParamsEntry.key")); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + parser.value().data(), static_cast(parser.value().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "flyteidl.plugins.HeadGroupSpec.RayStartParamsEntry.value")); + } 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.HeadGroupSpec) + return true; +failure: + // @@protoc_insertion_point(parse_failure:flyteidl.plugins.HeadGroupSpec) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void HeadGroupSpec::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:flyteidl.plugins.HeadGroupSpec) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // map ray_start_params = 1; + if (!this->ray_start_params().empty()) { + typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer + ConstPtr; + typedef ConstPtr SortItem; + typedef ::google::protobuf::internal::CompareByDerefFirst Less; + struct Utf8Check { + static void Check(ConstPtr p) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + p->first.data(), static_cast(p->first.length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "flyteidl.plugins.HeadGroupSpec.RayStartParamsEntry.key"); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + p->second.data(), static_cast(p->second.length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "flyteidl.plugins.HeadGroupSpec.RayStartParamsEntry.value"); + } + }; + + if (output->IsSerializationDeterministic() && + this->ray_start_params().size() > 1) { + ::std::unique_ptr items( + new SortItem[this->ray_start_params().size()]); + typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type; + size_type n = 0; + for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator + it = this->ray_start_params().begin(); + it != this->ray_start_params().end(); ++it, ++n) { + items[static_cast(n)] = SortItem(&*it); + } + ::std::sort(&items[0], &items[static_cast(n)], Less()); + ::std::unique_ptr entry; + for (size_type i = 0; i < n; i++) { + entry.reset(ray_start_params_.NewEntryWrapper(items[static_cast(i)]->first, items[static_cast(i)]->second)); + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(1, *entry, output); + Utf8Check::Check(&(*items[static_cast(i)])); + } + } else { + ::std::unique_ptr entry; + for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator + it = this->ray_start_params().begin(); + it != this->ray_start_params().end(); ++it) { + entry.reset(ray_start_params_.NewEntryWrapper(it->first, it->second)); + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(1, *entry, output); + Utf8Check::Check(&(*it)); + } + } + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:flyteidl.plugins.HeadGroupSpec) +} + +::google::protobuf::uint8* HeadGroupSpec::InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:flyteidl.plugins.HeadGroupSpec) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // map ray_start_params = 1; + if (!this->ray_start_params().empty()) { + typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer + ConstPtr; + typedef ConstPtr SortItem; + typedef ::google::protobuf::internal::CompareByDerefFirst Less; + struct Utf8Check { + static void Check(ConstPtr p) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + p->first.data(), static_cast(p->first.length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "flyteidl.plugins.HeadGroupSpec.RayStartParamsEntry.key"); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + p->second.data(), static_cast(p->second.length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "flyteidl.plugins.HeadGroupSpec.RayStartParamsEntry.value"); + } + }; + + if (false && + this->ray_start_params().size() > 1) { + ::std::unique_ptr items( + new SortItem[this->ray_start_params().size()]); + typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type; + size_type n = 0; + for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator + it = this->ray_start_params().begin(); + it != this->ray_start_params().end(); ++it, ++n) { + items[static_cast(n)] = SortItem(&*it); + } + ::std::sort(&items[0], &items[static_cast(n)], Less()); + ::std::unique_ptr entry; + for (size_type i = 0; i < n; i++) { + entry.reset(ray_start_params_.NewEntryWrapper(items[static_cast(i)]->first, items[static_cast(i)]->second)); + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessageNoVirtualToArray(1, *entry, target); + Utf8Check::Check(&(*items[static_cast(i)])); + } + } else { + ::std::unique_ptr entry; + for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator + it = this->ray_start_params().begin(); + it != this->ray_start_params().end(); ++it) { + entry.reset(ray_start_params_.NewEntryWrapper(it->first, it->second)); + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessageNoVirtualToArray(1, *entry, target); + Utf8Check::Check(&(*it)); + } + } + } + + 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.HeadGroupSpec) + return target; +} + +size_t HeadGroupSpec::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:flyteidl.plugins.HeadGroupSpec) + 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; + + // map ray_start_params = 1; + total_size += 1 * + ::google::protobuf::internal::FromIntSize(this->ray_start_params_size()); + { + ::std::unique_ptr entry; + for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator + it = this->ray_start_params().begin(); + it != this->ray_start_params().end(); ++it) { + entry.reset(ray_start_params_.NewEntryWrapper(it->first, it->second)); + total_size += ::google::protobuf::internal::WireFormatLite:: + MessageSizeNoVirtual(*entry); + } + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void HeadGroupSpec::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:flyteidl.plugins.HeadGroupSpec) + GOOGLE_DCHECK_NE(&from, this); + const HeadGroupSpec* source = + ::google::protobuf::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:flyteidl.plugins.HeadGroupSpec) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:flyteidl.plugins.HeadGroupSpec) + MergeFrom(*source); + } +} + +void HeadGroupSpec::MergeFrom(const HeadGroupSpec& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:flyteidl.plugins.HeadGroupSpec) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + ray_start_params_.MergeFrom(from.ray_start_params_); +} + +void HeadGroupSpec::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:flyteidl.plugins.HeadGroupSpec) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void HeadGroupSpec::CopyFrom(const HeadGroupSpec& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:flyteidl.plugins.HeadGroupSpec) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool HeadGroupSpec::IsInitialized() const { + return true; +} + +void HeadGroupSpec::Swap(HeadGroupSpec* other) { + if (other == this) return; + InternalSwap(other); +} +void HeadGroupSpec::InternalSwap(HeadGroupSpec* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + ray_start_params_.Swap(&other->ray_start_params_); +} + +::google::protobuf::Metadata HeadGroupSpec::GetMetadata() const { + ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_flyteidl_2fplugins_2fray_2eproto); + return ::file_level_metadata_flyteidl_2fplugins_2fray_2eproto[kIndexInFileMessages]; +} + + +// =================================================================== + +WorkerGroupSpec_RayStartParamsEntry_DoNotUse::WorkerGroupSpec_RayStartParamsEntry_DoNotUse() {} +WorkerGroupSpec_RayStartParamsEntry_DoNotUse::WorkerGroupSpec_RayStartParamsEntry_DoNotUse(::google::protobuf::Arena* arena) + : SuperType(arena) {} +void WorkerGroupSpec_RayStartParamsEntry_DoNotUse::MergeFrom(const WorkerGroupSpec_RayStartParamsEntry_DoNotUse& other) { + MergeFromInternal(other); +} +::google::protobuf::Metadata WorkerGroupSpec_RayStartParamsEntry_DoNotUse::GetMetadata() const { + ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_flyteidl_2fplugins_2fray_2eproto); + return ::file_level_metadata_flyteidl_2fplugins_2fray_2eproto[4]; +} +void WorkerGroupSpec_RayStartParamsEntry_DoNotUse::MergeFrom( + const ::google::protobuf::Message& other) { + ::google::protobuf::Message::MergeFrom(other); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool WorkerGroupSpec_RayStartParamsEntry_DoNotUse::_ParseMap(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx) { + using MF = ::google::protobuf::internal::MapField< + WorkerGroupSpec_RayStartParamsEntry_DoNotUse, EntryKeyType, EntryValueType, + kEntryKeyFieldType, kEntryValueFieldType, + kEntryDefaultEnumValue>; + auto mf = static_cast(object); + Parser> parser(mf); +#define DO_(x) if (!(x)) return false + DO_(parser.ParseMap(begin, end)); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + parser.key().data(), static_cast(parser.key().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "flyteidl.plugins.WorkerGroupSpec.RayStartParamsEntry.key")); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + parser.value().data(), static_cast(parser.value().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "flyteidl.plugins.WorkerGroupSpec.RayStartParamsEntry.value")); +#undef DO_ + return true; +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + + +// =================================================================== + +void WorkerGroupSpec::InitAsDefaultInstance() { +} +class WorkerGroupSpec::HasBitSetters { + public: +}; + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int WorkerGroupSpec::kGroupNameFieldNumber; +const int WorkerGroupSpec::kReplicasFieldNumber; +const int WorkerGroupSpec::kMinReplicasFieldNumber; +const int WorkerGroupSpec::kMaxReplicasFieldNumber; +const int WorkerGroupSpec::kRayStartParamsFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +WorkerGroupSpec::WorkerGroupSpec() + : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:flyteidl.plugins.WorkerGroupSpec) +} +WorkerGroupSpec::WorkerGroupSpec(const WorkerGroupSpec& from) + : ::google::protobuf::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + ray_start_params_.MergeFrom(from.ray_start_params_); + group_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.group_name().size() > 0) { + group_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.group_name_); + } + ::memcpy(&replicas_, &from.replicas_, + static_cast(reinterpret_cast(&max_replicas_) - + reinterpret_cast(&replicas_)) + sizeof(max_replicas_)); + // @@protoc_insertion_point(copy_constructor:flyteidl.plugins.WorkerGroupSpec) +} + +void WorkerGroupSpec::SharedCtor() { + ::google::protobuf::internal::InitSCC( + &scc_info_WorkerGroupSpec_flyteidl_2fplugins_2fray_2eproto.base); + group_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::memset(&replicas_, 0, static_cast( + reinterpret_cast(&max_replicas_) - + reinterpret_cast(&replicas_)) + sizeof(max_replicas_)); +} + +WorkerGroupSpec::~WorkerGroupSpec() { + // @@protoc_insertion_point(destructor:flyteidl.plugins.WorkerGroupSpec) + SharedDtor(); +} + +void WorkerGroupSpec::SharedDtor() { + group_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +void WorkerGroupSpec::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const WorkerGroupSpec& WorkerGroupSpec::default_instance() { + ::google::protobuf::internal::InitSCC(&::scc_info_WorkerGroupSpec_flyteidl_2fplugins_2fray_2eproto.base); + return *internal_default_instance(); +} + + +void WorkerGroupSpec::Clear() { +// @@protoc_insertion_point(message_clear_start:flyteidl.plugins.WorkerGroupSpec) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ray_start_params_.Clear(); + group_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::memset(&replicas_, 0, static_cast( + reinterpret_cast(&max_replicas_) - + reinterpret_cast(&replicas_)) + sizeof(max_replicas_)); + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* WorkerGroupSpec::_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 group_name = 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.WorkerGroupSpec.group_name"); + object = msg->mutable_group_name(); + 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; + } + // int32 replicas = 2; + case 2: { + if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; + msg->set_replicas(::google::protobuf::internal::ReadVarint(&ptr)); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + break; + } + // int32 min_replicas = 3; + case 3: { + if (static_cast<::google::protobuf::uint8>(tag) != 24) goto handle_unusual; + msg->set_min_replicas(::google::protobuf::internal::ReadVarint(&ptr)); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + break; + } + // int32 max_replicas = 4; + case 4: { + if (static_cast<::google::protobuf::uint8>(tag) != 32) goto handle_unusual; + msg->set_max_replicas(::google::protobuf::internal::ReadVarint(&ptr)); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + break; + } + // map ray_start_params = 5; + case 5: { + if (static_cast<::google::protobuf::uint8>(tag) != 42) goto handle_unusual; + do { + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + parser_till_end = ::google::protobuf::internal::SlowMapEntryParser; + auto parse_map = ::flyteidl::plugins::WorkerGroupSpec_RayStartParamsEntry_DoNotUse::_ParseMap; + ctx->extra_parse_data().payload.clear(); + ctx->extra_parse_data().parse_map = parse_map; + object = &msg->ray_start_params_; + if (size > end - ptr) goto len_delim_till_end; + auto newend = ptr + size; + GOOGLE_PROTOBUF_PARSER_ASSERT(parse_map(ptr, newend, object, ctx)); + ptr = newend; + if (ptr >= end) break; + } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 42 && (ptr += 1)); + 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 WorkerGroupSpec::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.WorkerGroupSpec) + 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 group_name = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_group_name())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->group_name().data(), static_cast(this->group_name().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "flyteidl.plugins.WorkerGroupSpec.group_name")); + } else { + goto handle_unusual; + } + break; + } + + // int32 replicas = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) { + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, &replicas_))); + } else { + goto handle_unusual; + } + break; + } + + // int32 min_replicas = 3; + case 3: { + if (static_cast< ::google::protobuf::uint8>(tag) == (24 & 0xFF)) { + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, &min_replicas_))); + } else { + goto handle_unusual; + } + break; + } + + // int32 max_replicas = 4; + case 4: { + if (static_cast< ::google::protobuf::uint8>(tag) == (32 & 0xFF)) { + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, &max_replicas_))); + } else { + goto handle_unusual; + } + break; + } + + // map ray_start_params = 5; + case 5: { + if (static_cast< ::google::protobuf::uint8>(tag) == (42 & 0xFF)) { + WorkerGroupSpec_RayStartParamsEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField< + WorkerGroupSpec_RayStartParamsEntry_DoNotUse, + ::std::string, ::std::string, + ::google::protobuf::internal::WireFormatLite::TYPE_STRING, + ::google::protobuf::internal::WireFormatLite::TYPE_STRING, + 0 >, + ::google::protobuf::Map< ::std::string, ::std::string > > parser(&ray_start_params_); + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, &parser)); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + parser.key().data(), static_cast(parser.key().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "flyteidl.plugins.WorkerGroupSpec.RayStartParamsEntry.key")); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + parser.value().data(), static_cast(parser.value().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "flyteidl.plugins.WorkerGroupSpec.RayStartParamsEntry.value")); + } 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.WorkerGroupSpec) + return true; +failure: + // @@protoc_insertion_point(parse_failure:flyteidl.plugins.WorkerGroupSpec) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void WorkerGroupSpec::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:flyteidl.plugins.WorkerGroupSpec) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string group_name = 1; + if (this->group_name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->group_name().data(), static_cast(this->group_name().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "flyteidl.plugins.WorkerGroupSpec.group_name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->group_name(), output); + } + + // int32 replicas = 2; + if (this->replicas() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->replicas(), output); + } + + // int32 min_replicas = 3; + if (this->min_replicas() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->min_replicas(), output); + } + + // int32 max_replicas = 4; + if (this->max_replicas() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->max_replicas(), output); + } + + // map ray_start_params = 5; + if (!this->ray_start_params().empty()) { + typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer + ConstPtr; + typedef ConstPtr SortItem; + typedef ::google::protobuf::internal::CompareByDerefFirst Less; + struct Utf8Check { + static void Check(ConstPtr p) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + p->first.data(), static_cast(p->first.length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "flyteidl.plugins.WorkerGroupSpec.RayStartParamsEntry.key"); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + p->second.data(), static_cast(p->second.length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "flyteidl.plugins.WorkerGroupSpec.RayStartParamsEntry.value"); + } + }; + + if (output->IsSerializationDeterministic() && + this->ray_start_params().size() > 1) { + ::std::unique_ptr items( + new SortItem[this->ray_start_params().size()]); + typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type; + size_type n = 0; + for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator + it = this->ray_start_params().begin(); + it != this->ray_start_params().end(); ++it, ++n) { + items[static_cast(n)] = SortItem(&*it); + } + ::std::sort(&items[0], &items[static_cast(n)], Less()); + ::std::unique_ptr entry; + for (size_type i = 0; i < n; i++) { + entry.reset(ray_start_params_.NewEntryWrapper(items[static_cast(i)]->first, items[static_cast(i)]->second)); + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(5, *entry, output); + Utf8Check::Check(&(*items[static_cast(i)])); + } + } else { + ::std::unique_ptr entry; + for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator + it = this->ray_start_params().begin(); + it != this->ray_start_params().end(); ++it) { + entry.reset(ray_start_params_.NewEntryWrapper(it->first, it->second)); + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(5, *entry, output); + Utf8Check::Check(&(*it)); + } + } + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:flyteidl.plugins.WorkerGroupSpec) +} + +::google::protobuf::uint8* WorkerGroupSpec::InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:flyteidl.plugins.WorkerGroupSpec) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string group_name = 1; + if (this->group_name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->group_name().data(), static_cast(this->group_name().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "flyteidl.plugins.WorkerGroupSpec.group_name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->group_name(), target); + } + + // int32 replicas = 2; + if (this->replicas() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->replicas(), target); + } + + // int32 min_replicas = 3; + if (this->min_replicas() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->min_replicas(), target); + } + + // int32 max_replicas = 4; + if (this->max_replicas() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->max_replicas(), target); + } + + // map ray_start_params = 5; + if (!this->ray_start_params().empty()) { + typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer + ConstPtr; + typedef ConstPtr SortItem; + typedef ::google::protobuf::internal::CompareByDerefFirst Less; + struct Utf8Check { + static void Check(ConstPtr p) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + p->first.data(), static_cast(p->first.length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "flyteidl.plugins.WorkerGroupSpec.RayStartParamsEntry.key"); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + p->second.data(), static_cast(p->second.length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "flyteidl.plugins.WorkerGroupSpec.RayStartParamsEntry.value"); + } + }; + + if (false && + this->ray_start_params().size() > 1) { + ::std::unique_ptr items( + new SortItem[this->ray_start_params().size()]); + typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type; + size_type n = 0; + for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator + it = this->ray_start_params().begin(); + it != this->ray_start_params().end(); ++it, ++n) { + items[static_cast(n)] = SortItem(&*it); + } + ::std::sort(&items[0], &items[static_cast(n)], Less()); + ::std::unique_ptr entry; + for (size_type i = 0; i < n; i++) { + entry.reset(ray_start_params_.NewEntryWrapper(items[static_cast(i)]->first, items[static_cast(i)]->second)); + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessageNoVirtualToArray(5, *entry, target); + Utf8Check::Check(&(*items[static_cast(i)])); + } + } else { + ::std::unique_ptr entry; + for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator + it = this->ray_start_params().begin(); + it != this->ray_start_params().end(); ++it) { + entry.reset(ray_start_params_.NewEntryWrapper(it->first, it->second)); + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessageNoVirtualToArray(5, *entry, target); + Utf8Check::Check(&(*it)); + } + } + } + + 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.WorkerGroupSpec) + return target; +} + +size_t WorkerGroupSpec::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:flyteidl.plugins.WorkerGroupSpec) + 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; + + // map ray_start_params = 5; + total_size += 1 * + ::google::protobuf::internal::FromIntSize(this->ray_start_params_size()); + { + ::std::unique_ptr entry; + for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator + it = this->ray_start_params().begin(); + it != this->ray_start_params().end(); ++it) { + entry.reset(ray_start_params_.NewEntryWrapper(it->first, it->second)); + total_size += ::google::protobuf::internal::WireFormatLite:: + MessageSizeNoVirtual(*entry); + } + } + + // string group_name = 1; + if (this->group_name().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->group_name()); + } + + // int32 replicas = 2; + if (this->replicas() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->replicas()); + } + + // int32 min_replicas = 3; + if (this->min_replicas() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->min_replicas()); + } + + // int32 max_replicas = 4; + if (this->max_replicas() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->max_replicas()); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void WorkerGroupSpec::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:flyteidl.plugins.WorkerGroupSpec) + GOOGLE_DCHECK_NE(&from, this); + const WorkerGroupSpec* source = + ::google::protobuf::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:flyteidl.plugins.WorkerGroupSpec) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:flyteidl.plugins.WorkerGroupSpec) + MergeFrom(*source); + } +} + +void WorkerGroupSpec::MergeFrom(const WorkerGroupSpec& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:flyteidl.plugins.WorkerGroupSpec) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + ray_start_params_.MergeFrom(from.ray_start_params_); + if (from.group_name().size() > 0) { + + group_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.group_name_); + } + if (from.replicas() != 0) { + set_replicas(from.replicas()); + } + if (from.min_replicas() != 0) { + set_min_replicas(from.min_replicas()); + } + if (from.max_replicas() != 0) { + set_max_replicas(from.max_replicas()); + } +} + +void WorkerGroupSpec::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:flyteidl.plugins.WorkerGroupSpec) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void WorkerGroupSpec::CopyFrom(const WorkerGroupSpec& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:flyteidl.plugins.WorkerGroupSpec) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool WorkerGroupSpec::IsInitialized() const { + return true; +} + +void WorkerGroupSpec::Swap(WorkerGroupSpec* other) { + if (other == this) return; + InternalSwap(other); +} +void WorkerGroupSpec::InternalSwap(WorkerGroupSpec* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + ray_start_params_.Swap(&other->ray_start_params_); + group_name_.Swap(&other->group_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(replicas_, other->replicas_); + swap(min_replicas_, other->min_replicas_); + swap(max_replicas_, other->max_replicas_); +} + +::google::protobuf::Metadata WorkerGroupSpec::GetMetadata() const { + ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_flyteidl_2fplugins_2fray_2eproto); + return ::file_level_metadata_flyteidl_2fplugins_2fray_2eproto[kIndexInFileMessages]; +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace plugins +} // namespace flyteidl +namespace google { +namespace protobuf { +template<> PROTOBUF_NOINLINE ::flyteidl::plugins::RayJob* Arena::CreateMaybeMessage< ::flyteidl::plugins::RayJob >(Arena* arena) { + return Arena::CreateInternal< ::flyteidl::plugins::RayJob >(arena); +} +template<> PROTOBUF_NOINLINE ::flyteidl::plugins::RayCluster* Arena::CreateMaybeMessage< ::flyteidl::plugins::RayCluster >(Arena* arena) { + return Arena::CreateInternal< ::flyteidl::plugins::RayCluster >(arena); +} +template<> PROTOBUF_NOINLINE ::flyteidl::plugins::HeadGroupSpec_RayStartParamsEntry_DoNotUse* Arena::CreateMaybeMessage< ::flyteidl::plugins::HeadGroupSpec_RayStartParamsEntry_DoNotUse >(Arena* arena) { + return Arena::CreateInternal< ::flyteidl::plugins::HeadGroupSpec_RayStartParamsEntry_DoNotUse >(arena); +} +template<> PROTOBUF_NOINLINE ::flyteidl::plugins::HeadGroupSpec* Arena::CreateMaybeMessage< ::flyteidl::plugins::HeadGroupSpec >(Arena* arena) { + return Arena::CreateInternal< ::flyteidl::plugins::HeadGroupSpec >(arena); +} +template<> PROTOBUF_NOINLINE ::flyteidl::plugins::WorkerGroupSpec_RayStartParamsEntry_DoNotUse* Arena::CreateMaybeMessage< ::flyteidl::plugins::WorkerGroupSpec_RayStartParamsEntry_DoNotUse >(Arena* arena) { + return Arena::CreateInternal< ::flyteidl::plugins::WorkerGroupSpec_RayStartParamsEntry_DoNotUse >(arena); +} +template<> PROTOBUF_NOINLINE ::flyteidl::plugins::WorkerGroupSpec* Arena::CreateMaybeMessage< ::flyteidl::plugins::WorkerGroupSpec >(Arena* arena) { + return Arena::CreateInternal< ::flyteidl::plugins::WorkerGroupSpec >(arena); +} +} // namespace protobuf +} // namespace google + +// @@protoc_insertion_point(global_scope) +#include diff --git a/flyteidl/gen/pb-cpp/flyteidl/plugins/ray.pb.h b/flyteidl/gen/pb-cpp/flyteidl/plugins/ray.pb.h new file mode 100644 index 0000000000..588e776806 --- /dev/null +++ b/flyteidl/gen/pb-cpp/flyteidl/plugins/ray.pb.h @@ -0,0 +1,1039 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: flyteidl/plugins/ray.proto + +#ifndef PROTOBUF_INCLUDED_flyteidl_2fplugins_2fray_2eproto +#define PROTOBUF_INCLUDED_flyteidl_2fplugins_2fray_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 // IWYU pragma: export +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_flyteidl_2fplugins_2fray_2eproto + +// Internal implementation detail -- do not use these members. +struct TableStruct_flyteidl_2fplugins_2fray_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[6] + 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_2fray_2eproto(); +namespace flyteidl { +namespace plugins { +class HeadGroupSpec; +class HeadGroupSpecDefaultTypeInternal; +extern HeadGroupSpecDefaultTypeInternal _HeadGroupSpec_default_instance_; +class HeadGroupSpec_RayStartParamsEntry_DoNotUse; +class HeadGroupSpec_RayStartParamsEntry_DoNotUseDefaultTypeInternal; +extern HeadGroupSpec_RayStartParamsEntry_DoNotUseDefaultTypeInternal _HeadGroupSpec_RayStartParamsEntry_DoNotUse_default_instance_; +class RayCluster; +class RayClusterDefaultTypeInternal; +extern RayClusterDefaultTypeInternal _RayCluster_default_instance_; +class RayJob; +class RayJobDefaultTypeInternal; +extern RayJobDefaultTypeInternal _RayJob_default_instance_; +class WorkerGroupSpec; +class WorkerGroupSpecDefaultTypeInternal; +extern WorkerGroupSpecDefaultTypeInternal _WorkerGroupSpec_default_instance_; +class WorkerGroupSpec_RayStartParamsEntry_DoNotUse; +class WorkerGroupSpec_RayStartParamsEntry_DoNotUseDefaultTypeInternal; +extern WorkerGroupSpec_RayStartParamsEntry_DoNotUseDefaultTypeInternal _WorkerGroupSpec_RayStartParamsEntry_DoNotUse_default_instance_; +} // namespace plugins +} // namespace flyteidl +namespace google { +namespace protobuf { +template<> ::flyteidl::plugins::HeadGroupSpec* Arena::CreateMaybeMessage<::flyteidl::plugins::HeadGroupSpec>(Arena*); +template<> ::flyteidl::plugins::HeadGroupSpec_RayStartParamsEntry_DoNotUse* Arena::CreateMaybeMessage<::flyteidl::plugins::HeadGroupSpec_RayStartParamsEntry_DoNotUse>(Arena*); +template<> ::flyteidl::plugins::RayCluster* Arena::CreateMaybeMessage<::flyteidl::plugins::RayCluster>(Arena*); +template<> ::flyteidl::plugins::RayJob* Arena::CreateMaybeMessage<::flyteidl::plugins::RayJob>(Arena*); +template<> ::flyteidl::plugins::WorkerGroupSpec* Arena::CreateMaybeMessage<::flyteidl::plugins::WorkerGroupSpec>(Arena*); +template<> ::flyteidl::plugins::WorkerGroupSpec_RayStartParamsEntry_DoNotUse* Arena::CreateMaybeMessage<::flyteidl::plugins::WorkerGroupSpec_RayStartParamsEntry_DoNotUse>(Arena*); +} // namespace protobuf +} // namespace google +namespace flyteidl { +namespace plugins { + +// =================================================================== + +class RayJob final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:flyteidl.plugins.RayJob) */ { + public: + RayJob(); + virtual ~RayJob(); + + RayJob(const RayJob& from); + + inline RayJob& operator=(const RayJob& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + RayJob(RayJob&& from) noexcept + : RayJob() { + *this = ::std::move(from); + } + + inline RayJob& operator=(RayJob&& 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 RayJob& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const RayJob* internal_default_instance() { + return reinterpret_cast( + &_RayJob_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + void Swap(RayJob* other); + friend void swap(RayJob& a, RayJob& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline RayJob* New() const final { + return CreateMaybeMessage(nullptr); + } + + RayJob* 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 RayJob& from); + void MergeFrom(const RayJob& 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(RayJob* 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 runtime_env = 2; + void clear_runtime_env(); + static const int kRuntimeEnvFieldNumber = 2; + const ::std::string& runtime_env() const; + void set_runtime_env(const ::std::string& value); + #if LANG_CXX11 + void set_runtime_env(::std::string&& value); + #endif + void set_runtime_env(const char* value); + void set_runtime_env(const char* value, size_t size); + ::std::string* mutable_runtime_env(); + ::std::string* release_runtime_env(); + void set_allocated_runtime_env(::std::string* runtime_env); + + // .flyteidl.plugins.RayCluster ray_cluster = 1; + bool has_ray_cluster() const; + void clear_ray_cluster(); + static const int kRayClusterFieldNumber = 1; + const ::flyteidl::plugins::RayCluster& ray_cluster() const; + ::flyteidl::plugins::RayCluster* release_ray_cluster(); + ::flyteidl::plugins::RayCluster* mutable_ray_cluster(); + void set_allocated_ray_cluster(::flyteidl::plugins::RayCluster* ray_cluster); + + // @@protoc_insertion_point(class_scope:flyteidl.plugins.RayJob) + private: + class HasBitSetters; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::ArenaStringPtr runtime_env_; + ::flyteidl::plugins::RayCluster* ray_cluster_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::TableStruct_flyteidl_2fplugins_2fray_2eproto; +}; +// ------------------------------------------------------------------- + +class RayCluster final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:flyteidl.plugins.RayCluster) */ { + public: + RayCluster(); + virtual ~RayCluster(); + + RayCluster(const RayCluster& from); + + inline RayCluster& operator=(const RayCluster& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + RayCluster(RayCluster&& from) noexcept + : RayCluster() { + *this = ::std::move(from); + } + + inline RayCluster& operator=(RayCluster&& 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 RayCluster& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const RayCluster* internal_default_instance() { + return reinterpret_cast( + &_RayCluster_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + void Swap(RayCluster* other); + friend void swap(RayCluster& a, RayCluster& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline RayCluster* New() const final { + return CreateMaybeMessage(nullptr); + } + + RayCluster* 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 RayCluster& from); + void MergeFrom(const RayCluster& 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(RayCluster* 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 ------------------------------------------------------- + + // repeated .flyteidl.plugins.WorkerGroupSpec worker_group_spec = 2; + int worker_group_spec_size() const; + void clear_worker_group_spec(); + static const int kWorkerGroupSpecFieldNumber = 2; + ::flyteidl::plugins::WorkerGroupSpec* mutable_worker_group_spec(int index); + ::google::protobuf::RepeatedPtrField< ::flyteidl::plugins::WorkerGroupSpec >* + mutable_worker_group_spec(); + const ::flyteidl::plugins::WorkerGroupSpec& worker_group_spec(int index) const; + ::flyteidl::plugins::WorkerGroupSpec* add_worker_group_spec(); + const ::google::protobuf::RepeatedPtrField< ::flyteidl::plugins::WorkerGroupSpec >& + worker_group_spec() const; + + // .flyteidl.plugins.HeadGroupSpec head_group_spec = 1; + bool has_head_group_spec() const; + void clear_head_group_spec(); + static const int kHeadGroupSpecFieldNumber = 1; + const ::flyteidl::plugins::HeadGroupSpec& head_group_spec() const; + ::flyteidl::plugins::HeadGroupSpec* release_head_group_spec(); + ::flyteidl::plugins::HeadGroupSpec* mutable_head_group_spec(); + void set_allocated_head_group_spec(::flyteidl::plugins::HeadGroupSpec* head_group_spec); + + // @@protoc_insertion_point(class_scope:flyteidl.plugins.RayCluster) + private: + class HasBitSetters; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::RepeatedPtrField< ::flyteidl::plugins::WorkerGroupSpec > worker_group_spec_; + ::flyteidl::plugins::HeadGroupSpec* head_group_spec_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::TableStruct_flyteidl_2fplugins_2fray_2eproto; +}; +// ------------------------------------------------------------------- + +class HeadGroupSpec_RayStartParamsEntry_DoNotUse : public ::google::protobuf::internal::MapEntry { +public: +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +static bool _ParseMap(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + typedef ::google::protobuf::internal::MapEntry SuperType; + HeadGroupSpec_RayStartParamsEntry_DoNotUse(); + HeadGroupSpec_RayStartParamsEntry_DoNotUse(::google::protobuf::Arena* arena); + void MergeFrom(const HeadGroupSpec_RayStartParamsEntry_DoNotUse& other); + static const HeadGroupSpec_RayStartParamsEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_HeadGroupSpec_RayStartParamsEntry_DoNotUse_default_instance_); } + void MergeFrom(const ::google::protobuf::Message& other) final; + ::google::protobuf::Metadata GetMetadata() const; +}; + +// ------------------------------------------------------------------- + +class HeadGroupSpec final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:flyteidl.plugins.HeadGroupSpec) */ { + public: + HeadGroupSpec(); + virtual ~HeadGroupSpec(); + + HeadGroupSpec(const HeadGroupSpec& from); + + inline HeadGroupSpec& operator=(const HeadGroupSpec& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + HeadGroupSpec(HeadGroupSpec&& from) noexcept + : HeadGroupSpec() { + *this = ::std::move(from); + } + + inline HeadGroupSpec& operator=(HeadGroupSpec&& 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 HeadGroupSpec& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const HeadGroupSpec* internal_default_instance() { + return reinterpret_cast( + &_HeadGroupSpec_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + void Swap(HeadGroupSpec* other); + friend void swap(HeadGroupSpec& a, HeadGroupSpec& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline HeadGroupSpec* New() const final { + return CreateMaybeMessage(nullptr); + } + + HeadGroupSpec* 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 HeadGroupSpec& from); + void MergeFrom(const HeadGroupSpec& 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(HeadGroupSpec* 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 ------------------------------------------------------- + + // map ray_start_params = 1; + int ray_start_params_size() const; + void clear_ray_start_params(); + static const int kRayStartParamsFieldNumber = 1; + const ::google::protobuf::Map< ::std::string, ::std::string >& + ray_start_params() const; + ::google::protobuf::Map< ::std::string, ::std::string >* + mutable_ray_start_params(); + + // @@protoc_insertion_point(class_scope:flyteidl.plugins.HeadGroupSpec) + private: + class HasBitSetters; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::MapField< + HeadGroupSpec_RayStartParamsEntry_DoNotUse, + ::std::string, ::std::string, + ::google::protobuf::internal::WireFormatLite::TYPE_STRING, + ::google::protobuf::internal::WireFormatLite::TYPE_STRING, + 0 > ray_start_params_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::TableStruct_flyteidl_2fplugins_2fray_2eproto; +}; +// ------------------------------------------------------------------- + +class WorkerGroupSpec_RayStartParamsEntry_DoNotUse : public ::google::protobuf::internal::MapEntry { +public: +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +static bool _ParseMap(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + typedef ::google::protobuf::internal::MapEntry SuperType; + WorkerGroupSpec_RayStartParamsEntry_DoNotUse(); + WorkerGroupSpec_RayStartParamsEntry_DoNotUse(::google::protobuf::Arena* arena); + void MergeFrom(const WorkerGroupSpec_RayStartParamsEntry_DoNotUse& other); + static const WorkerGroupSpec_RayStartParamsEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_WorkerGroupSpec_RayStartParamsEntry_DoNotUse_default_instance_); } + void MergeFrom(const ::google::protobuf::Message& other) final; + ::google::protobuf::Metadata GetMetadata() const; +}; + +// ------------------------------------------------------------------- + +class WorkerGroupSpec final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:flyteidl.plugins.WorkerGroupSpec) */ { + public: + WorkerGroupSpec(); + virtual ~WorkerGroupSpec(); + + WorkerGroupSpec(const WorkerGroupSpec& from); + + inline WorkerGroupSpec& operator=(const WorkerGroupSpec& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + WorkerGroupSpec(WorkerGroupSpec&& from) noexcept + : WorkerGroupSpec() { + *this = ::std::move(from); + } + + inline WorkerGroupSpec& operator=(WorkerGroupSpec&& 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 WorkerGroupSpec& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const WorkerGroupSpec* internal_default_instance() { + return reinterpret_cast( + &_WorkerGroupSpec_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + void Swap(WorkerGroupSpec* other); + friend void swap(WorkerGroupSpec& a, WorkerGroupSpec& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline WorkerGroupSpec* New() const final { + return CreateMaybeMessage(nullptr); + } + + WorkerGroupSpec* 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 WorkerGroupSpec& from); + void MergeFrom(const WorkerGroupSpec& 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(WorkerGroupSpec* 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 ------------------------------------------------------- + + // map ray_start_params = 5; + int ray_start_params_size() const; + void clear_ray_start_params(); + static const int kRayStartParamsFieldNumber = 5; + const ::google::protobuf::Map< ::std::string, ::std::string >& + ray_start_params() const; + ::google::protobuf::Map< ::std::string, ::std::string >* + mutable_ray_start_params(); + + // string group_name = 1; + void clear_group_name(); + static const int kGroupNameFieldNumber = 1; + const ::std::string& group_name() const; + void set_group_name(const ::std::string& value); + #if LANG_CXX11 + void set_group_name(::std::string&& value); + #endif + void set_group_name(const char* value); + void set_group_name(const char* value, size_t size); + ::std::string* mutable_group_name(); + ::std::string* release_group_name(); + void set_allocated_group_name(::std::string* group_name); + + // int32 replicas = 2; + void clear_replicas(); + static const int kReplicasFieldNumber = 2; + ::google::protobuf::int32 replicas() const; + void set_replicas(::google::protobuf::int32 value); + + // int32 min_replicas = 3; + void clear_min_replicas(); + static const int kMinReplicasFieldNumber = 3; + ::google::protobuf::int32 min_replicas() const; + void set_min_replicas(::google::protobuf::int32 value); + + // int32 max_replicas = 4; + void clear_max_replicas(); + static const int kMaxReplicasFieldNumber = 4; + ::google::protobuf::int32 max_replicas() const; + void set_max_replicas(::google::protobuf::int32 value); + + // @@protoc_insertion_point(class_scope:flyteidl.plugins.WorkerGroupSpec) + private: + class HasBitSetters; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::MapField< + WorkerGroupSpec_RayStartParamsEntry_DoNotUse, + ::std::string, ::std::string, + ::google::protobuf::internal::WireFormatLite::TYPE_STRING, + ::google::protobuf::internal::WireFormatLite::TYPE_STRING, + 0 > ray_start_params_; + ::google::protobuf::internal::ArenaStringPtr group_name_; + ::google::protobuf::int32 replicas_; + ::google::protobuf::int32 min_replicas_; + ::google::protobuf::int32 max_replicas_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::TableStruct_flyteidl_2fplugins_2fray_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// RayJob + +// .flyteidl.plugins.RayCluster ray_cluster = 1; +inline bool RayJob::has_ray_cluster() const { + return this != internal_default_instance() && ray_cluster_ != nullptr; +} +inline void RayJob::clear_ray_cluster() { + if (GetArenaNoVirtual() == nullptr && ray_cluster_ != nullptr) { + delete ray_cluster_; + } + ray_cluster_ = nullptr; +} +inline const ::flyteidl::plugins::RayCluster& RayJob::ray_cluster() const { + const ::flyteidl::plugins::RayCluster* p = ray_cluster_; + // @@protoc_insertion_point(field_get:flyteidl.plugins.RayJob.ray_cluster) + return p != nullptr ? *p : *reinterpret_cast( + &::flyteidl::plugins::_RayCluster_default_instance_); +} +inline ::flyteidl::plugins::RayCluster* RayJob::release_ray_cluster() { + // @@protoc_insertion_point(field_release:flyteidl.plugins.RayJob.ray_cluster) + + ::flyteidl::plugins::RayCluster* temp = ray_cluster_; + ray_cluster_ = nullptr; + return temp; +} +inline ::flyteidl::plugins::RayCluster* RayJob::mutable_ray_cluster() { + + if (ray_cluster_ == nullptr) { + auto* p = CreateMaybeMessage<::flyteidl::plugins::RayCluster>(GetArenaNoVirtual()); + ray_cluster_ = p; + } + // @@protoc_insertion_point(field_mutable:flyteidl.plugins.RayJob.ray_cluster) + return ray_cluster_; +} +inline void RayJob::set_allocated_ray_cluster(::flyteidl::plugins::RayCluster* ray_cluster) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == nullptr) { + delete ray_cluster_; + } + if (ray_cluster) { + ::google::protobuf::Arena* submessage_arena = nullptr; + if (message_arena != submessage_arena) { + ray_cluster = ::google::protobuf::internal::GetOwnedMessage( + message_arena, ray_cluster, submessage_arena); + } + + } else { + + } + ray_cluster_ = ray_cluster; + // @@protoc_insertion_point(field_set_allocated:flyteidl.plugins.RayJob.ray_cluster) +} + +// string runtime_env = 2; +inline void RayJob::clear_runtime_env() { + runtime_env_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& RayJob::runtime_env() const { + // @@protoc_insertion_point(field_get:flyteidl.plugins.RayJob.runtime_env) + return runtime_env_.GetNoArena(); +} +inline void RayJob::set_runtime_env(const ::std::string& value) { + + runtime_env_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:flyteidl.plugins.RayJob.runtime_env) +} +#if LANG_CXX11 +inline void RayJob::set_runtime_env(::std::string&& value) { + + runtime_env_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:flyteidl.plugins.RayJob.runtime_env) +} +#endif +inline void RayJob::set_runtime_env(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + runtime_env_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:flyteidl.plugins.RayJob.runtime_env) +} +inline void RayJob::set_runtime_env(const char* value, size_t size) { + + runtime_env_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:flyteidl.plugins.RayJob.runtime_env) +} +inline ::std::string* RayJob::mutable_runtime_env() { + + // @@protoc_insertion_point(field_mutable:flyteidl.plugins.RayJob.runtime_env) + return runtime_env_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* RayJob::release_runtime_env() { + // @@protoc_insertion_point(field_release:flyteidl.plugins.RayJob.runtime_env) + + return runtime_env_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void RayJob::set_allocated_runtime_env(::std::string* runtime_env) { + if (runtime_env != nullptr) { + + } else { + + } + runtime_env_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), runtime_env); + // @@protoc_insertion_point(field_set_allocated:flyteidl.plugins.RayJob.runtime_env) +} + +// ------------------------------------------------------------------- + +// RayCluster + +// .flyteidl.plugins.HeadGroupSpec head_group_spec = 1; +inline bool RayCluster::has_head_group_spec() const { + return this != internal_default_instance() && head_group_spec_ != nullptr; +} +inline void RayCluster::clear_head_group_spec() { + if (GetArenaNoVirtual() == nullptr && head_group_spec_ != nullptr) { + delete head_group_spec_; + } + head_group_spec_ = nullptr; +} +inline const ::flyteidl::plugins::HeadGroupSpec& RayCluster::head_group_spec() const { + const ::flyteidl::plugins::HeadGroupSpec* p = head_group_spec_; + // @@protoc_insertion_point(field_get:flyteidl.plugins.RayCluster.head_group_spec) + return p != nullptr ? *p : *reinterpret_cast( + &::flyteidl::plugins::_HeadGroupSpec_default_instance_); +} +inline ::flyteidl::plugins::HeadGroupSpec* RayCluster::release_head_group_spec() { + // @@protoc_insertion_point(field_release:flyteidl.plugins.RayCluster.head_group_spec) + + ::flyteidl::plugins::HeadGroupSpec* temp = head_group_spec_; + head_group_spec_ = nullptr; + return temp; +} +inline ::flyteidl::plugins::HeadGroupSpec* RayCluster::mutable_head_group_spec() { + + if (head_group_spec_ == nullptr) { + auto* p = CreateMaybeMessage<::flyteidl::plugins::HeadGroupSpec>(GetArenaNoVirtual()); + head_group_spec_ = p; + } + // @@protoc_insertion_point(field_mutable:flyteidl.plugins.RayCluster.head_group_spec) + return head_group_spec_; +} +inline void RayCluster::set_allocated_head_group_spec(::flyteidl::plugins::HeadGroupSpec* head_group_spec) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == nullptr) { + delete head_group_spec_; + } + if (head_group_spec) { + ::google::protobuf::Arena* submessage_arena = nullptr; + if (message_arena != submessage_arena) { + head_group_spec = ::google::protobuf::internal::GetOwnedMessage( + message_arena, head_group_spec, submessage_arena); + } + + } else { + + } + head_group_spec_ = head_group_spec; + // @@protoc_insertion_point(field_set_allocated:flyteidl.plugins.RayCluster.head_group_spec) +} + +// repeated .flyteidl.plugins.WorkerGroupSpec worker_group_spec = 2; +inline int RayCluster::worker_group_spec_size() const { + return worker_group_spec_.size(); +} +inline void RayCluster::clear_worker_group_spec() { + worker_group_spec_.Clear(); +} +inline ::flyteidl::plugins::WorkerGroupSpec* RayCluster::mutable_worker_group_spec(int index) { + // @@protoc_insertion_point(field_mutable:flyteidl.plugins.RayCluster.worker_group_spec) + return worker_group_spec_.Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField< ::flyteidl::plugins::WorkerGroupSpec >* +RayCluster::mutable_worker_group_spec() { + // @@protoc_insertion_point(field_mutable_list:flyteidl.plugins.RayCluster.worker_group_spec) + return &worker_group_spec_; +} +inline const ::flyteidl::plugins::WorkerGroupSpec& RayCluster::worker_group_spec(int index) const { + // @@protoc_insertion_point(field_get:flyteidl.plugins.RayCluster.worker_group_spec) + return worker_group_spec_.Get(index); +} +inline ::flyteidl::plugins::WorkerGroupSpec* RayCluster::add_worker_group_spec() { + // @@protoc_insertion_point(field_add:flyteidl.plugins.RayCluster.worker_group_spec) + return worker_group_spec_.Add(); +} +inline const ::google::protobuf::RepeatedPtrField< ::flyteidl::plugins::WorkerGroupSpec >& +RayCluster::worker_group_spec() const { + // @@protoc_insertion_point(field_list:flyteidl.plugins.RayCluster.worker_group_spec) + return worker_group_spec_; +} + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// HeadGroupSpec + +// map ray_start_params = 1; +inline int HeadGroupSpec::ray_start_params_size() const { + return ray_start_params_.size(); +} +inline void HeadGroupSpec::clear_ray_start_params() { + ray_start_params_.Clear(); +} +inline const ::google::protobuf::Map< ::std::string, ::std::string >& +HeadGroupSpec::ray_start_params() const { + // @@protoc_insertion_point(field_map:flyteidl.plugins.HeadGroupSpec.ray_start_params) + return ray_start_params_.GetMap(); +} +inline ::google::protobuf::Map< ::std::string, ::std::string >* +HeadGroupSpec::mutable_ray_start_params() { + // @@protoc_insertion_point(field_mutable_map:flyteidl.plugins.HeadGroupSpec.ray_start_params) + return ray_start_params_.MutableMap(); +} + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// WorkerGroupSpec + +// string group_name = 1; +inline void WorkerGroupSpec::clear_group_name() { + group_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& WorkerGroupSpec::group_name() const { + // @@protoc_insertion_point(field_get:flyteidl.plugins.WorkerGroupSpec.group_name) + return group_name_.GetNoArena(); +} +inline void WorkerGroupSpec::set_group_name(const ::std::string& value) { + + group_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:flyteidl.plugins.WorkerGroupSpec.group_name) +} +#if LANG_CXX11 +inline void WorkerGroupSpec::set_group_name(::std::string&& value) { + + group_name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:flyteidl.plugins.WorkerGroupSpec.group_name) +} +#endif +inline void WorkerGroupSpec::set_group_name(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + group_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:flyteidl.plugins.WorkerGroupSpec.group_name) +} +inline void WorkerGroupSpec::set_group_name(const char* value, size_t size) { + + group_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:flyteidl.plugins.WorkerGroupSpec.group_name) +} +inline ::std::string* WorkerGroupSpec::mutable_group_name() { + + // @@protoc_insertion_point(field_mutable:flyteidl.plugins.WorkerGroupSpec.group_name) + return group_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* WorkerGroupSpec::release_group_name() { + // @@protoc_insertion_point(field_release:flyteidl.plugins.WorkerGroupSpec.group_name) + + return group_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void WorkerGroupSpec::set_allocated_group_name(::std::string* group_name) { + if (group_name != nullptr) { + + } else { + + } + group_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), group_name); + // @@protoc_insertion_point(field_set_allocated:flyteidl.plugins.WorkerGroupSpec.group_name) +} + +// int32 replicas = 2; +inline void WorkerGroupSpec::clear_replicas() { + replicas_ = 0; +} +inline ::google::protobuf::int32 WorkerGroupSpec::replicas() const { + // @@protoc_insertion_point(field_get:flyteidl.plugins.WorkerGroupSpec.replicas) + return replicas_; +} +inline void WorkerGroupSpec::set_replicas(::google::protobuf::int32 value) { + + replicas_ = value; + // @@protoc_insertion_point(field_set:flyteidl.plugins.WorkerGroupSpec.replicas) +} + +// int32 min_replicas = 3; +inline void WorkerGroupSpec::clear_min_replicas() { + min_replicas_ = 0; +} +inline ::google::protobuf::int32 WorkerGroupSpec::min_replicas() const { + // @@protoc_insertion_point(field_get:flyteidl.plugins.WorkerGroupSpec.min_replicas) + return min_replicas_; +} +inline void WorkerGroupSpec::set_min_replicas(::google::protobuf::int32 value) { + + min_replicas_ = value; + // @@protoc_insertion_point(field_set:flyteidl.plugins.WorkerGroupSpec.min_replicas) +} + +// int32 max_replicas = 4; +inline void WorkerGroupSpec::clear_max_replicas() { + max_replicas_ = 0; +} +inline ::google::protobuf::int32 WorkerGroupSpec::max_replicas() const { + // @@protoc_insertion_point(field_get:flyteidl.plugins.WorkerGroupSpec.max_replicas) + return max_replicas_; +} +inline void WorkerGroupSpec::set_max_replicas(::google::protobuf::int32 value) { + + max_replicas_ = value; + // @@protoc_insertion_point(field_set:flyteidl.plugins.WorkerGroupSpec.max_replicas) +} + +// map ray_start_params = 5; +inline int WorkerGroupSpec::ray_start_params_size() const { + return ray_start_params_.size(); +} +inline void WorkerGroupSpec::clear_ray_start_params() { + ray_start_params_.Clear(); +} +inline const ::google::protobuf::Map< ::std::string, ::std::string >& +WorkerGroupSpec::ray_start_params() const { + // @@protoc_insertion_point(field_map:flyteidl.plugins.WorkerGroupSpec.ray_start_params) + return ray_start_params_.GetMap(); +} +inline ::google::protobuf::Map< ::std::string, ::std::string >* +WorkerGroupSpec::mutable_ray_start_params() { + // @@protoc_insertion_point(field_mutable_map:flyteidl.plugins.WorkerGroupSpec.ray_start_params) + return ray_start_params_.MutableMap(); +} + +#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_2fray_2eproto diff --git a/flyteidl/gen/pb-go/flyteidl/plugins/ray.pb.go b/flyteidl/gen/pb-go/flyteidl/plugins/ray.pb.go new file mode 100644 index 0000000000..acb2a45969 --- /dev/null +++ b/flyteidl/gen/pb-go/flyteidl/plugins/ray.pb.go @@ -0,0 +1,285 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: flyteidl/plugins/ray.proto + +package plugins + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + _ "github.com/golang/protobuf/ptypes/timestamp" + 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 + +// RayJobSpec defines the desired state of RayJob +type RayJob struct { + // RayClusterSpec is the cluster template to run the job + RayCluster *RayCluster `protobuf:"bytes,1,opt,name=ray_cluster,json=rayCluster,proto3" json:"ray_cluster,omitempty"` + // runtime_env is base64 encoded. + // Ray runtime environments: https://docs.ray.io/en/latest/ray-core/handling-dependencies.html#runtime-environments + RuntimeEnv string `protobuf:"bytes,2,opt,name=runtime_env,json=runtimeEnv,proto3" json:"runtime_env,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RayJob) Reset() { *m = RayJob{} } +func (m *RayJob) String() string { return proto.CompactTextString(m) } +func (*RayJob) ProtoMessage() {} +func (*RayJob) Descriptor() ([]byte, []int) { + return fileDescriptor_b980f6d58c7489d7, []int{0} +} + +func (m *RayJob) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RayJob.Unmarshal(m, b) +} +func (m *RayJob) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RayJob.Marshal(b, m, deterministic) +} +func (m *RayJob) XXX_Merge(src proto.Message) { + xxx_messageInfo_RayJob.Merge(m, src) +} +func (m *RayJob) XXX_Size() int { + return xxx_messageInfo_RayJob.Size(m) +} +func (m *RayJob) XXX_DiscardUnknown() { + xxx_messageInfo_RayJob.DiscardUnknown(m) +} + +var xxx_messageInfo_RayJob proto.InternalMessageInfo + +func (m *RayJob) GetRayCluster() *RayCluster { + if m != nil { + return m.RayCluster + } + return nil +} + +func (m *RayJob) GetRuntimeEnv() string { + if m != nil { + return m.RuntimeEnv + } + return "" +} + +// Define Ray cluster defines the desired state of RayCluster +type RayCluster struct { + // HeadGroupSpecs are the spec for the head pod + HeadGroupSpec *HeadGroupSpec `protobuf:"bytes,1,opt,name=head_group_spec,json=headGroupSpec,proto3" json:"head_group_spec,omitempty"` + // WorkerGroupSpecs are the specs for the worker pods + WorkerGroupSpec []*WorkerGroupSpec `protobuf:"bytes,2,rep,name=worker_group_spec,json=workerGroupSpec,proto3" json:"worker_group_spec,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RayCluster) Reset() { *m = RayCluster{} } +func (m *RayCluster) String() string { return proto.CompactTextString(m) } +func (*RayCluster) ProtoMessage() {} +func (*RayCluster) Descriptor() ([]byte, []int) { + return fileDescriptor_b980f6d58c7489d7, []int{1} +} + +func (m *RayCluster) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RayCluster.Unmarshal(m, b) +} +func (m *RayCluster) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RayCluster.Marshal(b, m, deterministic) +} +func (m *RayCluster) XXX_Merge(src proto.Message) { + xxx_messageInfo_RayCluster.Merge(m, src) +} +func (m *RayCluster) XXX_Size() int { + return xxx_messageInfo_RayCluster.Size(m) +} +func (m *RayCluster) XXX_DiscardUnknown() { + xxx_messageInfo_RayCluster.DiscardUnknown(m) +} + +var xxx_messageInfo_RayCluster proto.InternalMessageInfo + +func (m *RayCluster) GetHeadGroupSpec() *HeadGroupSpec { + if m != nil { + return m.HeadGroupSpec + } + return nil +} + +func (m *RayCluster) GetWorkerGroupSpec() []*WorkerGroupSpec { + if m != nil { + return m.WorkerGroupSpec + } + return nil +} + +// HeadGroupSpec are the spec for the head pod +type HeadGroupSpec struct { + // Optional. RayStartParams are the params of the start command: address, object-store-memory. + // Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start + RayStartParams map[string]string `protobuf:"bytes,1,rep,name=ray_start_params,json=rayStartParams,proto3" json:"ray_start_params,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *HeadGroupSpec) Reset() { *m = HeadGroupSpec{} } +func (m *HeadGroupSpec) String() string { return proto.CompactTextString(m) } +func (*HeadGroupSpec) ProtoMessage() {} +func (*HeadGroupSpec) Descriptor() ([]byte, []int) { + return fileDescriptor_b980f6d58c7489d7, []int{2} +} + +func (m *HeadGroupSpec) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_HeadGroupSpec.Unmarshal(m, b) +} +func (m *HeadGroupSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_HeadGroupSpec.Marshal(b, m, deterministic) +} +func (m *HeadGroupSpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_HeadGroupSpec.Merge(m, src) +} +func (m *HeadGroupSpec) XXX_Size() int { + return xxx_messageInfo_HeadGroupSpec.Size(m) +} +func (m *HeadGroupSpec) XXX_DiscardUnknown() { + xxx_messageInfo_HeadGroupSpec.DiscardUnknown(m) +} + +var xxx_messageInfo_HeadGroupSpec proto.InternalMessageInfo + +func (m *HeadGroupSpec) GetRayStartParams() map[string]string { + if m != nil { + return m.RayStartParams + } + return nil +} + +// WorkerGroupSpec are the specs for the worker pods +type WorkerGroupSpec struct { + // Required. RayCluster can have multiple worker groups, and it distinguishes them by name + GroupName string `protobuf:"bytes,1,opt,name=group_name,json=groupName,proto3" json:"group_name,omitempty"` + // Required. Desired replicas of the worker group. Defaults to 1. + Replicas int32 `protobuf:"varint,2,opt,name=replicas,proto3" json:"replicas,omitempty"` + // Optional. Min replicas of the worker group. MinReplicas defaults to 1. + MinReplicas int32 `protobuf:"varint,3,opt,name=min_replicas,json=minReplicas,proto3" json:"min_replicas,omitempty"` + // Optional. Max replicas of the worker group. MaxReplicas defaults to maxInt32 + MaxReplicas int32 `protobuf:"varint,4,opt,name=max_replicas,json=maxReplicas,proto3" json:"max_replicas,omitempty"` + // Optional. RayStartParams are the params of the start command: address, object-store-memory. + // Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start + RayStartParams map[string]string `protobuf:"bytes,5,rep,name=ray_start_params,json=rayStartParams,proto3" json:"ray_start_params,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *WorkerGroupSpec) Reset() { *m = WorkerGroupSpec{} } +func (m *WorkerGroupSpec) String() string { return proto.CompactTextString(m) } +func (*WorkerGroupSpec) ProtoMessage() {} +func (*WorkerGroupSpec) Descriptor() ([]byte, []int) { + return fileDescriptor_b980f6d58c7489d7, []int{3} +} + +func (m *WorkerGroupSpec) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_WorkerGroupSpec.Unmarshal(m, b) +} +func (m *WorkerGroupSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_WorkerGroupSpec.Marshal(b, m, deterministic) +} +func (m *WorkerGroupSpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_WorkerGroupSpec.Merge(m, src) +} +func (m *WorkerGroupSpec) XXX_Size() int { + return xxx_messageInfo_WorkerGroupSpec.Size(m) +} +func (m *WorkerGroupSpec) XXX_DiscardUnknown() { + xxx_messageInfo_WorkerGroupSpec.DiscardUnknown(m) +} + +var xxx_messageInfo_WorkerGroupSpec proto.InternalMessageInfo + +func (m *WorkerGroupSpec) GetGroupName() string { + if m != nil { + return m.GroupName + } + return "" +} + +func (m *WorkerGroupSpec) GetReplicas() int32 { + if m != nil { + return m.Replicas + } + return 0 +} + +func (m *WorkerGroupSpec) GetMinReplicas() int32 { + if m != nil { + return m.MinReplicas + } + return 0 +} + +func (m *WorkerGroupSpec) GetMaxReplicas() int32 { + if m != nil { + return m.MaxReplicas + } + return 0 +} + +func (m *WorkerGroupSpec) GetRayStartParams() map[string]string { + if m != nil { + return m.RayStartParams + } + return nil +} + +func init() { + proto.RegisterType((*RayJob)(nil), "flyteidl.plugins.RayJob") + proto.RegisterType((*RayCluster)(nil), "flyteidl.plugins.RayCluster") + proto.RegisterType((*HeadGroupSpec)(nil), "flyteidl.plugins.HeadGroupSpec") + proto.RegisterMapType((map[string]string)(nil), "flyteidl.plugins.HeadGroupSpec.RayStartParamsEntry") + proto.RegisterType((*WorkerGroupSpec)(nil), "flyteidl.plugins.WorkerGroupSpec") + proto.RegisterMapType((map[string]string)(nil), "flyteidl.plugins.WorkerGroupSpec.RayStartParamsEntry") +} + +func init() { proto.RegisterFile("flyteidl/plugins/ray.proto", fileDescriptor_b980f6d58c7489d7) } + +var fileDescriptor_b980f6d58c7489d7 = []byte{ + // 431 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x53, 0x4b, 0x6b, 0xdb, 0x40, + 0x10, 0x46, 0x76, 0x1d, 0xea, 0x51, 0x53, 0xbb, 0xdb, 0x1e, 0x8c, 0x69, 0xb1, 0xe3, 0x93, 0x2f, + 0x95, 0x20, 0xa1, 0xf4, 0x01, 0x3d, 0xb4, 0x25, 0xa4, 0x14, 0x5a, 0xca, 0xe6, 0x50, 0x28, 0x14, + 0x31, 0x92, 0x27, 0xb2, 0x88, 0xf6, 0xc1, 0x6a, 0xe5, 0x44, 0xff, 0xa7, 0x7f, 0xa0, 0x97, 0xfe, + 0xbe, 0xa2, 0xb5, 0x2a, 0x3f, 0x12, 0xc8, 0x2d, 0xb7, 0x9d, 0xf9, 0x1e, 0x33, 0xfa, 0xc4, 0xc0, + 0xf8, 0x22, 0xaf, 0x2c, 0x65, 0x8b, 0x3c, 0xd4, 0x79, 0x99, 0x66, 0xb2, 0x08, 0x0d, 0x56, 0x81, + 0x36, 0xca, 0x2a, 0x36, 0xfc, 0x8f, 0x05, 0x0d, 0x36, 0x9e, 0xa4, 0x4a, 0xa5, 0x39, 0x85, 0x0e, + 0x8f, 0xcb, 0x8b, 0xd0, 0x66, 0x82, 0x0a, 0x8b, 0x42, 0xaf, 0x25, 0xb3, 0x25, 0x1c, 0x70, 0xac, + 0xbe, 0xa8, 0x98, 0xbd, 0x07, 0xdf, 0x60, 0x15, 0x25, 0x79, 0x59, 0x58, 0x32, 0x23, 0x6f, 0xea, + 0xcd, 0xfd, 0xe3, 0xe7, 0xc1, 0xbe, 0x65, 0xc0, 0xb1, 0xfa, 0xb4, 0xe6, 0x70, 0x30, 0xed, 0x9b, + 0x4d, 0xc0, 0x37, 0xa5, 0xac, 0xed, 0x23, 0x92, 0xab, 0x51, 0x67, 0xea, 0xcd, 0xfb, 0x1c, 0x9a, + 0xd6, 0xa9, 0x5c, 0xcd, 0x7e, 0x7b, 0x00, 0x1b, 0x2d, 0x3b, 0x83, 0xc1, 0x92, 0x70, 0x11, 0xa5, + 0x46, 0x95, 0x3a, 0x2a, 0x34, 0x25, 0xcd, 0xc8, 0xc9, 0xcd, 0x91, 0x9f, 0x09, 0x17, 0x67, 0x35, + 0xef, 0x5c, 0x53, 0xc2, 0x0f, 0x97, 0xdb, 0x25, 0xfb, 0x0a, 0x4f, 0xae, 0x94, 0xb9, 0x24, 0xb3, + 0x6d, 0xd5, 0x99, 0x76, 0xe7, 0xfe, 0xf1, 0xd1, 0x4d, 0xab, 0x1f, 0x8e, 0xba, 0x31, 0x1b, 0x5c, + 0xed, 0x36, 0x66, 0x7f, 0x3c, 0x38, 0xdc, 0x99, 0xc7, 0x7e, 0xc1, 0xb0, 0x0e, 0xa6, 0xb0, 0x68, + 0x6c, 0xa4, 0xd1, 0xa0, 0x28, 0x46, 0x9e, 0xf3, 0x3f, 0xb9, 0x63, 0xd5, 0x3a, 0xab, 0xf3, 0x5a, + 0xf6, 0xdd, 0xa9, 0x4e, 0xa5, 0x35, 0x15, 0x7f, 0x6c, 0x76, 0x9a, 0xe3, 0x0f, 0xf0, 0xf4, 0x16, + 0x1a, 0x1b, 0x42, 0xf7, 0x92, 0x2a, 0x97, 0x49, 0x9f, 0xd7, 0x4f, 0xf6, 0x0c, 0x7a, 0x2b, 0xcc, + 0x4b, 0x6a, 0xb2, 0x5d, 0x17, 0xef, 0x3a, 0x6f, 0xbc, 0xd9, 0xdf, 0x0e, 0x0c, 0xf6, 0x3e, 0x8c, + 0xbd, 0x00, 0x58, 0xe7, 0x21, 0x51, 0x50, 0x63, 0xd3, 0x77, 0x9d, 0x6f, 0x28, 0x88, 0x8d, 0xe1, + 0xa1, 0x21, 0x9d, 0x67, 0x09, 0x16, 0xce, 0xaf, 0xc7, 0xdb, 0x9a, 0x1d, 0xc1, 0x23, 0x91, 0xc9, + 0xa8, 0xc5, 0xbb, 0x0e, 0xf7, 0x45, 0x26, 0xf9, 0x36, 0x05, 0xaf, 0x37, 0x94, 0x07, 0x0d, 0x05, + 0xaf, 0x5b, 0x4a, 0x74, 0x4b, 0x6c, 0x3d, 0x17, 0xdb, 0xab, 0x3b, 0x7f, 0xcb, 0x3d, 0x05, 0xf7, + 0xf1, 0xed, 0xcf, 0xd7, 0x69, 0x66, 0x97, 0x65, 0x1c, 0x24, 0x4a, 0x84, 0x6e, 0x2b, 0x65, 0xd2, + 0xb0, 0x3d, 0xb1, 0x94, 0x64, 0xa8, 0xe3, 0x97, 0xa9, 0x0a, 0xf7, 0xaf, 0x2e, 0x3e, 0x70, 0xf7, + 0x73, 0xf2, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x5d, 0xf4, 0x3f, 0xfe, 0x90, 0x03, 0x00, 0x00, +} diff --git a/flyteidl/gen/pb-go/flyteidl/plugins/ray.pb.validate.go b/flyteidl/gen/pb-go/flyteidl/plugins/ray.pb.validate.go new file mode 100644 index 0000000000..e85e27a8ac --- /dev/null +++ b/flyteidl/gen/pb-go/flyteidl/plugins/ray.pb.validate.go @@ -0,0 +1,344 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: flyteidl/plugins/ray.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 _ray_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 RayJob with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *RayJob) Validate() error { + if m == nil { + return nil + } + + if v, ok := interface{}(m.GetRayCluster()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RayJobValidationError{ + field: "RayCluster", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for RuntimeEnv + + return nil +} + +// RayJobValidationError is the validation error returned by RayJob.Validate if +// the designated constraints aren't met. +type RayJobValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RayJobValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RayJobValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RayJobValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RayJobValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RayJobValidationError) ErrorName() string { return "RayJobValidationError" } + +// Error satisfies the builtin error interface +func (e RayJobValidationError) 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 %sRayJob.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RayJobValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RayJobValidationError{} + +// Validate checks the field values on RayCluster with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *RayCluster) Validate() error { + if m == nil { + return nil + } + + if v, ok := interface{}(m.GetHeadGroupSpec()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RayClusterValidationError{ + field: "HeadGroupSpec", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetWorkerGroupSpec() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RayClusterValidationError{ + field: fmt.Sprintf("WorkerGroupSpec[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + return nil +} + +// RayClusterValidationError is the validation error returned by +// RayCluster.Validate if the designated constraints aren't met. +type RayClusterValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RayClusterValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RayClusterValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RayClusterValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RayClusterValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RayClusterValidationError) ErrorName() string { return "RayClusterValidationError" } + +// Error satisfies the builtin error interface +func (e RayClusterValidationError) 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 %sRayCluster.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RayClusterValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RayClusterValidationError{} + +// Validate checks the field values on HeadGroupSpec with the rules defined in +// the proto definition for this message. If any rules are violated, an error +// is returned. +func (m *HeadGroupSpec) Validate() error { + if m == nil { + return nil + } + + // no validation rules for RayStartParams + + return nil +} + +// HeadGroupSpecValidationError is the validation error returned by +// HeadGroupSpec.Validate if the designated constraints aren't met. +type HeadGroupSpecValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HeadGroupSpecValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HeadGroupSpecValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HeadGroupSpecValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HeadGroupSpecValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HeadGroupSpecValidationError) ErrorName() string { return "HeadGroupSpecValidationError" } + +// Error satisfies the builtin error interface +func (e HeadGroupSpecValidationError) 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 %sHeadGroupSpec.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HeadGroupSpecValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HeadGroupSpecValidationError{} + +// Validate checks the field values on WorkerGroupSpec with the rules defined +// in the proto definition for this message. If any rules are violated, an +// error is returned. +func (m *WorkerGroupSpec) Validate() error { + if m == nil { + return nil + } + + // no validation rules for GroupName + + // no validation rules for Replicas + + // no validation rules for MinReplicas + + // no validation rules for MaxReplicas + + // no validation rules for RayStartParams + + return nil +} + +// WorkerGroupSpecValidationError is the validation error returned by +// WorkerGroupSpec.Validate if the designated constraints aren't met. +type WorkerGroupSpecValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e WorkerGroupSpecValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e WorkerGroupSpecValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e WorkerGroupSpecValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e WorkerGroupSpecValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e WorkerGroupSpecValidationError) ErrorName() string { return "WorkerGroupSpecValidationError" } + +// Error satisfies the builtin error interface +func (e WorkerGroupSpecValidationError) 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 %sWorkerGroupSpec.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = WorkerGroupSpecValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = WorkerGroupSpecValidationError{} diff --git a/flyteidl/gen/pb-java/flyteidl/plugins/Ray.java b/flyteidl/gen/pb-java/flyteidl/plugins/Ray.java new file mode 100644 index 0000000000..d106368890 --- /dev/null +++ b/flyteidl/gen/pb-java/flyteidl/plugins/Ray.java @@ -0,0 +1,4183 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: flyteidl/plugins/ray.proto + +package flyteidl.plugins; + +public final class Ray { + private Ray() {} + 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 RayJobOrBuilder extends + // @@protoc_insertion_point(interface_extends:flyteidl.plugins.RayJob) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * RayClusterSpec is the cluster template to run the job
+     * 
+ * + * .flyteidl.plugins.RayCluster ray_cluster = 1; + */ + boolean hasRayCluster(); + /** + *
+     * RayClusterSpec is the cluster template to run the job
+     * 
+ * + * .flyteidl.plugins.RayCluster ray_cluster = 1; + */ + flyteidl.plugins.Ray.RayCluster getRayCluster(); + /** + *
+     * RayClusterSpec is the cluster template to run the job
+     * 
+ * + * .flyteidl.plugins.RayCluster ray_cluster = 1; + */ + flyteidl.plugins.Ray.RayClusterOrBuilder getRayClusterOrBuilder(); + + /** + *
+     * runtime_env is base64 encoded.
+     * Ray runtime environments: https://docs.ray.io/en/latest/ray-core/handling-dependencies.html#runtime-environments
+     * 
+ * + * string runtime_env = 2; + */ + java.lang.String getRuntimeEnv(); + /** + *
+     * runtime_env is base64 encoded.
+     * Ray runtime environments: https://docs.ray.io/en/latest/ray-core/handling-dependencies.html#runtime-environments
+     * 
+ * + * string runtime_env = 2; + */ + com.google.protobuf.ByteString + getRuntimeEnvBytes(); + } + /** + *
+   * RayJobSpec defines the desired state of RayJob
+   * 
+ * + * Protobuf type {@code flyteidl.plugins.RayJob} + */ + public static final class RayJob extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flyteidl.plugins.RayJob) + RayJobOrBuilder { + private static final long serialVersionUID = 0L; + // Use RayJob.newBuilder() to construct. + private RayJob(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RayJob() { + runtimeEnv_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RayJob( + 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.Ray.RayCluster.Builder subBuilder = null; + if (rayCluster_ != null) { + subBuilder = rayCluster_.toBuilder(); + } + rayCluster_ = input.readMessage(flyteidl.plugins.Ray.RayCluster.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rayCluster_); + rayCluster_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + runtimeEnv_ = s; + 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.Ray.internal_static_flyteidl_plugins_RayJob_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return flyteidl.plugins.Ray.internal_static_flyteidl_plugins_RayJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + flyteidl.plugins.Ray.RayJob.class, flyteidl.plugins.Ray.RayJob.Builder.class); + } + + public static final int RAY_CLUSTER_FIELD_NUMBER = 1; + private flyteidl.plugins.Ray.RayCluster rayCluster_; + /** + *
+     * RayClusterSpec is the cluster template to run the job
+     * 
+ * + * .flyteidl.plugins.RayCluster ray_cluster = 1; + */ + public boolean hasRayCluster() { + return rayCluster_ != null; + } + /** + *
+     * RayClusterSpec is the cluster template to run the job
+     * 
+ * + * .flyteidl.plugins.RayCluster ray_cluster = 1; + */ + public flyteidl.plugins.Ray.RayCluster getRayCluster() { + return rayCluster_ == null ? flyteidl.plugins.Ray.RayCluster.getDefaultInstance() : rayCluster_; + } + /** + *
+     * RayClusterSpec is the cluster template to run the job
+     * 
+ * + * .flyteidl.plugins.RayCluster ray_cluster = 1; + */ + public flyteidl.plugins.Ray.RayClusterOrBuilder getRayClusterOrBuilder() { + return getRayCluster(); + } + + public static final int RUNTIME_ENV_FIELD_NUMBER = 2; + private volatile java.lang.Object runtimeEnv_; + /** + *
+     * runtime_env is base64 encoded.
+     * Ray runtime environments: https://docs.ray.io/en/latest/ray-core/handling-dependencies.html#runtime-environments
+     * 
+ * + * string runtime_env = 2; + */ + public java.lang.String getRuntimeEnv() { + java.lang.Object ref = runtimeEnv_; + 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(); + runtimeEnv_ = s; + return s; + } + } + /** + *
+     * runtime_env is base64 encoded.
+     * Ray runtime environments: https://docs.ray.io/en/latest/ray-core/handling-dependencies.html#runtime-environments
+     * 
+ * + * string runtime_env = 2; + */ + public com.google.protobuf.ByteString + getRuntimeEnvBytes() { + java.lang.Object ref = runtimeEnv_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + runtimeEnv_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (rayCluster_ != null) { + output.writeMessage(1, getRayCluster()); + } + if (!getRuntimeEnvBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, runtimeEnv_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (rayCluster_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getRayCluster()); + } + if (!getRuntimeEnvBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, runtimeEnv_); + } + 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.Ray.RayJob)) { + return super.equals(obj); + } + flyteidl.plugins.Ray.RayJob other = (flyteidl.plugins.Ray.RayJob) obj; + + if (hasRayCluster() != other.hasRayCluster()) return false; + if (hasRayCluster()) { + if (!getRayCluster() + .equals(other.getRayCluster())) return false; + } + if (!getRuntimeEnv() + .equals(other.getRuntimeEnv())) 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 (hasRayCluster()) { + hash = (37 * hash) + RAY_CLUSTER_FIELD_NUMBER; + hash = (53 * hash) + getRayCluster().hashCode(); + } + hash = (37 * hash) + RUNTIME_ENV_FIELD_NUMBER; + hash = (53 * hash) + getRuntimeEnv().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static flyteidl.plugins.Ray.RayJob parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.plugins.Ray.RayJob parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static flyteidl.plugins.Ray.RayJob parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.plugins.Ray.RayJob 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.Ray.RayJob parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.plugins.Ray.RayJob parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static flyteidl.plugins.Ray.RayJob parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static flyteidl.plugins.Ray.RayJob 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.Ray.RayJob parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static flyteidl.plugins.Ray.RayJob 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.Ray.RayJob parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static flyteidl.plugins.Ray.RayJob 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.Ray.RayJob 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; + } + /** + *
+     * RayJobSpec defines the desired state of RayJob
+     * 
+ * + * Protobuf type {@code flyteidl.plugins.RayJob} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flyteidl.plugins.RayJob) + flyteidl.plugins.Ray.RayJobOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return flyteidl.plugins.Ray.internal_static_flyteidl_plugins_RayJob_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return flyteidl.plugins.Ray.internal_static_flyteidl_plugins_RayJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + flyteidl.plugins.Ray.RayJob.class, flyteidl.plugins.Ray.RayJob.Builder.class); + } + + // Construct using flyteidl.plugins.Ray.RayJob.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 (rayClusterBuilder_ == null) { + rayCluster_ = null; + } else { + rayCluster_ = null; + rayClusterBuilder_ = null; + } + runtimeEnv_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return flyteidl.plugins.Ray.internal_static_flyteidl_plugins_RayJob_descriptor; + } + + @java.lang.Override + public flyteidl.plugins.Ray.RayJob getDefaultInstanceForType() { + return flyteidl.plugins.Ray.RayJob.getDefaultInstance(); + } + + @java.lang.Override + public flyteidl.plugins.Ray.RayJob build() { + flyteidl.plugins.Ray.RayJob result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public flyteidl.plugins.Ray.RayJob buildPartial() { + flyteidl.plugins.Ray.RayJob result = new flyteidl.plugins.Ray.RayJob(this); + if (rayClusterBuilder_ == null) { + result.rayCluster_ = rayCluster_; + } else { + result.rayCluster_ = rayClusterBuilder_.build(); + } + result.runtimeEnv_ = runtimeEnv_; + 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.Ray.RayJob) { + return mergeFrom((flyteidl.plugins.Ray.RayJob)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(flyteidl.plugins.Ray.RayJob other) { + if (other == flyteidl.plugins.Ray.RayJob.getDefaultInstance()) return this; + if (other.hasRayCluster()) { + mergeRayCluster(other.getRayCluster()); + } + if (!other.getRuntimeEnv().isEmpty()) { + runtimeEnv_ = other.runtimeEnv_; + onChanged(); + } + 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.Ray.RayJob parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (flyteidl.plugins.Ray.RayJob) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private flyteidl.plugins.Ray.RayCluster rayCluster_; + private com.google.protobuf.SingleFieldBuilderV3< + flyteidl.plugins.Ray.RayCluster, flyteidl.plugins.Ray.RayCluster.Builder, flyteidl.plugins.Ray.RayClusterOrBuilder> rayClusterBuilder_; + /** + *
+       * RayClusterSpec is the cluster template to run the job
+       * 
+ * + * .flyteidl.plugins.RayCluster ray_cluster = 1; + */ + public boolean hasRayCluster() { + return rayClusterBuilder_ != null || rayCluster_ != null; + } + /** + *
+       * RayClusterSpec is the cluster template to run the job
+       * 
+ * + * .flyteidl.plugins.RayCluster ray_cluster = 1; + */ + public flyteidl.plugins.Ray.RayCluster getRayCluster() { + if (rayClusterBuilder_ == null) { + return rayCluster_ == null ? flyteidl.plugins.Ray.RayCluster.getDefaultInstance() : rayCluster_; + } else { + return rayClusterBuilder_.getMessage(); + } + } + /** + *
+       * RayClusterSpec is the cluster template to run the job
+       * 
+ * + * .flyteidl.plugins.RayCluster ray_cluster = 1; + */ + public Builder setRayCluster(flyteidl.plugins.Ray.RayCluster value) { + if (rayClusterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rayCluster_ = value; + onChanged(); + } else { + rayClusterBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * RayClusterSpec is the cluster template to run the job
+       * 
+ * + * .flyteidl.plugins.RayCluster ray_cluster = 1; + */ + public Builder setRayCluster( + flyteidl.plugins.Ray.RayCluster.Builder builderForValue) { + if (rayClusterBuilder_ == null) { + rayCluster_ = builderForValue.build(); + onChanged(); + } else { + rayClusterBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * RayClusterSpec is the cluster template to run the job
+       * 
+ * + * .flyteidl.plugins.RayCluster ray_cluster = 1; + */ + public Builder mergeRayCluster(flyteidl.plugins.Ray.RayCluster value) { + if (rayClusterBuilder_ == null) { + if (rayCluster_ != null) { + rayCluster_ = + flyteidl.plugins.Ray.RayCluster.newBuilder(rayCluster_).mergeFrom(value).buildPartial(); + } else { + rayCluster_ = value; + } + onChanged(); + } else { + rayClusterBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * RayClusterSpec is the cluster template to run the job
+       * 
+ * + * .flyteidl.plugins.RayCluster ray_cluster = 1; + */ + public Builder clearRayCluster() { + if (rayClusterBuilder_ == null) { + rayCluster_ = null; + onChanged(); + } else { + rayCluster_ = null; + rayClusterBuilder_ = null; + } + + return this; + } + /** + *
+       * RayClusterSpec is the cluster template to run the job
+       * 
+ * + * .flyteidl.plugins.RayCluster ray_cluster = 1; + */ + public flyteidl.plugins.Ray.RayCluster.Builder getRayClusterBuilder() { + + onChanged(); + return getRayClusterFieldBuilder().getBuilder(); + } + /** + *
+       * RayClusterSpec is the cluster template to run the job
+       * 
+ * + * .flyteidl.plugins.RayCluster ray_cluster = 1; + */ + public flyteidl.plugins.Ray.RayClusterOrBuilder getRayClusterOrBuilder() { + if (rayClusterBuilder_ != null) { + return rayClusterBuilder_.getMessageOrBuilder(); + } else { + return rayCluster_ == null ? + flyteidl.plugins.Ray.RayCluster.getDefaultInstance() : rayCluster_; + } + } + /** + *
+       * RayClusterSpec is the cluster template to run the job
+       * 
+ * + * .flyteidl.plugins.RayCluster ray_cluster = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + flyteidl.plugins.Ray.RayCluster, flyteidl.plugins.Ray.RayCluster.Builder, flyteidl.plugins.Ray.RayClusterOrBuilder> + getRayClusterFieldBuilder() { + if (rayClusterBuilder_ == null) { + rayClusterBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + flyteidl.plugins.Ray.RayCluster, flyteidl.plugins.Ray.RayCluster.Builder, flyteidl.plugins.Ray.RayClusterOrBuilder>( + getRayCluster(), + getParentForChildren(), + isClean()); + rayCluster_ = null; + } + return rayClusterBuilder_; + } + + private java.lang.Object runtimeEnv_ = ""; + /** + *
+       * runtime_env is base64 encoded.
+       * Ray runtime environments: https://docs.ray.io/en/latest/ray-core/handling-dependencies.html#runtime-environments
+       * 
+ * + * string runtime_env = 2; + */ + public java.lang.String getRuntimeEnv() { + java.lang.Object ref = runtimeEnv_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + runtimeEnv_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * runtime_env is base64 encoded.
+       * Ray runtime environments: https://docs.ray.io/en/latest/ray-core/handling-dependencies.html#runtime-environments
+       * 
+ * + * string runtime_env = 2; + */ + public com.google.protobuf.ByteString + getRuntimeEnvBytes() { + java.lang.Object ref = runtimeEnv_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + runtimeEnv_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * runtime_env is base64 encoded.
+       * Ray runtime environments: https://docs.ray.io/en/latest/ray-core/handling-dependencies.html#runtime-environments
+       * 
+ * + * string runtime_env = 2; + */ + public Builder setRuntimeEnv( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + runtimeEnv_ = value; + onChanged(); + return this; + } + /** + *
+       * runtime_env is base64 encoded.
+       * Ray runtime environments: https://docs.ray.io/en/latest/ray-core/handling-dependencies.html#runtime-environments
+       * 
+ * + * string runtime_env = 2; + */ + public Builder clearRuntimeEnv() { + + runtimeEnv_ = getDefaultInstance().getRuntimeEnv(); + onChanged(); + return this; + } + /** + *
+       * runtime_env is base64 encoded.
+       * Ray runtime environments: https://docs.ray.io/en/latest/ray-core/handling-dependencies.html#runtime-environments
+       * 
+ * + * string runtime_env = 2; + */ + public Builder setRuntimeEnvBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + runtimeEnv_ = value; + onChanged(); + return this; + } + @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.RayJob) + } + + // @@protoc_insertion_point(class_scope:flyteidl.plugins.RayJob) + private static final flyteidl.plugins.Ray.RayJob DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new flyteidl.plugins.Ray.RayJob(); + } + + public static flyteidl.plugins.Ray.RayJob getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RayJob parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RayJob(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.Ray.RayJob getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface RayClusterOrBuilder extends + // @@protoc_insertion_point(interface_extends:flyteidl.plugins.RayCluster) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * HeadGroupSpecs are the spec for the head pod
+     * 
+ * + * .flyteidl.plugins.HeadGroupSpec head_group_spec = 1; + */ + boolean hasHeadGroupSpec(); + /** + *
+     * HeadGroupSpecs are the spec for the head pod
+     * 
+ * + * .flyteidl.plugins.HeadGroupSpec head_group_spec = 1; + */ + flyteidl.plugins.Ray.HeadGroupSpec getHeadGroupSpec(); + /** + *
+     * HeadGroupSpecs are the spec for the head pod
+     * 
+ * + * .flyteidl.plugins.HeadGroupSpec head_group_spec = 1; + */ + flyteidl.plugins.Ray.HeadGroupSpecOrBuilder getHeadGroupSpecOrBuilder(); + + /** + *
+     * WorkerGroupSpecs are the specs for the worker pods
+     * 
+ * + * repeated .flyteidl.plugins.WorkerGroupSpec worker_group_spec = 2; + */ + java.util.List + getWorkerGroupSpecList(); + /** + *
+     * WorkerGroupSpecs are the specs for the worker pods
+     * 
+ * + * repeated .flyteidl.plugins.WorkerGroupSpec worker_group_spec = 2; + */ + flyteidl.plugins.Ray.WorkerGroupSpec getWorkerGroupSpec(int index); + /** + *
+     * WorkerGroupSpecs are the specs for the worker pods
+     * 
+ * + * repeated .flyteidl.plugins.WorkerGroupSpec worker_group_spec = 2; + */ + int getWorkerGroupSpecCount(); + /** + *
+     * WorkerGroupSpecs are the specs for the worker pods
+     * 
+ * + * repeated .flyteidl.plugins.WorkerGroupSpec worker_group_spec = 2; + */ + java.util.List + getWorkerGroupSpecOrBuilderList(); + /** + *
+     * WorkerGroupSpecs are the specs for the worker pods
+     * 
+ * + * repeated .flyteidl.plugins.WorkerGroupSpec worker_group_spec = 2; + */ + flyteidl.plugins.Ray.WorkerGroupSpecOrBuilder getWorkerGroupSpecOrBuilder( + int index); + } + /** + *
+   * Define Ray cluster defines the desired state of RayCluster
+   * 
+ * + * Protobuf type {@code flyteidl.plugins.RayCluster} + */ + public static final class RayCluster extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flyteidl.plugins.RayCluster) + RayClusterOrBuilder { + private static final long serialVersionUID = 0L; + // Use RayCluster.newBuilder() to construct. + private RayCluster(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RayCluster() { + workerGroupSpec_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RayCluster( + 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.Ray.HeadGroupSpec.Builder subBuilder = null; + if (headGroupSpec_ != null) { + subBuilder = headGroupSpec_.toBuilder(); + } + headGroupSpec_ = input.readMessage(flyteidl.plugins.Ray.HeadGroupSpec.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(headGroupSpec_); + headGroupSpec_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + workerGroupSpec_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + workerGroupSpec_.add( + input.readMessage(flyteidl.plugins.Ray.WorkerGroupSpec.parser(), extensionRegistry)); + 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 { + if (((mutable_bitField0_ & 0x00000002) != 0)) { + workerGroupSpec_ = java.util.Collections.unmodifiableList(workerGroupSpec_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return flyteidl.plugins.Ray.internal_static_flyteidl_plugins_RayCluster_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return flyteidl.plugins.Ray.internal_static_flyteidl_plugins_RayCluster_fieldAccessorTable + .ensureFieldAccessorsInitialized( + flyteidl.plugins.Ray.RayCluster.class, flyteidl.plugins.Ray.RayCluster.Builder.class); + } + + private int bitField0_; + public static final int HEAD_GROUP_SPEC_FIELD_NUMBER = 1; + private flyteidl.plugins.Ray.HeadGroupSpec headGroupSpec_; + /** + *
+     * HeadGroupSpecs are the spec for the head pod
+     * 
+ * + * .flyteidl.plugins.HeadGroupSpec head_group_spec = 1; + */ + public boolean hasHeadGroupSpec() { + return headGroupSpec_ != null; + } + /** + *
+     * HeadGroupSpecs are the spec for the head pod
+     * 
+ * + * .flyteidl.plugins.HeadGroupSpec head_group_spec = 1; + */ + public flyteidl.plugins.Ray.HeadGroupSpec getHeadGroupSpec() { + return headGroupSpec_ == null ? flyteidl.plugins.Ray.HeadGroupSpec.getDefaultInstance() : headGroupSpec_; + } + /** + *
+     * HeadGroupSpecs are the spec for the head pod
+     * 
+ * + * .flyteidl.plugins.HeadGroupSpec head_group_spec = 1; + */ + public flyteidl.plugins.Ray.HeadGroupSpecOrBuilder getHeadGroupSpecOrBuilder() { + return getHeadGroupSpec(); + } + + public static final int WORKER_GROUP_SPEC_FIELD_NUMBER = 2; + private java.util.List workerGroupSpec_; + /** + *
+     * WorkerGroupSpecs are the specs for the worker pods
+     * 
+ * + * repeated .flyteidl.plugins.WorkerGroupSpec worker_group_spec = 2; + */ + public java.util.List getWorkerGroupSpecList() { + return workerGroupSpec_; + } + /** + *
+     * WorkerGroupSpecs are the specs for the worker pods
+     * 
+ * + * repeated .flyteidl.plugins.WorkerGroupSpec worker_group_spec = 2; + */ + public java.util.List + getWorkerGroupSpecOrBuilderList() { + return workerGroupSpec_; + } + /** + *
+     * WorkerGroupSpecs are the specs for the worker pods
+     * 
+ * + * repeated .flyteidl.plugins.WorkerGroupSpec worker_group_spec = 2; + */ + public int getWorkerGroupSpecCount() { + return workerGroupSpec_.size(); + } + /** + *
+     * WorkerGroupSpecs are the specs for the worker pods
+     * 
+ * + * repeated .flyteidl.plugins.WorkerGroupSpec worker_group_spec = 2; + */ + public flyteidl.plugins.Ray.WorkerGroupSpec getWorkerGroupSpec(int index) { + return workerGroupSpec_.get(index); + } + /** + *
+     * WorkerGroupSpecs are the specs for the worker pods
+     * 
+ * + * repeated .flyteidl.plugins.WorkerGroupSpec worker_group_spec = 2; + */ + public flyteidl.plugins.Ray.WorkerGroupSpecOrBuilder getWorkerGroupSpecOrBuilder( + int index) { + return workerGroupSpec_.get(index); + } + + 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 (headGroupSpec_ != null) { + output.writeMessage(1, getHeadGroupSpec()); + } + for (int i = 0; i < workerGroupSpec_.size(); i++) { + output.writeMessage(2, workerGroupSpec_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (headGroupSpec_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getHeadGroupSpec()); + } + for (int i = 0; i < workerGroupSpec_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, workerGroupSpec_.get(i)); + } + 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.Ray.RayCluster)) { + return super.equals(obj); + } + flyteidl.plugins.Ray.RayCluster other = (flyteidl.plugins.Ray.RayCluster) obj; + + if (hasHeadGroupSpec() != other.hasHeadGroupSpec()) return false; + if (hasHeadGroupSpec()) { + if (!getHeadGroupSpec() + .equals(other.getHeadGroupSpec())) return false; + } + if (!getWorkerGroupSpecList() + .equals(other.getWorkerGroupSpecList())) 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 (hasHeadGroupSpec()) { + hash = (37 * hash) + HEAD_GROUP_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getHeadGroupSpec().hashCode(); + } + if (getWorkerGroupSpecCount() > 0) { + hash = (37 * hash) + WORKER_GROUP_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getWorkerGroupSpecList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static flyteidl.plugins.Ray.RayCluster parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.plugins.Ray.RayCluster parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static flyteidl.plugins.Ray.RayCluster parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.plugins.Ray.RayCluster 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.Ray.RayCluster parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.plugins.Ray.RayCluster parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static flyteidl.plugins.Ray.RayCluster parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static flyteidl.plugins.Ray.RayCluster 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.Ray.RayCluster parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static flyteidl.plugins.Ray.RayCluster 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.Ray.RayCluster parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static flyteidl.plugins.Ray.RayCluster 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.Ray.RayCluster 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; + } + /** + *
+     * Define Ray cluster defines the desired state of RayCluster
+     * 
+ * + * Protobuf type {@code flyteidl.plugins.RayCluster} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flyteidl.plugins.RayCluster) + flyteidl.plugins.Ray.RayClusterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return flyteidl.plugins.Ray.internal_static_flyteidl_plugins_RayCluster_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return flyteidl.plugins.Ray.internal_static_flyteidl_plugins_RayCluster_fieldAccessorTable + .ensureFieldAccessorsInitialized( + flyteidl.plugins.Ray.RayCluster.class, flyteidl.plugins.Ray.RayCluster.Builder.class); + } + + // Construct using flyteidl.plugins.Ray.RayCluster.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getWorkerGroupSpecFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (headGroupSpecBuilder_ == null) { + headGroupSpec_ = null; + } else { + headGroupSpec_ = null; + headGroupSpecBuilder_ = null; + } + if (workerGroupSpecBuilder_ == null) { + workerGroupSpec_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + workerGroupSpecBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return flyteidl.plugins.Ray.internal_static_flyteidl_plugins_RayCluster_descriptor; + } + + @java.lang.Override + public flyteidl.plugins.Ray.RayCluster getDefaultInstanceForType() { + return flyteidl.plugins.Ray.RayCluster.getDefaultInstance(); + } + + @java.lang.Override + public flyteidl.plugins.Ray.RayCluster build() { + flyteidl.plugins.Ray.RayCluster result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public flyteidl.plugins.Ray.RayCluster buildPartial() { + flyteidl.plugins.Ray.RayCluster result = new flyteidl.plugins.Ray.RayCluster(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (headGroupSpecBuilder_ == null) { + result.headGroupSpec_ = headGroupSpec_; + } else { + result.headGroupSpec_ = headGroupSpecBuilder_.build(); + } + if (workerGroupSpecBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + workerGroupSpec_ = java.util.Collections.unmodifiableList(workerGroupSpec_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.workerGroupSpec_ = workerGroupSpec_; + } else { + result.workerGroupSpec_ = workerGroupSpecBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + 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.Ray.RayCluster) { + return mergeFrom((flyteidl.plugins.Ray.RayCluster)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(flyteidl.plugins.Ray.RayCluster other) { + if (other == flyteidl.plugins.Ray.RayCluster.getDefaultInstance()) return this; + if (other.hasHeadGroupSpec()) { + mergeHeadGroupSpec(other.getHeadGroupSpec()); + } + if (workerGroupSpecBuilder_ == null) { + if (!other.workerGroupSpec_.isEmpty()) { + if (workerGroupSpec_.isEmpty()) { + workerGroupSpec_ = other.workerGroupSpec_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureWorkerGroupSpecIsMutable(); + workerGroupSpec_.addAll(other.workerGroupSpec_); + } + onChanged(); + } + } else { + if (!other.workerGroupSpec_.isEmpty()) { + if (workerGroupSpecBuilder_.isEmpty()) { + workerGroupSpecBuilder_.dispose(); + workerGroupSpecBuilder_ = null; + workerGroupSpec_ = other.workerGroupSpec_; + bitField0_ = (bitField0_ & ~0x00000002); + workerGroupSpecBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getWorkerGroupSpecFieldBuilder() : null; + } else { + workerGroupSpecBuilder_.addAllMessages(other.workerGroupSpec_); + } + } + } + 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.Ray.RayCluster parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (flyteidl.plugins.Ray.RayCluster) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private flyteidl.plugins.Ray.HeadGroupSpec headGroupSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + flyteidl.plugins.Ray.HeadGroupSpec, flyteidl.plugins.Ray.HeadGroupSpec.Builder, flyteidl.plugins.Ray.HeadGroupSpecOrBuilder> headGroupSpecBuilder_; + /** + *
+       * HeadGroupSpecs are the spec for the head pod
+       * 
+ * + * .flyteidl.plugins.HeadGroupSpec head_group_spec = 1; + */ + public boolean hasHeadGroupSpec() { + return headGroupSpecBuilder_ != null || headGroupSpec_ != null; + } + /** + *
+       * HeadGroupSpecs are the spec for the head pod
+       * 
+ * + * .flyteidl.plugins.HeadGroupSpec head_group_spec = 1; + */ + public flyteidl.plugins.Ray.HeadGroupSpec getHeadGroupSpec() { + if (headGroupSpecBuilder_ == null) { + return headGroupSpec_ == null ? flyteidl.plugins.Ray.HeadGroupSpec.getDefaultInstance() : headGroupSpec_; + } else { + return headGroupSpecBuilder_.getMessage(); + } + } + /** + *
+       * HeadGroupSpecs are the spec for the head pod
+       * 
+ * + * .flyteidl.plugins.HeadGroupSpec head_group_spec = 1; + */ + public Builder setHeadGroupSpec(flyteidl.plugins.Ray.HeadGroupSpec value) { + if (headGroupSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + headGroupSpec_ = value; + onChanged(); + } else { + headGroupSpecBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * HeadGroupSpecs are the spec for the head pod
+       * 
+ * + * .flyteidl.plugins.HeadGroupSpec head_group_spec = 1; + */ + public Builder setHeadGroupSpec( + flyteidl.plugins.Ray.HeadGroupSpec.Builder builderForValue) { + if (headGroupSpecBuilder_ == null) { + headGroupSpec_ = builderForValue.build(); + onChanged(); + } else { + headGroupSpecBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * HeadGroupSpecs are the spec for the head pod
+       * 
+ * + * .flyteidl.plugins.HeadGroupSpec head_group_spec = 1; + */ + public Builder mergeHeadGroupSpec(flyteidl.plugins.Ray.HeadGroupSpec value) { + if (headGroupSpecBuilder_ == null) { + if (headGroupSpec_ != null) { + headGroupSpec_ = + flyteidl.plugins.Ray.HeadGroupSpec.newBuilder(headGroupSpec_).mergeFrom(value).buildPartial(); + } else { + headGroupSpec_ = value; + } + onChanged(); + } else { + headGroupSpecBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * HeadGroupSpecs are the spec for the head pod
+       * 
+ * + * .flyteidl.plugins.HeadGroupSpec head_group_spec = 1; + */ + public Builder clearHeadGroupSpec() { + if (headGroupSpecBuilder_ == null) { + headGroupSpec_ = null; + onChanged(); + } else { + headGroupSpec_ = null; + headGroupSpecBuilder_ = null; + } + + return this; + } + /** + *
+       * HeadGroupSpecs are the spec for the head pod
+       * 
+ * + * .flyteidl.plugins.HeadGroupSpec head_group_spec = 1; + */ + public flyteidl.plugins.Ray.HeadGroupSpec.Builder getHeadGroupSpecBuilder() { + + onChanged(); + return getHeadGroupSpecFieldBuilder().getBuilder(); + } + /** + *
+       * HeadGroupSpecs are the spec for the head pod
+       * 
+ * + * .flyteidl.plugins.HeadGroupSpec head_group_spec = 1; + */ + public flyteidl.plugins.Ray.HeadGroupSpecOrBuilder getHeadGroupSpecOrBuilder() { + if (headGroupSpecBuilder_ != null) { + return headGroupSpecBuilder_.getMessageOrBuilder(); + } else { + return headGroupSpec_ == null ? + flyteidl.plugins.Ray.HeadGroupSpec.getDefaultInstance() : headGroupSpec_; + } + } + /** + *
+       * HeadGroupSpecs are the spec for the head pod
+       * 
+ * + * .flyteidl.plugins.HeadGroupSpec head_group_spec = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + flyteidl.plugins.Ray.HeadGroupSpec, flyteidl.plugins.Ray.HeadGroupSpec.Builder, flyteidl.plugins.Ray.HeadGroupSpecOrBuilder> + getHeadGroupSpecFieldBuilder() { + if (headGroupSpecBuilder_ == null) { + headGroupSpecBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + flyteidl.plugins.Ray.HeadGroupSpec, flyteidl.plugins.Ray.HeadGroupSpec.Builder, flyteidl.plugins.Ray.HeadGroupSpecOrBuilder>( + getHeadGroupSpec(), + getParentForChildren(), + isClean()); + headGroupSpec_ = null; + } + return headGroupSpecBuilder_; + } + + private java.util.List workerGroupSpec_ = + java.util.Collections.emptyList(); + private void ensureWorkerGroupSpecIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + workerGroupSpec_ = new java.util.ArrayList(workerGroupSpec_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + flyteidl.plugins.Ray.WorkerGroupSpec, flyteidl.plugins.Ray.WorkerGroupSpec.Builder, flyteidl.plugins.Ray.WorkerGroupSpecOrBuilder> workerGroupSpecBuilder_; + + /** + *
+       * WorkerGroupSpecs are the specs for the worker pods
+       * 
+ * + * repeated .flyteidl.plugins.WorkerGroupSpec worker_group_spec = 2; + */ + public java.util.List getWorkerGroupSpecList() { + if (workerGroupSpecBuilder_ == null) { + return java.util.Collections.unmodifiableList(workerGroupSpec_); + } else { + return workerGroupSpecBuilder_.getMessageList(); + } + } + /** + *
+       * WorkerGroupSpecs are the specs for the worker pods
+       * 
+ * + * repeated .flyteidl.plugins.WorkerGroupSpec worker_group_spec = 2; + */ + public int getWorkerGroupSpecCount() { + if (workerGroupSpecBuilder_ == null) { + return workerGroupSpec_.size(); + } else { + return workerGroupSpecBuilder_.getCount(); + } + } + /** + *
+       * WorkerGroupSpecs are the specs for the worker pods
+       * 
+ * + * repeated .flyteidl.plugins.WorkerGroupSpec worker_group_spec = 2; + */ + public flyteidl.plugins.Ray.WorkerGroupSpec getWorkerGroupSpec(int index) { + if (workerGroupSpecBuilder_ == null) { + return workerGroupSpec_.get(index); + } else { + return workerGroupSpecBuilder_.getMessage(index); + } + } + /** + *
+       * WorkerGroupSpecs are the specs for the worker pods
+       * 
+ * + * repeated .flyteidl.plugins.WorkerGroupSpec worker_group_spec = 2; + */ + public Builder setWorkerGroupSpec( + int index, flyteidl.plugins.Ray.WorkerGroupSpec value) { + if (workerGroupSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWorkerGroupSpecIsMutable(); + workerGroupSpec_.set(index, value); + onChanged(); + } else { + workerGroupSpecBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * WorkerGroupSpecs are the specs for the worker pods
+       * 
+ * + * repeated .flyteidl.plugins.WorkerGroupSpec worker_group_spec = 2; + */ + public Builder setWorkerGroupSpec( + int index, flyteidl.plugins.Ray.WorkerGroupSpec.Builder builderForValue) { + if (workerGroupSpecBuilder_ == null) { + ensureWorkerGroupSpecIsMutable(); + workerGroupSpec_.set(index, builderForValue.build()); + onChanged(); + } else { + workerGroupSpecBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * WorkerGroupSpecs are the specs for the worker pods
+       * 
+ * + * repeated .flyteidl.plugins.WorkerGroupSpec worker_group_spec = 2; + */ + public Builder addWorkerGroupSpec(flyteidl.plugins.Ray.WorkerGroupSpec value) { + if (workerGroupSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWorkerGroupSpecIsMutable(); + workerGroupSpec_.add(value); + onChanged(); + } else { + workerGroupSpecBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * WorkerGroupSpecs are the specs for the worker pods
+       * 
+ * + * repeated .flyteidl.plugins.WorkerGroupSpec worker_group_spec = 2; + */ + public Builder addWorkerGroupSpec( + int index, flyteidl.plugins.Ray.WorkerGroupSpec value) { + if (workerGroupSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWorkerGroupSpecIsMutable(); + workerGroupSpec_.add(index, value); + onChanged(); + } else { + workerGroupSpecBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * WorkerGroupSpecs are the specs for the worker pods
+       * 
+ * + * repeated .flyteidl.plugins.WorkerGroupSpec worker_group_spec = 2; + */ + public Builder addWorkerGroupSpec( + flyteidl.plugins.Ray.WorkerGroupSpec.Builder builderForValue) { + if (workerGroupSpecBuilder_ == null) { + ensureWorkerGroupSpecIsMutable(); + workerGroupSpec_.add(builderForValue.build()); + onChanged(); + } else { + workerGroupSpecBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * WorkerGroupSpecs are the specs for the worker pods
+       * 
+ * + * repeated .flyteidl.plugins.WorkerGroupSpec worker_group_spec = 2; + */ + public Builder addWorkerGroupSpec( + int index, flyteidl.plugins.Ray.WorkerGroupSpec.Builder builderForValue) { + if (workerGroupSpecBuilder_ == null) { + ensureWorkerGroupSpecIsMutable(); + workerGroupSpec_.add(index, builderForValue.build()); + onChanged(); + } else { + workerGroupSpecBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * WorkerGroupSpecs are the specs for the worker pods
+       * 
+ * + * repeated .flyteidl.plugins.WorkerGroupSpec worker_group_spec = 2; + */ + public Builder addAllWorkerGroupSpec( + java.lang.Iterable values) { + if (workerGroupSpecBuilder_ == null) { + ensureWorkerGroupSpecIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, workerGroupSpec_); + onChanged(); + } else { + workerGroupSpecBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * WorkerGroupSpecs are the specs for the worker pods
+       * 
+ * + * repeated .flyteidl.plugins.WorkerGroupSpec worker_group_spec = 2; + */ + public Builder clearWorkerGroupSpec() { + if (workerGroupSpecBuilder_ == null) { + workerGroupSpec_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + workerGroupSpecBuilder_.clear(); + } + return this; + } + /** + *
+       * WorkerGroupSpecs are the specs for the worker pods
+       * 
+ * + * repeated .flyteidl.plugins.WorkerGroupSpec worker_group_spec = 2; + */ + public Builder removeWorkerGroupSpec(int index) { + if (workerGroupSpecBuilder_ == null) { + ensureWorkerGroupSpecIsMutable(); + workerGroupSpec_.remove(index); + onChanged(); + } else { + workerGroupSpecBuilder_.remove(index); + } + return this; + } + /** + *
+       * WorkerGroupSpecs are the specs for the worker pods
+       * 
+ * + * repeated .flyteidl.plugins.WorkerGroupSpec worker_group_spec = 2; + */ + public flyteidl.plugins.Ray.WorkerGroupSpec.Builder getWorkerGroupSpecBuilder( + int index) { + return getWorkerGroupSpecFieldBuilder().getBuilder(index); + } + /** + *
+       * WorkerGroupSpecs are the specs for the worker pods
+       * 
+ * + * repeated .flyteidl.plugins.WorkerGroupSpec worker_group_spec = 2; + */ + public flyteidl.plugins.Ray.WorkerGroupSpecOrBuilder getWorkerGroupSpecOrBuilder( + int index) { + if (workerGroupSpecBuilder_ == null) { + return workerGroupSpec_.get(index); } else { + return workerGroupSpecBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * WorkerGroupSpecs are the specs for the worker pods
+       * 
+ * + * repeated .flyteidl.plugins.WorkerGroupSpec worker_group_spec = 2; + */ + public java.util.List + getWorkerGroupSpecOrBuilderList() { + if (workerGroupSpecBuilder_ != null) { + return workerGroupSpecBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(workerGroupSpec_); + } + } + /** + *
+       * WorkerGroupSpecs are the specs for the worker pods
+       * 
+ * + * repeated .flyteidl.plugins.WorkerGroupSpec worker_group_spec = 2; + */ + public flyteidl.plugins.Ray.WorkerGroupSpec.Builder addWorkerGroupSpecBuilder() { + return getWorkerGroupSpecFieldBuilder().addBuilder( + flyteidl.plugins.Ray.WorkerGroupSpec.getDefaultInstance()); + } + /** + *
+       * WorkerGroupSpecs are the specs for the worker pods
+       * 
+ * + * repeated .flyteidl.plugins.WorkerGroupSpec worker_group_spec = 2; + */ + public flyteidl.plugins.Ray.WorkerGroupSpec.Builder addWorkerGroupSpecBuilder( + int index) { + return getWorkerGroupSpecFieldBuilder().addBuilder( + index, flyteidl.plugins.Ray.WorkerGroupSpec.getDefaultInstance()); + } + /** + *
+       * WorkerGroupSpecs are the specs for the worker pods
+       * 
+ * + * repeated .flyteidl.plugins.WorkerGroupSpec worker_group_spec = 2; + */ + public java.util.List + getWorkerGroupSpecBuilderList() { + return getWorkerGroupSpecFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + flyteidl.plugins.Ray.WorkerGroupSpec, flyteidl.plugins.Ray.WorkerGroupSpec.Builder, flyteidl.plugins.Ray.WorkerGroupSpecOrBuilder> + getWorkerGroupSpecFieldBuilder() { + if (workerGroupSpecBuilder_ == null) { + workerGroupSpecBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + flyteidl.plugins.Ray.WorkerGroupSpec, flyteidl.plugins.Ray.WorkerGroupSpec.Builder, flyteidl.plugins.Ray.WorkerGroupSpecOrBuilder>( + workerGroupSpec_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + workerGroupSpec_ = null; + } + return workerGroupSpecBuilder_; + } + @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.RayCluster) + } + + // @@protoc_insertion_point(class_scope:flyteidl.plugins.RayCluster) + private static final flyteidl.plugins.Ray.RayCluster DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new flyteidl.plugins.Ray.RayCluster(); + } + + public static flyteidl.plugins.Ray.RayCluster getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RayCluster parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RayCluster(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.Ray.RayCluster getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface HeadGroupSpecOrBuilder extends + // @@protoc_insertion_point(interface_extends:flyteidl.plugins.HeadGroupSpec) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Optional. RayStartParams are the params of the start command: address, object-store-memory.
+     * Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start
+     * 
+ * + * map<string, string> ray_start_params = 1; + */ + int getRayStartParamsCount(); + /** + *
+     * Optional. RayStartParams are the params of the start command: address, object-store-memory.
+     * Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start
+     * 
+ * + * map<string, string> ray_start_params = 1; + */ + boolean containsRayStartParams( + java.lang.String key); + /** + * Use {@link #getRayStartParamsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getRayStartParams(); + /** + *
+     * Optional. RayStartParams are the params of the start command: address, object-store-memory.
+     * Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start
+     * 
+ * + * map<string, string> ray_start_params = 1; + */ + java.util.Map + getRayStartParamsMap(); + /** + *
+     * Optional. RayStartParams are the params of the start command: address, object-store-memory.
+     * Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start
+     * 
+ * + * map<string, string> ray_start_params = 1; + */ + + java.lang.String getRayStartParamsOrDefault( + java.lang.String key, + java.lang.String defaultValue); + /** + *
+     * Optional. RayStartParams are the params of the start command: address, object-store-memory.
+     * Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start
+     * 
+ * + * map<string, string> ray_start_params = 1; + */ + + java.lang.String getRayStartParamsOrThrow( + java.lang.String key); + } + /** + *
+   * HeadGroupSpec are the spec for the head pod
+   * 
+ * + * Protobuf type {@code flyteidl.plugins.HeadGroupSpec} + */ + public static final class HeadGroupSpec extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flyteidl.plugins.HeadGroupSpec) + HeadGroupSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use HeadGroupSpec.newBuilder() to construct. + private HeadGroupSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HeadGroupSpec() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HeadGroupSpec( + 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: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + rayStartParams_ = com.google.protobuf.MapField.newMapField( + RayStartParamsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + rayStartParams__ = input.readMessage( + RayStartParamsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + rayStartParams_.getMutableMap().put( + rayStartParams__.getKey(), rayStartParams__.getValue()); + 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.Ray.internal_static_flyteidl_plugins_HeadGroupSpec_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetRayStartParams(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return flyteidl.plugins.Ray.internal_static_flyteidl_plugins_HeadGroupSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + flyteidl.plugins.Ray.HeadGroupSpec.class, flyteidl.plugins.Ray.HeadGroupSpec.Builder.class); + } + + public static final int RAY_START_PARAMS_FIELD_NUMBER = 1; + private static final class RayStartParamsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + flyteidl.plugins.Ray.internal_static_flyteidl_plugins_HeadGroupSpec_RayStartParamsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> rayStartParams_; + private com.google.protobuf.MapField + internalGetRayStartParams() { + if (rayStartParams_ == null) { + return com.google.protobuf.MapField.emptyMapField( + RayStartParamsDefaultEntryHolder.defaultEntry); + } + return rayStartParams_; + } + + public int getRayStartParamsCount() { + return internalGetRayStartParams().getMap().size(); + } + /** + *
+     * Optional. RayStartParams are the params of the start command: address, object-store-memory.
+     * Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start
+     * 
+ * + * map<string, string> ray_start_params = 1; + */ + + public boolean containsRayStartParams( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetRayStartParams().getMap().containsKey(key); + } + /** + * Use {@link #getRayStartParamsMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getRayStartParams() { + return getRayStartParamsMap(); + } + /** + *
+     * Optional. RayStartParams are the params of the start command: address, object-store-memory.
+     * Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start
+     * 
+ * + * map<string, string> ray_start_params = 1; + */ + + public java.util.Map getRayStartParamsMap() { + return internalGetRayStartParams().getMap(); + } + /** + *
+     * Optional. RayStartParams are the params of the start command: address, object-store-memory.
+     * Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start
+     * 
+ * + * map<string, string> ray_start_params = 1; + */ + + public java.lang.String getRayStartParamsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetRayStartParams().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Optional. RayStartParams are the params of the start command: address, object-store-memory.
+     * Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start
+     * 
+ * + * map<string, string> ray_start_params = 1; + */ + + public java.lang.String getRayStartParamsOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetRayStartParams().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + 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 { + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetRayStartParams(), + RayStartParamsDefaultEntryHolder.defaultEntry, + 1); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry + : internalGetRayStartParams().getMap().entrySet()) { + com.google.protobuf.MapEntry + rayStartParams__ = RayStartParamsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, rayStartParams__); + } + 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.Ray.HeadGroupSpec)) { + return super.equals(obj); + } + flyteidl.plugins.Ray.HeadGroupSpec other = (flyteidl.plugins.Ray.HeadGroupSpec) obj; + + if (!internalGetRayStartParams().equals( + other.internalGetRayStartParams())) 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 (!internalGetRayStartParams().getMap().isEmpty()) { + hash = (37 * hash) + RAY_START_PARAMS_FIELD_NUMBER; + hash = (53 * hash) + internalGetRayStartParams().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static flyteidl.plugins.Ray.HeadGroupSpec parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.plugins.Ray.HeadGroupSpec parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static flyteidl.plugins.Ray.HeadGroupSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.plugins.Ray.HeadGroupSpec 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.Ray.HeadGroupSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.plugins.Ray.HeadGroupSpec parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static flyteidl.plugins.Ray.HeadGroupSpec parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static flyteidl.plugins.Ray.HeadGroupSpec 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.Ray.HeadGroupSpec parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static flyteidl.plugins.Ray.HeadGroupSpec 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.Ray.HeadGroupSpec parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static flyteidl.plugins.Ray.HeadGroupSpec 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.Ray.HeadGroupSpec 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; + } + /** + *
+     * HeadGroupSpec are the spec for the head pod
+     * 
+ * + * Protobuf type {@code flyteidl.plugins.HeadGroupSpec} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flyteidl.plugins.HeadGroupSpec) + flyteidl.plugins.Ray.HeadGroupSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return flyteidl.plugins.Ray.internal_static_flyteidl_plugins_HeadGroupSpec_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetRayStartParams(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 1: + return internalGetMutableRayStartParams(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return flyteidl.plugins.Ray.internal_static_flyteidl_plugins_HeadGroupSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + flyteidl.plugins.Ray.HeadGroupSpec.class, flyteidl.plugins.Ray.HeadGroupSpec.Builder.class); + } + + // Construct using flyteidl.plugins.Ray.HeadGroupSpec.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(); + internalGetMutableRayStartParams().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return flyteidl.plugins.Ray.internal_static_flyteidl_plugins_HeadGroupSpec_descriptor; + } + + @java.lang.Override + public flyteidl.plugins.Ray.HeadGroupSpec getDefaultInstanceForType() { + return flyteidl.plugins.Ray.HeadGroupSpec.getDefaultInstance(); + } + + @java.lang.Override + public flyteidl.plugins.Ray.HeadGroupSpec build() { + flyteidl.plugins.Ray.HeadGroupSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public flyteidl.plugins.Ray.HeadGroupSpec buildPartial() { + flyteidl.plugins.Ray.HeadGroupSpec result = new flyteidl.plugins.Ray.HeadGroupSpec(this); + int from_bitField0_ = bitField0_; + result.rayStartParams_ = internalGetRayStartParams(); + result.rayStartParams_.makeImmutable(); + 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.Ray.HeadGroupSpec) { + return mergeFrom((flyteidl.plugins.Ray.HeadGroupSpec)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(flyteidl.plugins.Ray.HeadGroupSpec other) { + if (other == flyteidl.plugins.Ray.HeadGroupSpec.getDefaultInstance()) return this; + internalGetMutableRayStartParams().mergeFrom( + other.internalGetRayStartParams()); + 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.Ray.HeadGroupSpec parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (flyteidl.plugins.Ray.HeadGroupSpec) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> rayStartParams_; + private com.google.protobuf.MapField + internalGetRayStartParams() { + if (rayStartParams_ == null) { + return com.google.protobuf.MapField.emptyMapField( + RayStartParamsDefaultEntryHolder.defaultEntry); + } + return rayStartParams_; + } + private com.google.protobuf.MapField + internalGetMutableRayStartParams() { + onChanged();; + if (rayStartParams_ == null) { + rayStartParams_ = com.google.protobuf.MapField.newMapField( + RayStartParamsDefaultEntryHolder.defaultEntry); + } + if (!rayStartParams_.isMutable()) { + rayStartParams_ = rayStartParams_.copy(); + } + return rayStartParams_; + } + + public int getRayStartParamsCount() { + return internalGetRayStartParams().getMap().size(); + } + /** + *
+       * Optional. RayStartParams are the params of the start command: address, object-store-memory.
+       * Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start
+       * 
+ * + * map<string, string> ray_start_params = 1; + */ + + public boolean containsRayStartParams( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetRayStartParams().getMap().containsKey(key); + } + /** + * Use {@link #getRayStartParamsMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getRayStartParams() { + return getRayStartParamsMap(); + } + /** + *
+       * Optional. RayStartParams are the params of the start command: address, object-store-memory.
+       * Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start
+       * 
+ * + * map<string, string> ray_start_params = 1; + */ + + public java.util.Map getRayStartParamsMap() { + return internalGetRayStartParams().getMap(); + } + /** + *
+       * Optional. RayStartParams are the params of the start command: address, object-store-memory.
+       * Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start
+       * 
+ * + * map<string, string> ray_start_params = 1; + */ + + public java.lang.String getRayStartParamsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetRayStartParams().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+       * Optional. RayStartParams are the params of the start command: address, object-store-memory.
+       * Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start
+       * 
+ * + * map<string, string> ray_start_params = 1; + */ + + public java.lang.String getRayStartParamsOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetRayStartParams().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearRayStartParams() { + internalGetMutableRayStartParams().getMutableMap() + .clear(); + return this; + } + /** + *
+       * Optional. RayStartParams are the params of the start command: address, object-store-memory.
+       * Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start
+       * 
+ * + * map<string, string> ray_start_params = 1; + */ + + public Builder removeRayStartParams( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableRayStartParams().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableRayStartParams() { + return internalGetMutableRayStartParams().getMutableMap(); + } + /** + *
+       * Optional. RayStartParams are the params of the start command: address, object-store-memory.
+       * Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start
+       * 
+ * + * map<string, string> ray_start_params = 1; + */ + public Builder putRayStartParams( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableRayStartParams().getMutableMap() + .put(key, value); + return this; + } + /** + *
+       * Optional. RayStartParams are the params of the start command: address, object-store-memory.
+       * Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start
+       * 
+ * + * map<string, string> ray_start_params = 1; + */ + + public Builder putAllRayStartParams( + java.util.Map values) { + internalGetMutableRayStartParams().getMutableMap() + .putAll(values); + return this; + } + @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.HeadGroupSpec) + } + + // @@protoc_insertion_point(class_scope:flyteidl.plugins.HeadGroupSpec) + private static final flyteidl.plugins.Ray.HeadGroupSpec DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new flyteidl.plugins.Ray.HeadGroupSpec(); + } + + public static flyteidl.plugins.Ray.HeadGroupSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HeadGroupSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HeadGroupSpec(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.Ray.HeadGroupSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface WorkerGroupSpecOrBuilder extends + // @@protoc_insertion_point(interface_extends:flyteidl.plugins.WorkerGroupSpec) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Required. RayCluster can have multiple worker groups, and it distinguishes them by name
+     * 
+ * + * string group_name = 1; + */ + java.lang.String getGroupName(); + /** + *
+     * Required. RayCluster can have multiple worker groups, and it distinguishes them by name
+     * 
+ * + * string group_name = 1; + */ + com.google.protobuf.ByteString + getGroupNameBytes(); + + /** + *
+     * Required. Desired replicas of the worker group. Defaults to 1.
+     * 
+ * + * int32 replicas = 2; + */ + int getReplicas(); + + /** + *
+     * Optional. Min replicas of the worker group. MinReplicas defaults to 1.
+     * 
+ * + * int32 min_replicas = 3; + */ + int getMinReplicas(); + + /** + *
+     * Optional. Max replicas of the worker group. MaxReplicas defaults to maxInt32
+     * 
+ * + * int32 max_replicas = 4; + */ + int getMaxReplicas(); + + /** + *
+     * Optional. RayStartParams are the params of the start command: address, object-store-memory.
+     * Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start
+     * 
+ * + * map<string, string> ray_start_params = 5; + */ + int getRayStartParamsCount(); + /** + *
+     * Optional. RayStartParams are the params of the start command: address, object-store-memory.
+     * Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start
+     * 
+ * + * map<string, string> ray_start_params = 5; + */ + boolean containsRayStartParams( + java.lang.String key); + /** + * Use {@link #getRayStartParamsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getRayStartParams(); + /** + *
+     * Optional. RayStartParams are the params of the start command: address, object-store-memory.
+     * Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start
+     * 
+ * + * map<string, string> ray_start_params = 5; + */ + java.util.Map + getRayStartParamsMap(); + /** + *
+     * Optional. RayStartParams are the params of the start command: address, object-store-memory.
+     * Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start
+     * 
+ * + * map<string, string> ray_start_params = 5; + */ + + java.lang.String getRayStartParamsOrDefault( + java.lang.String key, + java.lang.String defaultValue); + /** + *
+     * Optional. RayStartParams are the params of the start command: address, object-store-memory.
+     * Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start
+     * 
+ * + * map<string, string> ray_start_params = 5; + */ + + java.lang.String getRayStartParamsOrThrow( + java.lang.String key); + } + /** + *
+   * WorkerGroupSpec are the specs for the worker pods
+   * 
+ * + * Protobuf type {@code flyteidl.plugins.WorkerGroupSpec} + */ + public static final class WorkerGroupSpec extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flyteidl.plugins.WorkerGroupSpec) + WorkerGroupSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use WorkerGroupSpec.newBuilder() to construct. + private WorkerGroupSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WorkerGroupSpec() { + groupName_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private WorkerGroupSpec( + 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(); + + groupName_ = s; + break; + } + case 16: { + + replicas_ = input.readInt32(); + break; + } + case 24: { + + minReplicas_ = input.readInt32(); + break; + } + case 32: { + + maxReplicas_ = input.readInt32(); + break; + } + case 42: { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + rayStartParams_ = com.google.protobuf.MapField.newMapField( + RayStartParamsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000010; + } + com.google.protobuf.MapEntry + rayStartParams__ = input.readMessage( + RayStartParamsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + rayStartParams_.getMutableMap().put( + rayStartParams__.getKey(), rayStartParams__.getValue()); + 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.Ray.internal_static_flyteidl_plugins_WorkerGroupSpec_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 5: + return internalGetRayStartParams(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return flyteidl.plugins.Ray.internal_static_flyteidl_plugins_WorkerGroupSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + flyteidl.plugins.Ray.WorkerGroupSpec.class, flyteidl.plugins.Ray.WorkerGroupSpec.Builder.class); + } + + private int bitField0_; + public static final int GROUP_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object groupName_; + /** + *
+     * Required. RayCluster can have multiple worker groups, and it distinguishes them by name
+     * 
+ * + * string group_name = 1; + */ + public java.lang.String getGroupName() { + java.lang.Object ref = groupName_; + 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(); + groupName_ = s; + return s; + } + } + /** + *
+     * Required. RayCluster can have multiple worker groups, and it distinguishes them by name
+     * 
+ * + * string group_name = 1; + */ + public com.google.protobuf.ByteString + getGroupNameBytes() { + java.lang.Object ref = groupName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REPLICAS_FIELD_NUMBER = 2; + private int replicas_; + /** + *
+     * Required. Desired replicas of the worker group. Defaults to 1.
+     * 
+ * + * int32 replicas = 2; + */ + public int getReplicas() { + return replicas_; + } + + public static final int MIN_REPLICAS_FIELD_NUMBER = 3; + private int minReplicas_; + /** + *
+     * Optional. Min replicas of the worker group. MinReplicas defaults to 1.
+     * 
+ * + * int32 min_replicas = 3; + */ + public int getMinReplicas() { + return minReplicas_; + } + + public static final int MAX_REPLICAS_FIELD_NUMBER = 4; + private int maxReplicas_; + /** + *
+     * Optional. Max replicas of the worker group. MaxReplicas defaults to maxInt32
+     * 
+ * + * int32 max_replicas = 4; + */ + public int getMaxReplicas() { + return maxReplicas_; + } + + public static final int RAY_START_PARAMS_FIELD_NUMBER = 5; + private static final class RayStartParamsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + flyteidl.plugins.Ray.internal_static_flyteidl_plugins_WorkerGroupSpec_RayStartParamsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> rayStartParams_; + private com.google.protobuf.MapField + internalGetRayStartParams() { + if (rayStartParams_ == null) { + return com.google.protobuf.MapField.emptyMapField( + RayStartParamsDefaultEntryHolder.defaultEntry); + } + return rayStartParams_; + } + + public int getRayStartParamsCount() { + return internalGetRayStartParams().getMap().size(); + } + /** + *
+     * Optional. RayStartParams are the params of the start command: address, object-store-memory.
+     * Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start
+     * 
+ * + * map<string, string> ray_start_params = 5; + */ + + public boolean containsRayStartParams( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetRayStartParams().getMap().containsKey(key); + } + /** + * Use {@link #getRayStartParamsMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getRayStartParams() { + return getRayStartParamsMap(); + } + /** + *
+     * Optional. RayStartParams are the params of the start command: address, object-store-memory.
+     * Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start
+     * 
+ * + * map<string, string> ray_start_params = 5; + */ + + public java.util.Map getRayStartParamsMap() { + return internalGetRayStartParams().getMap(); + } + /** + *
+     * Optional. RayStartParams are the params of the start command: address, object-store-memory.
+     * Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start
+     * 
+ * + * map<string, string> ray_start_params = 5; + */ + + public java.lang.String getRayStartParamsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetRayStartParams().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Optional. RayStartParams are the params of the start command: address, object-store-memory.
+     * Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start
+     * 
+ * + * map<string, string> ray_start_params = 5; + */ + + public java.lang.String getRayStartParamsOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetRayStartParams().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + 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 (!getGroupNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, groupName_); + } + if (replicas_ != 0) { + output.writeInt32(2, replicas_); + } + if (minReplicas_ != 0) { + output.writeInt32(3, minReplicas_); + } + if (maxReplicas_ != 0) { + output.writeInt32(4, maxReplicas_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetRayStartParams(), + RayStartParamsDefaultEntryHolder.defaultEntry, + 5); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getGroupNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, groupName_); + } + if (replicas_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, replicas_); + } + if (minReplicas_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, minReplicas_); + } + if (maxReplicas_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, maxReplicas_); + } + for (java.util.Map.Entry entry + : internalGetRayStartParams().getMap().entrySet()) { + com.google.protobuf.MapEntry + rayStartParams__ = RayStartParamsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, rayStartParams__); + } + 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.Ray.WorkerGroupSpec)) { + return super.equals(obj); + } + flyteidl.plugins.Ray.WorkerGroupSpec other = (flyteidl.plugins.Ray.WorkerGroupSpec) obj; + + if (!getGroupName() + .equals(other.getGroupName())) return false; + if (getReplicas() + != other.getReplicas()) return false; + if (getMinReplicas() + != other.getMinReplicas()) return false; + if (getMaxReplicas() + != other.getMaxReplicas()) return false; + if (!internalGetRayStartParams().equals( + other.internalGetRayStartParams())) 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) + GROUP_NAME_FIELD_NUMBER; + hash = (53 * hash) + getGroupName().hashCode(); + hash = (37 * hash) + REPLICAS_FIELD_NUMBER; + hash = (53 * hash) + getReplicas(); + hash = (37 * hash) + MIN_REPLICAS_FIELD_NUMBER; + hash = (53 * hash) + getMinReplicas(); + hash = (37 * hash) + MAX_REPLICAS_FIELD_NUMBER; + hash = (53 * hash) + getMaxReplicas(); + if (!internalGetRayStartParams().getMap().isEmpty()) { + hash = (37 * hash) + RAY_START_PARAMS_FIELD_NUMBER; + hash = (53 * hash) + internalGetRayStartParams().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static flyteidl.plugins.Ray.WorkerGroupSpec parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.plugins.Ray.WorkerGroupSpec parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static flyteidl.plugins.Ray.WorkerGroupSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.plugins.Ray.WorkerGroupSpec 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.Ray.WorkerGroupSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.plugins.Ray.WorkerGroupSpec parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static flyteidl.plugins.Ray.WorkerGroupSpec parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static flyteidl.plugins.Ray.WorkerGroupSpec 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.Ray.WorkerGroupSpec parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static flyteidl.plugins.Ray.WorkerGroupSpec 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.Ray.WorkerGroupSpec parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static flyteidl.plugins.Ray.WorkerGroupSpec 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.Ray.WorkerGroupSpec 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; + } + /** + *
+     * WorkerGroupSpec are the specs for the worker pods
+     * 
+ * + * Protobuf type {@code flyteidl.plugins.WorkerGroupSpec} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flyteidl.plugins.WorkerGroupSpec) + flyteidl.plugins.Ray.WorkerGroupSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return flyteidl.plugins.Ray.internal_static_flyteidl_plugins_WorkerGroupSpec_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 5: + return internalGetRayStartParams(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 5: + return internalGetMutableRayStartParams(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return flyteidl.plugins.Ray.internal_static_flyteidl_plugins_WorkerGroupSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + flyteidl.plugins.Ray.WorkerGroupSpec.class, flyteidl.plugins.Ray.WorkerGroupSpec.Builder.class); + } + + // Construct using flyteidl.plugins.Ray.WorkerGroupSpec.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(); + groupName_ = ""; + + replicas_ = 0; + + minReplicas_ = 0; + + maxReplicas_ = 0; + + internalGetMutableRayStartParams().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return flyteidl.plugins.Ray.internal_static_flyteidl_plugins_WorkerGroupSpec_descriptor; + } + + @java.lang.Override + public flyteidl.plugins.Ray.WorkerGroupSpec getDefaultInstanceForType() { + return flyteidl.plugins.Ray.WorkerGroupSpec.getDefaultInstance(); + } + + @java.lang.Override + public flyteidl.plugins.Ray.WorkerGroupSpec build() { + flyteidl.plugins.Ray.WorkerGroupSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public flyteidl.plugins.Ray.WorkerGroupSpec buildPartial() { + flyteidl.plugins.Ray.WorkerGroupSpec result = new flyteidl.plugins.Ray.WorkerGroupSpec(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.groupName_ = groupName_; + result.replicas_ = replicas_; + result.minReplicas_ = minReplicas_; + result.maxReplicas_ = maxReplicas_; + result.rayStartParams_ = internalGetRayStartParams(); + result.rayStartParams_.makeImmutable(); + result.bitField0_ = to_bitField0_; + 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.Ray.WorkerGroupSpec) { + return mergeFrom((flyteidl.plugins.Ray.WorkerGroupSpec)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(flyteidl.plugins.Ray.WorkerGroupSpec other) { + if (other == flyteidl.plugins.Ray.WorkerGroupSpec.getDefaultInstance()) return this; + if (!other.getGroupName().isEmpty()) { + groupName_ = other.groupName_; + onChanged(); + } + if (other.getReplicas() != 0) { + setReplicas(other.getReplicas()); + } + if (other.getMinReplicas() != 0) { + setMinReplicas(other.getMinReplicas()); + } + if (other.getMaxReplicas() != 0) { + setMaxReplicas(other.getMaxReplicas()); + } + internalGetMutableRayStartParams().mergeFrom( + other.internalGetRayStartParams()); + 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.Ray.WorkerGroupSpec parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (flyteidl.plugins.Ray.WorkerGroupSpec) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object groupName_ = ""; + /** + *
+       * Required. RayCluster can have multiple worker groups, and it distinguishes them by name
+       * 
+ * + * string group_name = 1; + */ + public java.lang.String getGroupName() { + java.lang.Object ref = groupName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Required. RayCluster can have multiple worker groups, and it distinguishes them by name
+       * 
+ * + * string group_name = 1; + */ + public com.google.protobuf.ByteString + getGroupNameBytes() { + java.lang.Object ref = groupName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Required. RayCluster can have multiple worker groups, and it distinguishes them by name
+       * 
+ * + * string group_name = 1; + */ + public Builder setGroupName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + groupName_ = value; + onChanged(); + return this; + } + /** + *
+       * Required. RayCluster can have multiple worker groups, and it distinguishes them by name
+       * 
+ * + * string group_name = 1; + */ + public Builder clearGroupName() { + + groupName_ = getDefaultInstance().getGroupName(); + onChanged(); + return this; + } + /** + *
+       * Required. RayCluster can have multiple worker groups, and it distinguishes them by name
+       * 
+ * + * string group_name = 1; + */ + public Builder setGroupNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + groupName_ = value; + onChanged(); + return this; + } + + private int replicas_ ; + /** + *
+       * Required. Desired replicas of the worker group. Defaults to 1.
+       * 
+ * + * int32 replicas = 2; + */ + public int getReplicas() { + return replicas_; + } + /** + *
+       * Required. Desired replicas of the worker group. Defaults to 1.
+       * 
+ * + * int32 replicas = 2; + */ + public Builder setReplicas(int value) { + + replicas_ = value; + onChanged(); + return this; + } + /** + *
+       * Required. Desired replicas of the worker group. Defaults to 1.
+       * 
+ * + * int32 replicas = 2; + */ + public Builder clearReplicas() { + + replicas_ = 0; + onChanged(); + return this; + } + + private int minReplicas_ ; + /** + *
+       * Optional. Min replicas of the worker group. MinReplicas defaults to 1.
+       * 
+ * + * int32 min_replicas = 3; + */ + public int getMinReplicas() { + return minReplicas_; + } + /** + *
+       * Optional. Min replicas of the worker group. MinReplicas defaults to 1.
+       * 
+ * + * int32 min_replicas = 3; + */ + public Builder setMinReplicas(int value) { + + minReplicas_ = value; + onChanged(); + return this; + } + /** + *
+       * Optional. Min replicas of the worker group. MinReplicas defaults to 1.
+       * 
+ * + * int32 min_replicas = 3; + */ + public Builder clearMinReplicas() { + + minReplicas_ = 0; + onChanged(); + return this; + } + + private int maxReplicas_ ; + /** + *
+       * Optional. Max replicas of the worker group. MaxReplicas defaults to maxInt32
+       * 
+ * + * int32 max_replicas = 4; + */ + public int getMaxReplicas() { + return maxReplicas_; + } + /** + *
+       * Optional. Max replicas of the worker group. MaxReplicas defaults to maxInt32
+       * 
+ * + * int32 max_replicas = 4; + */ + public Builder setMaxReplicas(int value) { + + maxReplicas_ = value; + onChanged(); + return this; + } + /** + *
+       * Optional. Max replicas of the worker group. MaxReplicas defaults to maxInt32
+       * 
+ * + * int32 max_replicas = 4; + */ + public Builder clearMaxReplicas() { + + maxReplicas_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> rayStartParams_; + private com.google.protobuf.MapField + internalGetRayStartParams() { + if (rayStartParams_ == null) { + return com.google.protobuf.MapField.emptyMapField( + RayStartParamsDefaultEntryHolder.defaultEntry); + } + return rayStartParams_; + } + private com.google.protobuf.MapField + internalGetMutableRayStartParams() { + onChanged();; + if (rayStartParams_ == null) { + rayStartParams_ = com.google.protobuf.MapField.newMapField( + RayStartParamsDefaultEntryHolder.defaultEntry); + } + if (!rayStartParams_.isMutable()) { + rayStartParams_ = rayStartParams_.copy(); + } + return rayStartParams_; + } + + public int getRayStartParamsCount() { + return internalGetRayStartParams().getMap().size(); + } + /** + *
+       * Optional. RayStartParams are the params of the start command: address, object-store-memory.
+       * Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start
+       * 
+ * + * map<string, string> ray_start_params = 5; + */ + + public boolean containsRayStartParams( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetRayStartParams().getMap().containsKey(key); + } + /** + * Use {@link #getRayStartParamsMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getRayStartParams() { + return getRayStartParamsMap(); + } + /** + *
+       * Optional. RayStartParams are the params of the start command: address, object-store-memory.
+       * Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start
+       * 
+ * + * map<string, string> ray_start_params = 5; + */ + + public java.util.Map getRayStartParamsMap() { + return internalGetRayStartParams().getMap(); + } + /** + *
+       * Optional. RayStartParams are the params of the start command: address, object-store-memory.
+       * Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start
+       * 
+ * + * map<string, string> ray_start_params = 5; + */ + + public java.lang.String getRayStartParamsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetRayStartParams().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+       * Optional. RayStartParams are the params of the start command: address, object-store-memory.
+       * Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start
+       * 
+ * + * map<string, string> ray_start_params = 5; + */ + + public java.lang.String getRayStartParamsOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetRayStartParams().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearRayStartParams() { + internalGetMutableRayStartParams().getMutableMap() + .clear(); + return this; + } + /** + *
+       * Optional. RayStartParams are the params of the start command: address, object-store-memory.
+       * Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start
+       * 
+ * + * map<string, string> ray_start_params = 5; + */ + + public Builder removeRayStartParams( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableRayStartParams().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableRayStartParams() { + return internalGetMutableRayStartParams().getMutableMap(); + } + /** + *
+       * Optional. RayStartParams are the params of the start command: address, object-store-memory.
+       * Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start
+       * 
+ * + * map<string, string> ray_start_params = 5; + */ + public Builder putRayStartParams( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableRayStartParams().getMutableMap() + .put(key, value); + return this; + } + /** + *
+       * Optional. RayStartParams are the params of the start command: address, object-store-memory.
+       * Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start
+       * 
+ * + * map<string, string> ray_start_params = 5; + */ + + public Builder putAllRayStartParams( + java.util.Map values) { + internalGetMutableRayStartParams().getMutableMap() + .putAll(values); + return this; + } + @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.WorkerGroupSpec) + } + + // @@protoc_insertion_point(class_scope:flyteidl.plugins.WorkerGroupSpec) + private static final flyteidl.plugins.Ray.WorkerGroupSpec DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new flyteidl.plugins.Ray.WorkerGroupSpec(); + } + + public static flyteidl.plugins.Ray.WorkerGroupSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WorkerGroupSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WorkerGroupSpec(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.Ray.WorkerGroupSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flyteidl_plugins_RayJob_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flyteidl_plugins_RayJob_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flyteidl_plugins_RayCluster_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flyteidl_plugins_RayCluster_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flyteidl_plugins_HeadGroupSpec_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flyteidl_plugins_HeadGroupSpec_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flyteidl_plugins_HeadGroupSpec_RayStartParamsEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flyteidl_plugins_HeadGroupSpec_RayStartParamsEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flyteidl_plugins_WorkerGroupSpec_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flyteidl_plugins_WorkerGroupSpec_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flyteidl_plugins_WorkerGroupSpec_RayStartParamsEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flyteidl_plugins_WorkerGroupSpec_RayStartParamsEntry_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\032flyteidl/plugins/ray.proto\022\020flyteidl.p" + + "lugins\032\037google/protobuf/timestamp.proto\"" + + "P\n\006RayJob\0221\n\013ray_cluster\030\001 \001(\0132\034.flyteid" + + "l.plugins.RayCluster\022\023\n\013runtime_env\030\002 \001(" + + "\t\"\204\001\n\nRayCluster\0228\n\017head_group_spec\030\001 \001(" + + "\0132\037.flyteidl.plugins.HeadGroupSpec\022<\n\021wo" + + "rker_group_spec\030\002 \003(\0132!.flyteidl.plugins" + + ".WorkerGroupSpec\"\225\001\n\rHeadGroupSpec\022M\n\020ra" + + "y_start_params\030\001 \003(\01323.flyteidl.plugins." + + "HeadGroupSpec.RayStartParamsEntry\0325\n\023Ray" + + "StartParamsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002" + + " \001(\t:\0028\001\"\353\001\n\017WorkerGroupSpec\022\022\n\ngroup_na" + + "me\030\001 \001(\t\022\020\n\010replicas\030\002 \001(\005\022\024\n\014min_replic" + + "as\030\003 \001(\005\022\024\n\014max_replicas\030\004 \001(\005\022O\n\020ray_st" + + "art_params\030\005 \003(\01325.flyteidl.plugins.Work" + + "erGroupSpec.RayStartParamsEntry\0325\n\023RaySt" + + "artParamsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001" + + "(\t:\0028\001B9Z7github.com/flyteorg/flyteidl/g" + + "en/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[] { + com.google.protobuf.TimestampProto.getDescriptor(), + }, assigner); + internal_static_flyteidl_plugins_RayJob_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_flyteidl_plugins_RayJob_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flyteidl_plugins_RayJob_descriptor, + new java.lang.String[] { "RayCluster", "RuntimeEnv", }); + internal_static_flyteidl_plugins_RayCluster_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_flyteidl_plugins_RayCluster_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flyteidl_plugins_RayCluster_descriptor, + new java.lang.String[] { "HeadGroupSpec", "WorkerGroupSpec", }); + internal_static_flyteidl_plugins_HeadGroupSpec_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_flyteidl_plugins_HeadGroupSpec_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flyteidl_plugins_HeadGroupSpec_descriptor, + new java.lang.String[] { "RayStartParams", }); + internal_static_flyteidl_plugins_HeadGroupSpec_RayStartParamsEntry_descriptor = + internal_static_flyteidl_plugins_HeadGroupSpec_descriptor.getNestedTypes().get(0); + internal_static_flyteidl_plugins_HeadGroupSpec_RayStartParamsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flyteidl_plugins_HeadGroupSpec_RayStartParamsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_flyteidl_plugins_WorkerGroupSpec_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_flyteidl_plugins_WorkerGroupSpec_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flyteidl_plugins_WorkerGroupSpec_descriptor, + new java.lang.String[] { "GroupName", "Replicas", "MinReplicas", "MaxReplicas", "RayStartParams", }); + internal_static_flyteidl_plugins_WorkerGroupSpec_RayStartParamsEntry_descriptor = + internal_static_flyteidl_plugins_WorkerGroupSpec_descriptor.getNestedTypes().get(0); + internal_static_flyteidl_plugins_WorkerGroupSpec_RayStartParamsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flyteidl_plugins_WorkerGroupSpec_RayStartParamsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/flyteidl/gen/pb_python/flyteidl/plugins/ray_pb2.py b/flyteidl/gen/pb_python/flyteidl/plugins/ray_pb2.py new file mode 100644 index 0000000000..56a2a45ef6 --- /dev/null +++ b/flyteidl/gen/pb_python/flyteidl/plugins/ray_pb2.py @@ -0,0 +1,331 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: flyteidl/plugins/ray.proto + +import sys +_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='flyteidl/plugins/ray.proto', + package='flyteidl.plugins', + syntax='proto3', + serialized_options=_b('Z7github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/plugins'), + serialized_pb=_b('\n\x1a\x66lyteidl/plugins/ray.proto\x12\x10\x66lyteidl.plugins\x1a\x1fgoogle/protobuf/timestamp.proto\"P\n\x06RayJob\x12\x31\n\x0bray_cluster\x18\x01 \x01(\x0b\x32\x1c.flyteidl.plugins.RayCluster\x12\x13\n\x0bruntime_env\x18\x02 \x01(\t\"\x84\x01\n\nRayCluster\x12\x38\n\x0fhead_group_spec\x18\x01 \x01(\x0b\x32\x1f.flyteidl.plugins.HeadGroupSpec\x12<\n\x11worker_group_spec\x18\x02 \x03(\x0b\x32!.flyteidl.plugins.WorkerGroupSpec\"\x95\x01\n\rHeadGroupSpec\x12M\n\x10ray_start_params\x18\x01 \x03(\x0b\x32\x33.flyteidl.plugins.HeadGroupSpec.RayStartParamsEntry\x1a\x35\n\x13RayStartParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xeb\x01\n\x0fWorkerGroupSpec\x12\x12\n\ngroup_name\x18\x01 \x01(\t\x12\x10\n\x08replicas\x18\x02 \x01(\x05\x12\x14\n\x0cmin_replicas\x18\x03 \x01(\x05\x12\x14\n\x0cmax_replicas\x18\x04 \x01(\x05\x12O\n\x10ray_start_params\x18\x05 \x03(\x0b\x32\x35.flyteidl.plugins.WorkerGroupSpec.RayStartParamsEntry\x1a\x35\n\x13RayStartParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x39Z7github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/pluginsb\x06proto3') + , + dependencies=[google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,]) + + + + +_RAYJOB = _descriptor.Descriptor( + name='RayJob', + full_name='flyteidl.plugins.RayJob', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='ray_cluster', full_name='flyteidl.plugins.RayJob.ray_cluster', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='runtime_env', full_name='flyteidl.plugins.RayJob.runtime_env', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=81, + serialized_end=161, +) + + +_RAYCLUSTER = _descriptor.Descriptor( + name='RayCluster', + full_name='flyteidl.plugins.RayCluster', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='head_group_spec', full_name='flyteidl.plugins.RayCluster.head_group_spec', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='worker_group_spec', full_name='flyteidl.plugins.RayCluster.worker_group_spec', index=1, + number=2, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=164, + serialized_end=296, +) + + +_HEADGROUPSPEC_RAYSTARTPARAMSENTRY = _descriptor.Descriptor( + name='RayStartParamsEntry', + full_name='flyteidl.plugins.HeadGroupSpec.RayStartParamsEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='flyteidl.plugins.HeadGroupSpec.RayStartParamsEntry.key', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='value', full_name='flyteidl.plugins.HeadGroupSpec.RayStartParamsEntry.value', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=_b('8\001'), + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=395, + serialized_end=448, +) + +_HEADGROUPSPEC = _descriptor.Descriptor( + name='HeadGroupSpec', + full_name='flyteidl.plugins.HeadGroupSpec', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='ray_start_params', full_name='flyteidl.plugins.HeadGroupSpec.ray_start_params', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[_HEADGROUPSPEC_RAYSTARTPARAMSENTRY, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=299, + serialized_end=448, +) + + +_WORKERGROUPSPEC_RAYSTARTPARAMSENTRY = _descriptor.Descriptor( + name='RayStartParamsEntry', + full_name='flyteidl.plugins.WorkerGroupSpec.RayStartParamsEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='flyteidl.plugins.WorkerGroupSpec.RayStartParamsEntry.key', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='value', full_name='flyteidl.plugins.WorkerGroupSpec.RayStartParamsEntry.value', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=_b('8\001'), + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=395, + serialized_end=448, +) + +_WORKERGROUPSPEC = _descriptor.Descriptor( + name='WorkerGroupSpec', + full_name='flyteidl.plugins.WorkerGroupSpec', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='group_name', full_name='flyteidl.plugins.WorkerGroupSpec.group_name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='replicas', full_name='flyteidl.plugins.WorkerGroupSpec.replicas', index=1, + number=2, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='min_replicas', full_name='flyteidl.plugins.WorkerGroupSpec.min_replicas', index=2, + number=3, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='max_replicas', full_name='flyteidl.plugins.WorkerGroupSpec.max_replicas', index=3, + number=4, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='ray_start_params', full_name='flyteidl.plugins.WorkerGroupSpec.ray_start_params', index=4, + number=5, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[_WORKERGROUPSPEC_RAYSTARTPARAMSENTRY, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=451, + serialized_end=686, +) + +_RAYJOB.fields_by_name['ray_cluster'].message_type = _RAYCLUSTER +_RAYCLUSTER.fields_by_name['head_group_spec'].message_type = _HEADGROUPSPEC +_RAYCLUSTER.fields_by_name['worker_group_spec'].message_type = _WORKERGROUPSPEC +_HEADGROUPSPEC_RAYSTARTPARAMSENTRY.containing_type = _HEADGROUPSPEC +_HEADGROUPSPEC.fields_by_name['ray_start_params'].message_type = _HEADGROUPSPEC_RAYSTARTPARAMSENTRY +_WORKERGROUPSPEC_RAYSTARTPARAMSENTRY.containing_type = _WORKERGROUPSPEC +_WORKERGROUPSPEC.fields_by_name['ray_start_params'].message_type = _WORKERGROUPSPEC_RAYSTARTPARAMSENTRY +DESCRIPTOR.message_types_by_name['RayJob'] = _RAYJOB +DESCRIPTOR.message_types_by_name['RayCluster'] = _RAYCLUSTER +DESCRIPTOR.message_types_by_name['HeadGroupSpec'] = _HEADGROUPSPEC +DESCRIPTOR.message_types_by_name['WorkerGroupSpec'] = _WORKERGROUPSPEC +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +RayJob = _reflection.GeneratedProtocolMessageType('RayJob', (_message.Message,), dict( + DESCRIPTOR = _RAYJOB, + __module__ = 'flyteidl.plugins.ray_pb2' + # @@protoc_insertion_point(class_scope:flyteidl.plugins.RayJob) + )) +_sym_db.RegisterMessage(RayJob) + +RayCluster = _reflection.GeneratedProtocolMessageType('RayCluster', (_message.Message,), dict( + DESCRIPTOR = _RAYCLUSTER, + __module__ = 'flyteidl.plugins.ray_pb2' + # @@protoc_insertion_point(class_scope:flyteidl.plugins.RayCluster) + )) +_sym_db.RegisterMessage(RayCluster) + +HeadGroupSpec = _reflection.GeneratedProtocolMessageType('HeadGroupSpec', (_message.Message,), dict( + + RayStartParamsEntry = _reflection.GeneratedProtocolMessageType('RayStartParamsEntry', (_message.Message,), dict( + DESCRIPTOR = _HEADGROUPSPEC_RAYSTARTPARAMSENTRY, + __module__ = 'flyteidl.plugins.ray_pb2' + # @@protoc_insertion_point(class_scope:flyteidl.plugins.HeadGroupSpec.RayStartParamsEntry) + )) + , + DESCRIPTOR = _HEADGROUPSPEC, + __module__ = 'flyteidl.plugins.ray_pb2' + # @@protoc_insertion_point(class_scope:flyteidl.plugins.HeadGroupSpec) + )) +_sym_db.RegisterMessage(HeadGroupSpec) +_sym_db.RegisterMessage(HeadGroupSpec.RayStartParamsEntry) + +WorkerGroupSpec = _reflection.GeneratedProtocolMessageType('WorkerGroupSpec', (_message.Message,), dict( + + RayStartParamsEntry = _reflection.GeneratedProtocolMessageType('RayStartParamsEntry', (_message.Message,), dict( + DESCRIPTOR = _WORKERGROUPSPEC_RAYSTARTPARAMSENTRY, + __module__ = 'flyteidl.plugins.ray_pb2' + # @@protoc_insertion_point(class_scope:flyteidl.plugins.WorkerGroupSpec.RayStartParamsEntry) + )) + , + DESCRIPTOR = _WORKERGROUPSPEC, + __module__ = 'flyteidl.plugins.ray_pb2' + # @@protoc_insertion_point(class_scope:flyteidl.plugins.WorkerGroupSpec) + )) +_sym_db.RegisterMessage(WorkerGroupSpec) +_sym_db.RegisterMessage(WorkerGroupSpec.RayStartParamsEntry) + + +DESCRIPTOR._options = None +_HEADGROUPSPEC_RAYSTARTPARAMSENTRY._options = None +_WORKERGROUPSPEC_RAYSTARTPARAMSENTRY._options = None +# @@protoc_insertion_point(module_scope) diff --git a/flyteidl/gen/pb_python/flyteidl/plugins/ray_pb2_grpc.py b/flyteidl/gen/pb_python/flyteidl/plugins/ray_pb2_grpc.py new file mode 100644 index 0000000000..a89435267c --- /dev/null +++ b/flyteidl/gen/pb_python/flyteidl/plugins/ray_pb2_grpc.py @@ -0,0 +1,3 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +import grpc + diff --git a/flyteidl/protos/docs/plugins/plugins.rst b/flyteidl/protos/docs/plugins/plugins.rst index a1aa83ce93..074c3573f8 100644 --- a/flyteidl/protos/docs/plugins/plugins.rst +++ b/flyteidl/protos/docs/plugins/plugins.rst @@ -281,6 +281,166 @@ of a hive task's TaskTemplate +.. + end messages + + +.. + end enums + + +.. + end HasExtensions + + +.. + end services + + + + +.. _ref_flyteidl/plugins/ray.proto: + +flyteidl/plugins/ray.proto +================================================================== + + + + + +.. _ref_flyteidl.plugins.HeadGroupSpec: + +HeadGroupSpec +------------------------------------------------------------------ + +HeadGroupSpec are the spec for the head pod + + + +.. csv-table:: HeadGroupSpec type fields + :header: "Field", "Type", "Label", "Description" + :widths: auto + + "ray_start_params", ":ref:`ref_flyteidl.plugins.HeadGroupSpec.RayStartParamsEntry`", "repeated", "Optional. RayStartParams are the params of the start command: address, object-store-memory. Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start" + + + + + + + +.. _ref_flyteidl.plugins.HeadGroupSpec.RayStartParamsEntry: + +HeadGroupSpec.RayStartParamsEntry +------------------------------------------------------------------ + + + + + +.. csv-table:: HeadGroupSpec.RayStartParamsEntry type fields + :header: "Field", "Type", "Label", "Description" + :widths: auto + + "key", ":ref:`ref_string`", "", "" + "value", ":ref:`ref_string`", "", "" + + + + + + + +.. _ref_flyteidl.plugins.RayCluster: + +RayCluster +------------------------------------------------------------------ + +Define Ray cluster defines the desired state of RayCluster + + + +.. csv-table:: RayCluster type fields + :header: "Field", "Type", "Label", "Description" + :widths: auto + + "head_group_spec", ":ref:`ref_flyteidl.plugins.HeadGroupSpec`", "", "HeadGroupSpecs are the spec for the head pod" + "worker_group_spec", ":ref:`ref_flyteidl.plugins.WorkerGroupSpec`", "repeated", "WorkerGroupSpecs are the specs for the worker pods" + + + + + + + +.. _ref_flyteidl.plugins.RayJob: + +RayJob +------------------------------------------------------------------ + +RayJobSpec defines the desired state of RayJob + + + +.. csv-table:: RayJob type fields + :header: "Field", "Type", "Label", "Description" + :widths: auto + + "ray_cluster", ":ref:`ref_flyteidl.plugins.RayCluster`", "", "RayClusterSpec is the cluster template to run the job" + "runtime_env", ":ref:`ref_string`", "", "runtime_env is base64 encoded. Ray runtime environments: https://docs.ray.io/en/latest/ray-core/handling-dependencies.html#runtime-environments" + + + + + + + +.. _ref_flyteidl.plugins.WorkerGroupSpec: + +WorkerGroupSpec +------------------------------------------------------------------ + +WorkerGroupSpec are the specs for the worker pods + + + +.. csv-table:: WorkerGroupSpec type fields + :header: "Field", "Type", "Label", "Description" + :widths: auto + + "group_name", ":ref:`ref_string`", "", "Required. RayCluster can have multiple worker groups, and it distinguishes them by name" + "replicas", ":ref:`ref_int32`", "", "Required. Desired replicas of the worker group. Defaults to 1." + "min_replicas", ":ref:`ref_int32`", "", "Optional. Min replicas of the worker group. MinReplicas defaults to 1." + "max_replicas", ":ref:`ref_int32`", "", "Optional. Max replicas of the worker group. MaxReplicas defaults to maxInt32" + "ray_start_params", ":ref:`ref_flyteidl.plugins.WorkerGroupSpec.RayStartParamsEntry`", "repeated", "Optional. RayStartParams are the params of the start command: address, object-store-memory. Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start" + + + + + + + +.. _ref_flyteidl.plugins.WorkerGroupSpec.RayStartParamsEntry: + +WorkerGroupSpec.RayStartParamsEntry +------------------------------------------------------------------ + + + + + +.. csv-table:: WorkerGroupSpec.RayStartParamsEntry type fields + :header: "Field", "Type", "Label", "Description" + :widths: auto + + "key", ":ref:`ref_string`", "", "" + "value", ":ref:`ref_string`", "", "" + + + + + + .. end messages diff --git a/flyteidl/protos/flyteidl/core/tasks.proto b/flyteidl/protos/flyteidl/core/tasks.proto index 07a1667393..9177eea81a 100644 --- a/flyteidl/protos/flyteidl/core/tasks.proto +++ b/flyteidl/protos/flyteidl/core/tasks.proto @@ -137,7 +137,6 @@ message TaskTemplate { // to use as required. // reserve the field numbers 1 through 15 for very frequently occurring message elements map config = 16; - } // ----------------- First class Plugins diff --git a/flyteidl/protos/flyteidl/plugins/ray.proto b/flyteidl/protos/flyteidl/plugins/ray.proto new file mode 100644 index 0000000000..7b58225b26 --- /dev/null +++ b/flyteidl/protos/flyteidl/plugins/ray.proto @@ -0,0 +1,46 @@ +syntax = "proto3"; + +package flyteidl.plugins; + +option go_package = "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/plugins"; + +import "google/protobuf/timestamp.proto"; + +// RayJobSpec defines the desired state of RayJob +message RayJob { + // RayClusterSpec is the cluster template to run the job + RayCluster ray_cluster = 1; + // runtime_env is base64 encoded. + // Ray runtime environments: https://docs.ray.io/en/latest/ray-core/handling-dependencies.html#runtime-environments + string runtime_env = 2; +} + +// Define Ray cluster defines the desired state of RayCluster +message RayCluster { + // HeadGroupSpecs are the spec for the head pod + HeadGroupSpec head_group_spec = 1; + // WorkerGroupSpecs are the specs for the worker pods + repeated WorkerGroupSpec worker_group_spec = 2; +} + +// HeadGroupSpec are the spec for the head pod +message HeadGroupSpec { + // Optional. RayStartParams are the params of the start command: address, object-store-memory. + // Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start + map ray_start_params = 1; +} + +// WorkerGroupSpec are the specs for the worker pods +message WorkerGroupSpec { + // Required. RayCluster can have multiple worker groups, and it distinguishes them by name + string group_name = 1; + // Required. Desired replicas of the worker group. Defaults to 1. + int32 replicas = 2; + // Optional. Min replicas of the worker group. MinReplicas defaults to 1. + int32 min_replicas = 3; + // Optional. Max replicas of the worker group. MaxReplicas defaults to maxInt32 + int32 max_replicas = 4; + // Optional. RayStartParams are the params of the start command: address, object-store-memory. + // Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start + map ray_start_params = 5; +}