diff --git a/flyteadmin/pkg/manager/impl/project_manager.go b/flyteadmin/pkg/manager/impl/project_manager.go index edfedcaf85..c2783b6a44 100644 --- a/flyteadmin/pkg/manager/impl/project_manager.go +++ b/flyteadmin/pkg/manager/impl/project_manager.go @@ -127,6 +127,18 @@ func (m *ProjectManager) UpdateProject(ctx context.Context, projectUpdate admin. return &response, nil } +func (m *ProjectManager) GetProject(ctx context.Context, request admin.ProjectRequest) (*admin.Project, error) { + projectRequest := request.Project + + projectModel, err := m.db.ProjectRepo().Get(ctx, projectRequest.Id) + if err != nil { + return nil, err + } + projectResponse := transformers.FromProjectModel(projectModel, m.getDomains()) + + return &projectResponse, nil +} + func NewProjectManager(db repoInterfaces.Repository, config runtimeInterfaces.Configuration) interfaces.ProjectInterface { return &ProjectManager{ db: db, diff --git a/flyteadmin/pkg/manager/impl/project_manager_test.go b/flyteadmin/pkg/manager/impl/project_manager_test.go index ef4f470d7c..6f19b8ce35 100644 --- a/flyteadmin/pkg/manager/impl/project_manager_test.go +++ b/flyteadmin/pkg/manager/impl/project_manager_test.go @@ -279,3 +279,30 @@ func TestProjectManager_UpdateProject_ErrorDueToInvalidProjectName(t *testing.T) }) assert.EqualError(t, err, "project_name cannot exceed 64 characters") } + +func TestGetProject(t *testing.T) { + repository := repositoryMocks.NewMockRepository() + mockedProject := &admin.Project{Id: project} + activeState := int32(admin.Project_ACTIVE) + repository.ProjectRepo().(*repositoryMocks.MockProjectRepo).GetFunction = func(ctx context.Context, projectID string) (models.Project, error) { + + return models.Project{ + BaseModel: models.BaseModel{}, + Identifier: projectID, + Name: "a-mocked-project", + Description: "A mocked project", + State: &activeState, + }, nil + } + + projectManager := NewProjectManager(repository, runtimeMocks.NewMockConfigurationProvider( + getMockApplicationConfigForProjectManagerTest(), nil, nil, nil, nil, nil)) + + resp, _ := projectManager.GetProject(context.Background(), + admin.ProjectRequest{Project: mockedProject}) + + assert.Equal(t, mockedProject.Id, resp.Id) + assert.Equal(t, "a-mocked-project", resp.Name) + assert.Equal(t, "A mocked project", resp.Description) + assert.Equal(t, admin.Project_ProjectState(0), resp.State) +} diff --git a/flyteadmin/pkg/manager/interfaces/project.go b/flyteadmin/pkg/manager/interfaces/project.go index cd91fb0439..242d78e65d 100644 --- a/flyteadmin/pkg/manager/interfaces/project.go +++ b/flyteadmin/pkg/manager/interfaces/project.go @@ -11,4 +11,5 @@ type ProjectInterface interface { CreateProject(ctx context.Context, request admin.ProjectRegisterRequest) (*admin.ProjectRegisterResponse, error) ListProjects(ctx context.Context, request admin.ProjectListRequest) (*admin.Projects, error) UpdateProject(ctx context.Context, request admin.Project) (*admin.ProjectUpdateResponse, error) + GetProject(ctx context.Context, request admin.ProjectRequest) (*admin.Project, error) } diff --git a/flyteadmin/pkg/manager/mocks/project.go b/flyteadmin/pkg/manager/mocks/project.go index 8137955ced..4674e15f33 100644 --- a/flyteadmin/pkg/manager/mocks/project.go +++ b/flyteadmin/pkg/manager/mocks/project.go @@ -9,11 +9,13 @@ import ( type CreateProjectFunc func(ctx context.Context, request admin.ProjectRegisterRequest) (*admin.ProjectRegisterResponse, error) type ListProjectFunc func(ctx context.Context, request admin.ProjectListRequest) (*admin.Projects, error) type UpdateProjectFunc func(ctx context.Context, request admin.Project) (*admin.ProjectUpdateResponse, error) +type GetProjectFunc func(ctx context.Context, request admin.ProjectRequest) (*admin.Project, error) type MockProjectManager struct { listProjectFunc ListProjectFunc createProjectFunc CreateProjectFunc updateProjectFunc UpdateProjectFunc + getProjectFunc GetProjectFunc } func (m *MockProjectManager) SetCreateProject(createProjectFunc CreateProjectFunc) { @@ -45,3 +47,14 @@ func (m *MockProjectManager) ListProjects( } return nil, nil } + +func (m *MockProjectManager) SetGetCallBack(getProjectFunc GetProjectFunc) { + m.getProjectFunc = getProjectFunc +} + +func (m *MockProjectManager) GetProject(ctx context.Context, request admin.ProjectRequest) (*admin.Project, error) { + if m.getProjectFunc != nil { + return m.getProjectFunc(ctx, request) + } + return nil, nil +} diff --git a/flyteadmin/pkg/rpc/adminservice/metrics.go b/flyteadmin/pkg/rpc/adminservice/metrics.go index 98eda0dc8c..2af9276602 100644 --- a/flyteadmin/pkg/rpc/adminservice/metrics.go +++ b/flyteadmin/pkg/rpc/adminservice/metrics.go @@ -59,6 +59,7 @@ type projectEndpointMetrics struct { register util.RequestMetrics list util.RequestMetrics update util.RequestMetrics + get util.RequestMetrics } type attributeEndpointMetrics struct { @@ -173,6 +174,7 @@ func InitMetrics(adminScope promutils.Scope) AdminMetrics { register: util.NewRequestMetrics(adminScope, "register_project"), list: util.NewRequestMetrics(adminScope, "list_projects"), update: util.NewRequestMetrics(adminScope, "update_project"), + get: util.NewRequestMetrics(adminScope, "get_project"), }, projectAttributesEndpointMetrics: attributeEndpointMetrics{ scope: adminScope, diff --git a/flyteadmin/pkg/rpc/adminservice/project.go b/flyteadmin/pkg/rpc/adminservice/project.go index 765d3e4b64..d8bdc7fe13 100644 --- a/flyteadmin/pkg/rpc/adminservice/project.go +++ b/flyteadmin/pkg/rpc/adminservice/project.go @@ -62,3 +62,21 @@ func (m *AdminService) UpdateProject(ctx context.Context, request *admin.Project return response, nil } + +func (m *AdminService) GetProject(ctx context.Context, request *admin.ProjectRequest) (*admin.Project, error) { + defer m.interceptPanic(ctx, request) + if request == nil { + return nil, status.Errorf(codes.InvalidArgument, "Incorrect request, nil requests not allowed") + } + var response *admin.Project + var err error + m.Metrics.projectEndpointMetrics.get.Time(func() { + response, err = m.ProjectManager.GetProject(ctx, *request) + }) + if err != nil { + return nil, util.TransformAndRecordError(err, &m.Metrics.projectEndpointMetrics.list) + } + + m.Metrics.projectEndpointMetrics.list.Success() + return response, nil +} diff --git a/flyteadmin/pkg/rpc/adminservice/tests/project_test.go b/flyteadmin/pkg/rpc/adminservice/tests/project_test.go index 252e40c78c..91a900a94c 100644 --- a/flyteadmin/pkg/rpc/adminservice/tests/project_test.go +++ b/flyteadmin/pkg/rpc/adminservice/tests/project_test.go @@ -57,3 +57,15 @@ func TestListProjects(t *testing.T) { assert.Nil(t, err) assert.True(t, proto.Equal(projects, resp)) } + +func TestGetProject(t *testing.T) { + mockProjectManager := mocks.MockProjectManager{} + project := &admin.Project{Id: "project id", Name: "project"} + mockProjectManager.SetGetCallBack(func(ctx context.Context, request admin.ProjectRequest) (*admin.Project, error) { + assert.NotNil(t, request) + return project, nil + }) + resp, err := mockProjectManager.GetProject(context.Background(), admin.ProjectRequest{}) + assert.Nil(t, err) + assert.True(t, proto.Equal(project, resp)) +} diff --git a/flyteidl/gen/pb-cpp/flyteidl/admin/project.pb.cc b/flyteidl/gen/pb-cpp/flyteidl/admin/project.pb.cc index 979041c005..03daf7ec56 100644 --- a/flyteidl/gen/pb-cpp/flyteidl/admin/project.pb.cc +++ b/flyteidl/gen/pb-cpp/flyteidl/admin/project.pb.cc @@ -38,6 +38,10 @@ class ProjectListRequestDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed _instance; } _ProjectListRequest_default_instance_; +class ProjectRequestDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed _instance; +} _ProjectRequest_default_instance_; class ProjectRegisterRequestDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed _instance; @@ -112,6 +116,21 @@ ::google::protobuf::internal::SCCInfo<1> scc_info_ProjectListRequest_flyteidl_2f {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsProjectListRequest_flyteidl_2fadmin_2fproject_2eproto}, { &scc_info_Sort_flyteidl_2fadmin_2fcommon_2eproto.base,}}; +static void InitDefaultsProjectRequest_flyteidl_2fadmin_2fproject_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::flyteidl::admin::_ProjectRequest_default_instance_; + new (ptr) ::flyteidl::admin::ProjectRequest(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::flyteidl::admin::ProjectRequest::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<1> scc_info_ProjectRequest_flyteidl_2fadmin_2fproject_2eproto = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsProjectRequest_flyteidl_2fadmin_2fproject_2eproto}, { + &scc_info_Project_flyteidl_2fadmin_2fproject_2eproto.base,}}; + static void InitDefaultsProjectRegisterRequest_flyteidl_2fadmin_2fproject_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -160,12 +179,13 @@ void InitDefaults_flyteidl_2fadmin_2fproject_2eproto() { ::google::protobuf::internal::InitSCC(&scc_info_Project_flyteidl_2fadmin_2fproject_2eproto.base); ::google::protobuf::internal::InitSCC(&scc_info_Projects_flyteidl_2fadmin_2fproject_2eproto.base); ::google::protobuf::internal::InitSCC(&scc_info_ProjectListRequest_flyteidl_2fadmin_2fproject_2eproto.base); + ::google::protobuf::internal::InitSCC(&scc_info_ProjectRequest_flyteidl_2fadmin_2fproject_2eproto.base); ::google::protobuf::internal::InitSCC(&scc_info_ProjectRegisterRequest_flyteidl_2fadmin_2fproject_2eproto.base); ::google::protobuf::internal::InitSCC(&scc_info_ProjectRegisterResponse_flyteidl_2fadmin_2fproject_2eproto.base); ::google::protobuf::internal::InitSCC(&scc_info_ProjectUpdateResponse_flyteidl_2fadmin_2fproject_2eproto.base); } -::google::protobuf::Metadata file_level_metadata_flyteidl_2fadmin_2fproject_2eproto[7]; +::google::protobuf::Metadata file_level_metadata_flyteidl_2fadmin_2fproject_2eproto[8]; const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors_flyteidl_2fadmin_2fproject_2eproto[1]; constexpr ::google::protobuf::ServiceDescriptor const** file_level_service_descriptors_flyteidl_2fadmin_2fproject_2eproto = nullptr; @@ -205,6 +225,12 @@ const ::google::protobuf::uint32 TableStruct_flyteidl_2fadmin_2fproject_2eproto: PROTOBUF_FIELD_OFFSET(::flyteidl::admin::ProjectListRequest, filters_), PROTOBUF_FIELD_OFFSET(::flyteidl::admin::ProjectListRequest, sort_by_), ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::flyteidl::admin::ProjectRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::flyteidl::admin::ProjectRequest, project_), + ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::flyteidl::admin::ProjectRegisterRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ @@ -226,9 +252,10 @@ static const ::google::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SE { 7, -1, sizeof(::flyteidl::admin::Project)}, { 18, -1, sizeof(::flyteidl::admin::Projects)}, { 25, -1, sizeof(::flyteidl::admin::ProjectListRequest)}, - { 34, -1, sizeof(::flyteidl::admin::ProjectRegisterRequest)}, - { 40, -1, sizeof(::flyteidl::admin::ProjectRegisterResponse)}, - { 45, -1, sizeof(::flyteidl::admin::ProjectUpdateResponse)}, + { 34, -1, sizeof(::flyteidl::admin::ProjectRequest)}, + { 40, -1, sizeof(::flyteidl::admin::ProjectRegisterRequest)}, + { 46, -1, sizeof(::flyteidl::admin::ProjectRegisterResponse)}, + { 51, -1, sizeof(::flyteidl::admin::ProjectUpdateResponse)}, }; static ::google::protobuf::Message const * const file_default_instances[] = { @@ -236,6 +263,7 @@ static ::google::protobuf::Message const * const file_default_instances[] = { reinterpret_cast(&::flyteidl::admin::_Project_default_instance_), reinterpret_cast(&::flyteidl::admin::_Projects_default_instance_), reinterpret_cast(&::flyteidl::admin::_ProjectListRequest_default_instance_), + reinterpret_cast(&::flyteidl::admin::_ProjectRequest_default_instance_), reinterpret_cast(&::flyteidl::admin::_ProjectRegisterRequest_default_instance_), reinterpret_cast(&::flyteidl::admin::_ProjectRegisterResponse_default_instance_), reinterpret_cast(&::flyteidl::admin::_ProjectUpdateResponse_default_instance_), @@ -244,7 +272,7 @@ static ::google::protobuf::Message const * const file_default_instances[] = { ::google::protobuf::internal::AssignDescriptorsTable assign_descriptors_table_flyteidl_2fadmin_2fproject_2eproto = { {}, AddDescriptors_flyteidl_2fadmin_2fproject_2eproto, "flyteidl/admin/project.proto", schemas, file_default_instances, TableStruct_flyteidl_2fadmin_2fproject_2eproto::offsets, - file_level_metadata_flyteidl_2fadmin_2fproject_2eproto, 7, file_level_enum_descriptors_flyteidl_2fadmin_2fproject_2eproto, file_level_service_descriptors_flyteidl_2fadmin_2fproject_2eproto, + file_level_metadata_flyteidl_2fadmin_2fproject_2eproto, 8, file_level_enum_descriptors_flyteidl_2fadmin_2fproject_2eproto, file_level_service_descriptors_flyteidl_2fadmin_2fproject_2eproto, }; const char descriptor_table_protodef_flyteidl_2fadmin_2fproject_2eproto[] = @@ -261,17 +289,18 @@ const char descriptor_table_protodef_flyteidl_2fadmin_2fproject_2eproto[] = ".flyteidl.admin.Project\022\r\n\005token\030\002 \001(\t\"j" "\n\022ProjectListRequest\022\r\n\005limit\030\001 \001(\r\022\r\n\005t" "oken\030\002 \001(\t\022\017\n\007filters\030\003 \001(\t\022%\n\007sort_by\030\004" - " \001(\0132\024.flyteidl.admin.Sort\"B\n\026ProjectReg" - "isterRequest\022(\n\007project\030\001 \001(\0132\027.flyteidl" - ".admin.Project\"\031\n\027ProjectRegisterRespons" - "e\"\027\n\025ProjectUpdateResponseB=Z;github.com" - "/flyteorg/flyte/flyteidl/gen/pb-go/flyte" - "idl/adminb\006proto3" + " \001(\0132\024.flyteidl.admin.Sort\":\n\016ProjectReq" + "uest\022(\n\007project\030\001 \001(\0132\027.flyteidl.admin.P" + "roject\"B\n\026ProjectRegisterRequest\022(\n\007proj" + "ect\030\001 \001(\0132\027.flyteidl.admin.Project\"\031\n\027Pr" + "ojectRegisterResponse\"\027\n\025ProjectUpdateRe" + "sponseB=Z;github.com/flyteorg/flyte/flyt" + "eidl/gen/pb-go/flyteidl/adminb\006proto3" ; ::google::protobuf::internal::DescriptorTable descriptor_table_flyteidl_2fadmin_2fproject_2eproto = { false, InitDefaults_flyteidl_2fadmin_2fproject_2eproto, descriptor_table_protodef_flyteidl_2fadmin_2fproject_2eproto, - "flyteidl/admin/project.proto", &assign_descriptors_table_flyteidl_2fadmin_2fproject_2eproto, 737, + "flyteidl/admin/project.proto", &assign_descriptors_table_flyteidl_2fadmin_2fproject_2eproto, 797, }; void AddDescriptors_flyteidl_2fadmin_2fproject_2eproto() { @@ -2151,6 +2180,293 @@ ::google::protobuf::Metadata ProjectListRequest::GetMetadata() const { } +// =================================================================== + +void ProjectRequest::InitAsDefaultInstance() { + ::flyteidl::admin::_ProjectRequest_default_instance_._instance.get_mutable()->project_ = const_cast< ::flyteidl::admin::Project*>( + ::flyteidl::admin::Project::internal_default_instance()); +} +class ProjectRequest::HasBitSetters { + public: + static const ::flyteidl::admin::Project& project(const ProjectRequest* msg); +}; + +const ::flyteidl::admin::Project& +ProjectRequest::HasBitSetters::project(const ProjectRequest* msg) { + return *msg->project_; +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int ProjectRequest::kProjectFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +ProjectRequest::ProjectRequest() + : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:flyteidl.admin.ProjectRequest) +} +ProjectRequest::ProjectRequest(const ProjectRequest& from) + : ::google::protobuf::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from.has_project()) { + project_ = new ::flyteidl::admin::Project(*from.project_); + } else { + project_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:flyteidl.admin.ProjectRequest) +} + +void ProjectRequest::SharedCtor() { + ::google::protobuf::internal::InitSCC( + &scc_info_ProjectRequest_flyteidl_2fadmin_2fproject_2eproto.base); + project_ = nullptr; +} + +ProjectRequest::~ProjectRequest() { + // @@protoc_insertion_point(destructor:flyteidl.admin.ProjectRequest) + SharedDtor(); +} + +void ProjectRequest::SharedDtor() { + if (this != internal_default_instance()) delete project_; +} + +void ProjectRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const ProjectRequest& ProjectRequest::default_instance() { + ::google::protobuf::internal::InitSCC(&::scc_info_ProjectRequest_flyteidl_2fadmin_2fproject_2eproto.base); + return *internal_default_instance(); +} + + +void ProjectRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:flyteidl.admin.ProjectRequest) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaNoVirtual() == nullptr && project_ != nullptr) { + delete project_; + } + project_ = nullptr; + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* ProjectRequest::_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.admin.Project project = 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::admin::Project::_InternalParse; + object = msg->mutable_project(); + if (size > end - ptr) goto len_delim_till_end; + ptr += size; + GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( + {parser_till_end, object}, ptr - size, ptr)); + break; + } + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->EndGroup(tag); + return ptr; + } + auto res = UnknownFieldParse(tag, {_InternalParse, msg}, + ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); + ptr = res.first; + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); + if (res.second) return ptr; + } + } // switch + } // while + return ptr; +len_delim_till_end: + return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, + {parser_till_end, object}, size); +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool ProjectRequest::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.admin.ProjectRequest) + 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.admin.Project project = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, mutable_project())); + } 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.admin.ProjectRequest) + return true; +failure: + // @@protoc_insertion_point(parse_failure:flyteidl.admin.ProjectRequest) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void ProjectRequest::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:flyteidl.admin.ProjectRequest) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .flyteidl.admin.Project project = 1; + if (this->has_project()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, HasBitSetters::project(this), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:flyteidl.admin.ProjectRequest) +} + +::google::protobuf::uint8* ProjectRequest::InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:flyteidl.admin.ProjectRequest) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .flyteidl.admin.Project project = 1; + if (this->has_project()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 1, HasBitSetters::project(this), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:flyteidl.admin.ProjectRequest) + return target; +} + +size_t ProjectRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:flyteidl.admin.ProjectRequest) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .flyteidl.admin.Project project = 1; + if (this->has_project()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize( + *project_); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ProjectRequest::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:flyteidl.admin.ProjectRequest) + GOOGLE_DCHECK_NE(&from, this); + const ProjectRequest* source = + ::google::protobuf::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:flyteidl.admin.ProjectRequest) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:flyteidl.admin.ProjectRequest) + MergeFrom(*source); + } +} + +void ProjectRequest::MergeFrom(const ProjectRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:flyteidl.admin.ProjectRequest) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.has_project()) { + mutable_project()->::flyteidl::admin::Project::MergeFrom(from.project()); + } +} + +void ProjectRequest::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:flyteidl.admin.ProjectRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ProjectRequest::CopyFrom(const ProjectRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:flyteidl.admin.ProjectRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ProjectRequest::IsInitialized() const { + return true; +} + +void ProjectRequest::Swap(ProjectRequest* other) { + if (other == this) return; + InternalSwap(other); +} +void ProjectRequest::InternalSwap(ProjectRequest* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(project_, other->project_); +} + +::google::protobuf::Metadata ProjectRequest::GetMetadata() const { + ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_flyteidl_2fadmin_2fproject_2eproto); + return ::file_level_metadata_flyteidl_2fadmin_2fproject_2eproto[kIndexInFileMessages]; +} + + // =================================================================== void ProjectRegisterRequest::InitAsDefaultInstance() { @@ -2873,6 +3189,9 @@ template<> PROTOBUF_NOINLINE ::flyteidl::admin::Projects* Arena::CreateMaybeMess template<> PROTOBUF_NOINLINE ::flyteidl::admin::ProjectListRequest* Arena::CreateMaybeMessage< ::flyteidl::admin::ProjectListRequest >(Arena* arena) { return Arena::CreateInternal< ::flyteidl::admin::ProjectListRequest >(arena); } +template<> PROTOBUF_NOINLINE ::flyteidl::admin::ProjectRequest* Arena::CreateMaybeMessage< ::flyteidl::admin::ProjectRequest >(Arena* arena) { + return Arena::CreateInternal< ::flyteidl::admin::ProjectRequest >(arena); +} template<> PROTOBUF_NOINLINE ::flyteidl::admin::ProjectRegisterRequest* Arena::CreateMaybeMessage< ::flyteidl::admin::ProjectRegisterRequest >(Arena* arena) { return Arena::CreateInternal< ::flyteidl::admin::ProjectRegisterRequest >(arena); } diff --git a/flyteidl/gen/pb-cpp/flyteidl/admin/project.pb.h b/flyteidl/gen/pb-cpp/flyteidl/admin/project.pb.h index b1fa7e9e3b..51d46456b0 100644 --- a/flyteidl/gen/pb-cpp/flyteidl/admin/project.pb.h +++ b/flyteidl/gen/pb-cpp/flyteidl/admin/project.pb.h @@ -43,7 +43,7 @@ struct TableStruct_flyteidl_2fadmin_2fproject_2eproto { PROTOBUF_SECTION_VARIABLE(protodesc_cold); static const ::google::protobuf::internal::AuxillaryParseTableField aux[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::ParseTable schema[7] + static const ::google::protobuf::internal::ParseTable schema[8] PROTOBUF_SECTION_VARIABLE(protodesc_cold); static const ::google::protobuf::internal::FieldMetadata field_metadata[]; static const ::google::protobuf::internal::SerializationTable serialization_table[]; @@ -67,6 +67,9 @@ extern ProjectRegisterRequestDefaultTypeInternal _ProjectRegisterRequest_default class ProjectRegisterResponse; class ProjectRegisterResponseDefaultTypeInternal; extern ProjectRegisterResponseDefaultTypeInternal _ProjectRegisterResponse_default_instance_; +class ProjectRequest; +class ProjectRequestDefaultTypeInternal; +extern ProjectRequestDefaultTypeInternal _ProjectRequest_default_instance_; class ProjectUpdateResponse; class ProjectUpdateResponseDefaultTypeInternal; extern ProjectUpdateResponseDefaultTypeInternal _ProjectUpdateResponse_default_instance_; @@ -82,6 +85,7 @@ template<> ::flyteidl::admin::Project* Arena::CreateMaybeMessage<::flyteidl::adm template<> ::flyteidl::admin::ProjectListRequest* Arena::CreateMaybeMessage<::flyteidl::admin::ProjectListRequest>(Arena*); template<> ::flyteidl::admin::ProjectRegisterRequest* Arena::CreateMaybeMessage<::flyteidl::admin::ProjectRegisterRequest>(Arena*); template<> ::flyteidl::admin::ProjectRegisterResponse* Arena::CreateMaybeMessage<::flyteidl::admin::ProjectRegisterResponse>(Arena*); +template<> ::flyteidl::admin::ProjectRequest* Arena::CreateMaybeMessage<::flyteidl::admin::ProjectRequest>(Arena*); template<> ::flyteidl::admin::ProjectUpdateResponse* Arena::CreateMaybeMessage<::flyteidl::admin::ProjectUpdateResponse>(Arena*); template<> ::flyteidl::admin::Projects* Arena::CreateMaybeMessage<::flyteidl::admin::Projects>(Arena*); } // namespace protobuf @@ -741,6 +745,121 @@ class ProjectListRequest final : }; // ------------------------------------------------------------------- +class ProjectRequest final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:flyteidl.admin.ProjectRequest) */ { + public: + ProjectRequest(); + virtual ~ProjectRequest(); + + ProjectRequest(const ProjectRequest& from); + + inline ProjectRequest& operator=(const ProjectRequest& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + ProjectRequest(ProjectRequest&& from) noexcept + : ProjectRequest() { + *this = ::std::move(from); + } + + inline ProjectRequest& operator=(ProjectRequest&& 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 ProjectRequest& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const ProjectRequest* internal_default_instance() { + return reinterpret_cast( + &_ProjectRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + void Swap(ProjectRequest* other); + friend void swap(ProjectRequest& a, ProjectRequest& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline ProjectRequest* New() const final { + return CreateMaybeMessage(nullptr); + } + + ProjectRequest* 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 ProjectRequest& from); + void MergeFrom(const ProjectRequest& 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(ProjectRequest* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // .flyteidl.admin.Project project = 1; + bool has_project() const; + void clear_project(); + static const int kProjectFieldNumber = 1; + const ::flyteidl::admin::Project& project() const; + ::flyteidl::admin::Project* release_project(); + ::flyteidl::admin::Project* mutable_project(); + void set_allocated_project(::flyteidl::admin::Project* project); + + // @@protoc_insertion_point(class_scope:flyteidl.admin.ProjectRequest) + private: + class HasBitSetters; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::flyteidl::admin::Project* project_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::TableStruct_flyteidl_2fadmin_2fproject_2eproto; +}; +// ------------------------------------------------------------------- + class ProjectRegisterRequest final : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:flyteidl.admin.ProjectRegisterRequest) */ { public: @@ -779,7 +898,7 @@ class ProjectRegisterRequest final : &_ProjectRegisterRequest_default_instance_); } static constexpr int kIndexInFileMessages = - 4; + 5; void Swap(ProjectRegisterRequest* other); friend void swap(ProjectRegisterRequest& a, ProjectRegisterRequest& b) { @@ -894,7 +1013,7 @@ class ProjectRegisterResponse final : &_ProjectRegisterResponse_default_instance_); } static constexpr int kIndexInFileMessages = - 5; + 6; void Swap(ProjectRegisterResponse* other); friend void swap(ProjectRegisterResponse& a, ProjectRegisterResponse& b) { @@ -999,7 +1118,7 @@ class ProjectUpdateResponse final : &_ProjectUpdateResponse_default_instance_); } static constexpr int kIndexInFileMessages = - 6; + 7; void Swap(ProjectUpdateResponse* other); friend void swap(ProjectUpdateResponse& a, ProjectUpdateResponse& b) { @@ -1691,6 +1810,61 @@ inline void ProjectListRequest::set_allocated_sort_by(::flyteidl::admin::Sort* s // ------------------------------------------------------------------- +// ProjectRequest + +// .flyteidl.admin.Project project = 1; +inline bool ProjectRequest::has_project() const { + return this != internal_default_instance() && project_ != nullptr; +} +inline void ProjectRequest::clear_project() { + if (GetArenaNoVirtual() == nullptr && project_ != nullptr) { + delete project_; + } + project_ = nullptr; +} +inline const ::flyteidl::admin::Project& ProjectRequest::project() const { + const ::flyteidl::admin::Project* p = project_; + // @@protoc_insertion_point(field_get:flyteidl.admin.ProjectRequest.project) + return p != nullptr ? *p : *reinterpret_cast( + &::flyteidl::admin::_Project_default_instance_); +} +inline ::flyteidl::admin::Project* ProjectRequest::release_project() { + // @@protoc_insertion_point(field_release:flyteidl.admin.ProjectRequest.project) + + ::flyteidl::admin::Project* temp = project_; + project_ = nullptr; + return temp; +} +inline ::flyteidl::admin::Project* ProjectRequest::mutable_project() { + + if (project_ == nullptr) { + auto* p = CreateMaybeMessage<::flyteidl::admin::Project>(GetArenaNoVirtual()); + project_ = p; + } + // @@protoc_insertion_point(field_mutable:flyteidl.admin.ProjectRequest.project) + return project_; +} +inline void ProjectRequest::set_allocated_project(::flyteidl::admin::Project* project) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == nullptr) { + delete project_; + } + if (project) { + ::google::protobuf::Arena* submessage_arena = nullptr; + if (message_arena != submessage_arena) { + project = ::google::protobuf::internal::GetOwnedMessage( + message_arena, project, submessage_arena); + } + + } else { + + } + project_ = project; + // @@protoc_insertion_point(field_set_allocated:flyteidl.admin.ProjectRequest.project) +} + +// ------------------------------------------------------------------- + // ProjectRegisterRequest // .flyteidl.admin.Project project = 1; @@ -1767,6 +1941,8 @@ inline void ProjectRegisterRequest::set_allocated_project(::flyteidl::admin::Pro // ------------------------------------------------------------------- +// ------------------------------------------------------------------- + // @@protoc_insertion_point(namespace_scope) diff --git a/flyteidl/gen/pb-go/flyteidl/admin/project.pb.go b/flyteidl/gen/pb-go/flyteidl/admin/project.pb.go index 662d2311ac..ec458b28f7 100644 --- a/flyteidl/gen/pb-go/flyteidl/admin/project.pb.go +++ b/flyteidl/gen/pb-go/flyteidl/admin/project.pb.go @@ -313,6 +313,47 @@ func (m *ProjectListRequest) GetSortBy() *Sort { return nil } +// Request to retrieve a single project matching the project id. +// See :ref:`ref_flyteidl.admin.Project` for more details +type ProjectRequest struct { + Project *Project `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ProjectRequest) Reset() { *m = ProjectRequest{} } +func (m *ProjectRequest) String() string { return proto.CompactTextString(m) } +func (*ProjectRequest) ProtoMessage() {} +func (*ProjectRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_2db065ce03bf106d, []int{4} +} + +func (m *ProjectRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ProjectRequest.Unmarshal(m, b) +} +func (m *ProjectRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ProjectRequest.Marshal(b, m, deterministic) +} +func (m *ProjectRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProjectRequest.Merge(m, src) +} +func (m *ProjectRequest) XXX_Size() int { + return xxx_messageInfo_ProjectRequest.Size(m) +} +func (m *ProjectRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ProjectRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ProjectRequest proto.InternalMessageInfo + +func (m *ProjectRequest) GetProject() *Project { + if m != nil { + return m.Project + } + return nil +} + // Adds a new user-project within the Flyte deployment. // See :ref:`ref_flyteidl.admin.Project` for more details type ProjectRegisterRequest struct { @@ -327,7 +368,7 @@ func (m *ProjectRegisterRequest) Reset() { *m = ProjectRegisterRequest{} func (m *ProjectRegisterRequest) String() string { return proto.CompactTextString(m) } func (*ProjectRegisterRequest) ProtoMessage() {} func (*ProjectRegisterRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_2db065ce03bf106d, []int{4} + return fileDescriptor_2db065ce03bf106d, []int{5} } func (m *ProjectRegisterRequest) XXX_Unmarshal(b []byte) error { @@ -366,7 +407,7 @@ func (m *ProjectRegisterResponse) Reset() { *m = ProjectRegisterResponse func (m *ProjectRegisterResponse) String() string { return proto.CompactTextString(m) } func (*ProjectRegisterResponse) ProtoMessage() {} func (*ProjectRegisterResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_2db065ce03bf106d, []int{5} + return fileDescriptor_2db065ce03bf106d, []int{6} } func (m *ProjectRegisterResponse) XXX_Unmarshal(b []byte) error { @@ -398,7 +439,7 @@ func (m *ProjectUpdateResponse) Reset() { *m = ProjectUpdateResponse{} } func (m *ProjectUpdateResponse) String() string { return proto.CompactTextString(m) } func (*ProjectUpdateResponse) ProtoMessage() {} func (*ProjectUpdateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_2db065ce03bf106d, []int{6} + return fileDescriptor_2db065ce03bf106d, []int{7} } func (m *ProjectUpdateResponse) XXX_Unmarshal(b []byte) error { @@ -425,6 +466,7 @@ func init() { proto.RegisterType((*Project)(nil), "flyteidl.admin.Project") proto.RegisterType((*Projects)(nil), "flyteidl.admin.Projects") proto.RegisterType((*ProjectListRequest)(nil), "flyteidl.admin.ProjectListRequest") + proto.RegisterType((*ProjectRequest)(nil), "flyteidl.admin.ProjectRequest") proto.RegisterType((*ProjectRegisterRequest)(nil), "flyteidl.admin.ProjectRegisterRequest") proto.RegisterType((*ProjectRegisterResponse)(nil), "flyteidl.admin.ProjectRegisterResponse") proto.RegisterType((*ProjectUpdateResponse)(nil), "flyteidl.admin.ProjectUpdateResponse") @@ -433,34 +475,35 @@ func init() { func init() { proto.RegisterFile("flyteidl/admin/project.proto", fileDescriptor_2db065ce03bf106d) } var fileDescriptor_2db065ce03bf106d = []byte{ - // 459 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0xcd, 0x6e, 0xd3, 0x40, - 0x10, 0xc7, 0xb1, 0xdb, 0xd8, 0x61, 0x52, 0xa2, 0x68, 0x14, 0x1a, 0xf3, 0x71, 0xb0, 0x2c, 0x0e, - 0x39, 0x50, 0x1b, 0xd2, 0x1b, 0x08, 0xa4, 0xb4, 0xb1, 0xa0, 0xa2, 0x20, 0xb4, 0x49, 0x2b, 0xc1, - 0xa5, 0xf2, 0xc7, 0xd6, 0x2c, 0xd8, 0x5e, 0xe3, 0xdd, 0x1e, 0xf2, 0x08, 0x3c, 0x0c, 0xef, 0x88, - 0xbc, 0x5e, 0x57, 0x6d, 0x08, 0xa8, 0x27, 0xef, 0xcc, 0xfc, 0x76, 0xe6, 0x3f, 0x33, 0x5e, 0x78, - 0x7a, 0x99, 0xaf, 0x25, 0x65, 0x69, 0x1e, 0x44, 0x69, 0xc1, 0xca, 0xa0, 0xaa, 0xf9, 0x77, 0x9a, - 0x48, 0xbf, 0xaa, 0xb9, 0xe4, 0x38, 0xec, 0xa2, 0xbe, 0x8a, 0x3e, 0x7e, 0xb2, 0x41, 0x27, 0xbc, - 0x28, 0x78, 0xd9, 0xc2, 0xde, 0x73, 0xb0, 0x16, 0xbc, 0x88, 0x58, 0x89, 0x43, 0x30, 0x59, 0xea, - 0x18, 0xae, 0x31, 0xbd, 0x4f, 0x4c, 0x96, 0x22, 0xc2, 0x6e, 0x19, 0x15, 0xd4, 0x31, 0x95, 0x47, - 0x9d, 0xbd, 0xdf, 0x26, 0xd8, 0x9f, 0xdb, 0x62, 0x77, 0xe1, 0xf1, 0x05, 0xd8, 0xa9, 0xca, 0x2e, - 0x9c, 0x1d, 0x77, 0x67, 0x3a, 0x98, 0xed, 0xfb, 0xb7, 0xc5, 0xf9, 0x6d, 0x71, 0xd2, 0x61, 0xe8, - 0xc2, 0x20, 0xa5, 0x22, 0xa9, 0x59, 0x25, 0x19, 0x2f, 0x9d, 0x5d, 0x95, 0xec, 0xa6, 0x0b, 0x7d, - 0xb0, 0xf2, 0x28, 0xa6, 0xb9, 0x70, 0x7a, 0xae, 0xb1, 0x2d, 0xe5, 0xa9, 0x8a, 0x12, 0x4d, 0xe1, - 0x2b, 0xe8, 0x09, 0x19, 0x49, 0xea, 0x58, 0xae, 0x31, 0x1d, 0xce, 0x9e, 0x6d, 0xe2, 0xba, 0x9f, - 0xee, 0xbb, 0x6c, 0x58, 0xd2, 0x5e, 0xf1, 0xde, 0xc2, 0xde, 0x4d, 0x37, 0x02, 0x58, 0xf3, 0xe3, - 0xd5, 0xc9, 0x79, 0x38, 0xba, 0x87, 0x7b, 0xd0, 0x9f, 0x93, 0xe3, 0xf7, 0x27, 0xe7, 0xe1, 0x62, - 0x64, 0xe0, 0x18, 0x46, 0xcb, 0x2f, 0xcb, 0x55, 0xf8, 0xf1, 0xe2, 0x5d, 0xf8, 0x29, 0x24, 0xf3, - 0x55, 0xb8, 0x18, 0x99, 0xde, 0x19, 0xf4, 0xf5, 0x7d, 0x81, 0x87, 0xd0, 0xd7, 0x7b, 0x12, 0x8e, - 0xa1, 0x86, 0x31, 0xf9, 0x87, 0x14, 0x72, 0x0d, 0xe2, 0x18, 0x7a, 0x92, 0xff, 0xa0, 0xa5, 0x9e, - 0x6a, 0x6b, 0x78, 0xbf, 0x0c, 0x40, 0xcd, 0x9e, 0x32, 0x21, 0x09, 0xfd, 0x79, 0x45, 0x85, 0x6c, - 0xe0, 0x9c, 0x15, 0x4c, 0xaa, 0xa5, 0x3c, 0x20, 0xad, 0xb1, 0x3d, 0x05, 0x3a, 0x60, 0x5f, 0xb2, - 0x5c, 0xd2, 0xba, 0xd9, 0x4c, 0xe3, 0xef, 0x4c, 0x3c, 0x00, 0x5b, 0xf0, 0x5a, 0x5e, 0xc4, 0x6b, - 0x35, 0xfd, 0xc1, 0x6c, 0xbc, 0x29, 0x73, 0xc9, 0x6b, 0x49, 0xac, 0x06, 0x3a, 0x5a, 0x7b, 0x1f, - 0x60, 0xbf, 0x93, 0x4d, 0x33, 0x26, 0x24, 0xad, 0x3b, 0x39, 0x2f, 0xc1, 0xd6, 0x7d, 0x28, 0x41, - 0xff, 0xe9, 0xb7, 0xe3, 0xbc, 0x47, 0x30, 0xf9, 0x2b, 0x99, 0xa8, 0x78, 0x29, 0xa8, 0x37, 0x81, - 0x87, 0x3a, 0x74, 0x56, 0xa5, 0xcd, 0x8a, 0x74, 0xe0, 0xe8, 0xcd, 0xd7, 0xd7, 0x19, 0x93, 0xdf, - 0xae, 0x62, 0x3f, 0xe1, 0x45, 0xa0, 0x2a, 0xf0, 0x3a, 0x6b, 0x0f, 0xc1, 0xf5, 0xaf, 0x9f, 0xd1, - 0x32, 0xa8, 0xe2, 0x83, 0x8c, 0x07, 0xb7, 0x5f, 0x43, 0x6c, 0xa9, 0x77, 0x70, 0xf8, 0x27, 0x00, - 0x00, 0xff, 0xff, 0x33, 0x79, 0x69, 0x68, 0x54, 0x03, 0x00, 0x00, + // 466 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x93, 0xcf, 0x6e, 0xd3, 0x40, + 0x10, 0xc6, 0xb1, 0xdb, 0xd8, 0x61, 0x52, 0xa2, 0x68, 0x14, 0x1a, 0xf3, 0xe7, 0x60, 0x59, 0x1c, + 0x72, 0xa0, 0x36, 0xa4, 0x37, 0x10, 0x48, 0x69, 0x62, 0x41, 0x45, 0x41, 0x68, 0x93, 0x56, 0x82, + 0x4b, 0x65, 0xc7, 0x5b, 0xb3, 0x60, 0x7b, 0x8d, 0x77, 0x7b, 0xc8, 0x23, 0xf0, 0x30, 0xbc, 0x23, + 0xf2, 0x7a, 0x1d, 0xb5, 0x21, 0x20, 0x24, 0x4e, 0xf6, 0xce, 0xfc, 0xf6, 0x9b, 0x6f, 0x67, 0x34, + 0xf0, 0xf8, 0x2a, 0x5b, 0x4b, 0xca, 0x92, 0x2c, 0x88, 0x92, 0x9c, 0x15, 0x41, 0x59, 0xf1, 0xaf, + 0x74, 0x25, 0xfd, 0xb2, 0xe2, 0x92, 0x63, 0xbf, 0xcd, 0xfa, 0x2a, 0xfb, 0xf0, 0xd1, 0x16, 0xbd, + 0xe2, 0x79, 0xce, 0x8b, 0x06, 0xf6, 0x9e, 0x82, 0x35, 0xe7, 0x79, 0xc4, 0x0a, 0xec, 0x83, 0xc9, + 0x12, 0xc7, 0x70, 0x8d, 0xf1, 0x5d, 0x62, 0xb2, 0x04, 0x11, 0xf6, 0x8b, 0x28, 0xa7, 0x8e, 0xa9, + 0x22, 0xea, 0xdf, 0xfb, 0x69, 0x82, 0xfd, 0xb1, 0x29, 0xf6, 0x2f, 0x3c, 0x3e, 0x03, 0x3b, 0x51, + 0xea, 0xc2, 0xd9, 0x73, 0xf7, 0xc6, 0xbd, 0xc9, 0xa1, 0x7f, 0xdb, 0x9c, 0xdf, 0x14, 0x27, 0x2d, + 0x86, 0x2e, 0xf4, 0x12, 0x2a, 0x56, 0x15, 0x2b, 0x25, 0xe3, 0x85, 0xb3, 0xaf, 0xc4, 0x6e, 0x86, + 0xd0, 0x07, 0x2b, 0x8b, 0x62, 0x9a, 0x09, 0xa7, 0xe3, 0x1a, 0xbb, 0x24, 0xcf, 0x54, 0x96, 0x68, + 0x0a, 0x5f, 0x40, 0x47, 0xc8, 0x48, 0x52, 0xc7, 0x72, 0x8d, 0x71, 0x7f, 0xf2, 0x64, 0x1b, 0xd7, + 0xef, 0x69, 0xbf, 0x8b, 0x9a, 0x25, 0xcd, 0x15, 0xef, 0x35, 0x1c, 0xdc, 0x0c, 0x23, 0x80, 0x35, + 0x9d, 0x2d, 0x4f, 0x2f, 0xc2, 0xc1, 0x1d, 0x3c, 0x80, 0xee, 0x94, 0xcc, 0xde, 0x9e, 0x5e, 0x84, + 0xf3, 0x81, 0x81, 0x43, 0x18, 0x2c, 0x3e, 0x2d, 0x96, 0xe1, 0xfb, 0xcb, 0x37, 0xe1, 0x87, 0x90, + 0x4c, 0x97, 0xe1, 0x7c, 0x60, 0x7a, 0xe7, 0xd0, 0xd5, 0xf7, 0x05, 0x1e, 0x43, 0x57, 0xcf, 0x49, + 0x38, 0x86, 0x6a, 0xc6, 0xe8, 0x0f, 0x56, 0xc8, 0x06, 0xc4, 0x21, 0x74, 0x24, 0xff, 0x46, 0x0b, + 0xdd, 0xd5, 0xe6, 0xe0, 0xfd, 0x30, 0x00, 0x35, 0x7b, 0xc6, 0x84, 0x24, 0xf4, 0xfb, 0x35, 0x15, + 0xb2, 0x86, 0x33, 0x96, 0x33, 0xa9, 0x86, 0x72, 0x8f, 0x34, 0x87, 0xdd, 0x12, 0xe8, 0x80, 0x7d, + 0xc5, 0x32, 0x49, 0xab, 0x7a, 0x32, 0x75, 0xbc, 0x3d, 0xe2, 0x11, 0xd8, 0x82, 0x57, 0xf2, 0x32, + 0x5e, 0xab, 0xee, 0xf7, 0x26, 0xc3, 0x6d, 0x9b, 0x0b, 0x5e, 0x49, 0x62, 0xd5, 0xd0, 0xc9, 0xda, + 0x9b, 0x41, 0xbf, 0xb5, 0xad, 0x6d, 0x3c, 0x07, 0x5b, 0xfb, 0x57, 0x46, 0xfe, 0xf2, 0xce, 0x96, + 0xf3, 0xde, 0xc1, 0xe1, 0x46, 0x24, 0x65, 0x42, 0xd2, 0xea, 0x3f, 0xc4, 0x1e, 0xc0, 0xe8, 0x37, + 0x31, 0x51, 0xf2, 0x42, 0x50, 0x6f, 0x04, 0xf7, 0x75, 0xea, 0xbc, 0x4c, 0xea, 0x39, 0xeb, 0xc4, + 0xc9, 0xab, 0xcf, 0x2f, 0x53, 0x26, 0xbf, 0x5c, 0xc7, 0xfe, 0x8a, 0xe7, 0x81, 0xaa, 0xc0, 0xab, + 0xb4, 0xf9, 0x09, 0x36, 0xfb, 0x93, 0xd2, 0x22, 0x28, 0xe3, 0xa3, 0x94, 0x07, 0xb7, 0x57, 0x2a, + 0xb6, 0xd4, 0x32, 0x1d, 0xff, 0x0a, 0x00, 0x00, 0xff, 0xff, 0xa1, 0xd7, 0x33, 0x1c, 0x99, 0x03, + 0x00, 0x00, } diff --git a/flyteidl/gen/pb-go/flyteidl/admin/project.pb.validate.go b/flyteidl/gen/pb-go/flyteidl/admin/project.pb.validate.go index 7dcfc2d57e..1ae76bde95 100644 --- a/flyteidl/gen/pb-go/flyteidl/admin/project.pb.validate.go +++ b/flyteidl/gen/pb-go/flyteidl/admin/project.pb.validate.go @@ -365,6 +365,81 @@ var _ interface { ErrorName() string } = ProjectListRequestValidationError{} +// Validate checks the field values on ProjectRequest with the rules defined in +// the proto definition for this message. If any rules are violated, an error +// is returned. +func (m *ProjectRequest) Validate() error { + if m == nil { + return nil + } + + if v, ok := interface{}(m.GetProject()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ProjectRequestValidationError{ + field: "Project", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// ProjectRequestValidationError is the validation error returned by +// ProjectRequest.Validate if the designated constraints aren't met. +type ProjectRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ProjectRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ProjectRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ProjectRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ProjectRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ProjectRequestValidationError) ErrorName() string { return "ProjectRequestValidationError" } + +// Error satisfies the builtin error interface +func (e ProjectRequestValidationError) 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 %sProjectRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ProjectRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ProjectRequestValidationError{} + // Validate checks the field values on ProjectRegisterRequest with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned. diff --git a/flyteidl/gen/pb-java/flyteidl/admin/ProjectOuterClass.java b/flyteidl/gen/pb-java/flyteidl/admin/ProjectOuterClass.java index 518b844a41..55e4b781d4 100644 --- a/flyteidl/gen/pb-java/flyteidl/admin/ProjectOuterClass.java +++ b/flyteidl/gen/pb-java/flyteidl/admin/ProjectOuterClass.java @@ -4691,6 +4691,622 @@ public flyteidl.admin.ProjectOuterClass.ProjectListRequest getDefaultInstanceFor } + public interface ProjectRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:flyteidl.admin.ProjectRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .flyteidl.admin.Project project = 1; + */ + boolean hasProject(); + /** + * .flyteidl.admin.Project project = 1; + */ + flyteidl.admin.ProjectOuterClass.Project getProject(); + /** + * .flyteidl.admin.Project project = 1; + */ + flyteidl.admin.ProjectOuterClass.ProjectOrBuilder getProjectOrBuilder(); + } + /** + *
+   * Request to retrieve a single project matching the project id.
+   * See :ref:`ref_flyteidl.admin.Project` for more details
+   * 
+ * + * Protobuf type {@code flyteidl.admin.ProjectRequest} + */ + public static final class ProjectRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flyteidl.admin.ProjectRequest) + ProjectRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ProjectRequest.newBuilder() to construct. + private ProjectRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ProjectRequest() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ProjectRequest( + 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.admin.ProjectOuterClass.Project.Builder subBuilder = null; + if (project_ != null) { + subBuilder = project_.toBuilder(); + } + project_ = input.readMessage(flyteidl.admin.ProjectOuterClass.Project.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(project_); + project_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return flyteidl.admin.ProjectOuterClass.internal_static_flyteidl_admin_ProjectRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return flyteidl.admin.ProjectOuterClass.internal_static_flyteidl_admin_ProjectRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + flyteidl.admin.ProjectOuterClass.ProjectRequest.class, flyteidl.admin.ProjectOuterClass.ProjectRequest.Builder.class); + } + + public static final int PROJECT_FIELD_NUMBER = 1; + private flyteidl.admin.ProjectOuterClass.Project project_; + /** + * .flyteidl.admin.Project project = 1; + */ + public boolean hasProject() { + return project_ != null; + } + /** + * .flyteidl.admin.Project project = 1; + */ + public flyteidl.admin.ProjectOuterClass.Project getProject() { + return project_ == null ? flyteidl.admin.ProjectOuterClass.Project.getDefaultInstance() : project_; + } + /** + * .flyteidl.admin.Project project = 1; + */ + public flyteidl.admin.ProjectOuterClass.ProjectOrBuilder getProjectOrBuilder() { + return getProject(); + } + + 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 (project_ != null) { + output.writeMessage(1, getProject()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (project_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProject()); + } + 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.admin.ProjectOuterClass.ProjectRequest)) { + return super.equals(obj); + } + flyteidl.admin.ProjectOuterClass.ProjectRequest other = (flyteidl.admin.ProjectOuterClass.ProjectRequest) obj; + + if (hasProject() != other.hasProject()) return false; + if (hasProject()) { + if (!getProject() + .equals(other.getProject())) 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 (hasProject()) { + hash = (37 * hash) + PROJECT_FIELD_NUMBER; + hash = (53 * hash) + getProject().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static flyteidl.admin.ProjectOuterClass.ProjectRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.admin.ProjectOuterClass.ProjectRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static flyteidl.admin.ProjectOuterClass.ProjectRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.admin.ProjectOuterClass.ProjectRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static flyteidl.admin.ProjectOuterClass.ProjectRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.admin.ProjectOuterClass.ProjectRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static flyteidl.admin.ProjectOuterClass.ProjectRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static flyteidl.admin.ProjectOuterClass.ProjectRequest 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.admin.ProjectOuterClass.ProjectRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static flyteidl.admin.ProjectOuterClass.ProjectRequest 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.admin.ProjectOuterClass.ProjectRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static flyteidl.admin.ProjectOuterClass.ProjectRequest 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.admin.ProjectOuterClass.ProjectRequest 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; + } + /** + *
+     * Request to retrieve a single project matching the project id.
+     * See :ref:`ref_flyteidl.admin.Project` for more details
+     * 
+ * + * Protobuf type {@code flyteidl.admin.ProjectRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flyteidl.admin.ProjectRequest) + flyteidl.admin.ProjectOuterClass.ProjectRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return flyteidl.admin.ProjectOuterClass.internal_static_flyteidl_admin_ProjectRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return flyteidl.admin.ProjectOuterClass.internal_static_flyteidl_admin_ProjectRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + flyteidl.admin.ProjectOuterClass.ProjectRequest.class, flyteidl.admin.ProjectOuterClass.ProjectRequest.Builder.class); + } + + // Construct using flyteidl.admin.ProjectOuterClass.ProjectRequest.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 (projectBuilder_ == null) { + project_ = null; + } else { + project_ = null; + projectBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return flyteidl.admin.ProjectOuterClass.internal_static_flyteidl_admin_ProjectRequest_descriptor; + } + + @java.lang.Override + public flyteidl.admin.ProjectOuterClass.ProjectRequest getDefaultInstanceForType() { + return flyteidl.admin.ProjectOuterClass.ProjectRequest.getDefaultInstance(); + } + + @java.lang.Override + public flyteidl.admin.ProjectOuterClass.ProjectRequest build() { + flyteidl.admin.ProjectOuterClass.ProjectRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public flyteidl.admin.ProjectOuterClass.ProjectRequest buildPartial() { + flyteidl.admin.ProjectOuterClass.ProjectRequest result = new flyteidl.admin.ProjectOuterClass.ProjectRequest(this); + if (projectBuilder_ == null) { + result.project_ = project_; + } else { + result.project_ = projectBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof flyteidl.admin.ProjectOuterClass.ProjectRequest) { + return mergeFrom((flyteidl.admin.ProjectOuterClass.ProjectRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(flyteidl.admin.ProjectOuterClass.ProjectRequest other) { + if (other == flyteidl.admin.ProjectOuterClass.ProjectRequest.getDefaultInstance()) return this; + if (other.hasProject()) { + mergeProject(other.getProject()); + } + 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.admin.ProjectOuterClass.ProjectRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (flyteidl.admin.ProjectOuterClass.ProjectRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private flyteidl.admin.ProjectOuterClass.Project project_; + private com.google.protobuf.SingleFieldBuilderV3< + flyteidl.admin.ProjectOuterClass.Project, flyteidl.admin.ProjectOuterClass.Project.Builder, flyteidl.admin.ProjectOuterClass.ProjectOrBuilder> projectBuilder_; + /** + * .flyteidl.admin.Project project = 1; + */ + public boolean hasProject() { + return projectBuilder_ != null || project_ != null; + } + /** + * .flyteidl.admin.Project project = 1; + */ + public flyteidl.admin.ProjectOuterClass.Project getProject() { + if (projectBuilder_ == null) { + return project_ == null ? flyteidl.admin.ProjectOuterClass.Project.getDefaultInstance() : project_; + } else { + return projectBuilder_.getMessage(); + } + } + /** + * .flyteidl.admin.Project project = 1; + */ + public Builder setProject(flyteidl.admin.ProjectOuterClass.Project value) { + if (projectBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + project_ = value; + onChanged(); + } else { + projectBuilder_.setMessage(value); + } + + return this; + } + /** + * .flyteidl.admin.Project project = 1; + */ + public Builder setProject( + flyteidl.admin.ProjectOuterClass.Project.Builder builderForValue) { + if (projectBuilder_ == null) { + project_ = builderForValue.build(); + onChanged(); + } else { + projectBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .flyteidl.admin.Project project = 1; + */ + public Builder mergeProject(flyteidl.admin.ProjectOuterClass.Project value) { + if (projectBuilder_ == null) { + if (project_ != null) { + project_ = + flyteidl.admin.ProjectOuterClass.Project.newBuilder(project_).mergeFrom(value).buildPartial(); + } else { + project_ = value; + } + onChanged(); + } else { + projectBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .flyteidl.admin.Project project = 1; + */ + public Builder clearProject() { + if (projectBuilder_ == null) { + project_ = null; + onChanged(); + } else { + project_ = null; + projectBuilder_ = null; + } + + return this; + } + /** + * .flyteidl.admin.Project project = 1; + */ + public flyteidl.admin.ProjectOuterClass.Project.Builder getProjectBuilder() { + + onChanged(); + return getProjectFieldBuilder().getBuilder(); + } + /** + * .flyteidl.admin.Project project = 1; + */ + public flyteidl.admin.ProjectOuterClass.ProjectOrBuilder getProjectOrBuilder() { + if (projectBuilder_ != null) { + return projectBuilder_.getMessageOrBuilder(); + } else { + return project_ == null ? + flyteidl.admin.ProjectOuterClass.Project.getDefaultInstance() : project_; + } + } + /** + * .flyteidl.admin.Project project = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + flyteidl.admin.ProjectOuterClass.Project, flyteidl.admin.ProjectOuterClass.Project.Builder, flyteidl.admin.ProjectOuterClass.ProjectOrBuilder> + getProjectFieldBuilder() { + if (projectBuilder_ == null) { + projectBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + flyteidl.admin.ProjectOuterClass.Project, flyteidl.admin.ProjectOuterClass.Project.Builder, flyteidl.admin.ProjectOuterClass.ProjectOrBuilder>( + getProject(), + getParentForChildren(), + isClean()); + project_ = null; + } + return projectBuilder_; + } + @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.admin.ProjectRequest) + } + + // @@protoc_insertion_point(class_scope:flyteidl.admin.ProjectRequest) + private static final flyteidl.admin.ProjectOuterClass.ProjectRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new flyteidl.admin.ProjectOuterClass.ProjectRequest(); + } + + public static flyteidl.admin.ProjectOuterClass.ProjectRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProjectRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ProjectRequest(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.admin.ProjectOuterClass.ProjectRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + public interface ProjectRegisterRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:flyteidl.admin.ProjectRegisterRequest) com.google.protobuf.MessageOrBuilder { @@ -6225,6 +6841,11 @@ public flyteidl.admin.ProjectOuterClass.ProjectUpdateResponse getDefaultInstance private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_flyteidl_admin_ProjectListRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flyteidl_admin_ProjectRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flyteidl_admin_ProjectRequest_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_flyteidl_admin_ProjectRegisterRequest_descriptor; private static final @@ -6262,12 +6883,13 @@ public flyteidl.admin.ProjectOuterClass.ProjectUpdateResponse getDefaultInstance ".flyteidl.admin.Project\022\r\n\005token\030\002 \001(\t\"j" + "\n\022ProjectListRequest\022\r\n\005limit\030\001 \001(\r\022\r\n\005t" + "oken\030\002 \001(\t\022\017\n\007filters\030\003 \001(\t\022%\n\007sort_by\030\004" + - " \001(\0132\024.flyteidl.admin.Sort\"B\n\026ProjectReg" + - "isterRequest\022(\n\007project\030\001 \001(\0132\027.flyteidl" + - ".admin.Project\"\031\n\027ProjectRegisterRespons" + - "e\"\027\n\025ProjectUpdateResponseB=Z;github.com" + - "/flyteorg/flyte/flyteidl/gen/pb-go/flyte" + - "idl/adminb\006proto3" + " \001(\0132\024.flyteidl.admin.Sort\":\n\016ProjectReq" + + "uest\022(\n\007project\030\001 \001(\0132\027.flyteidl.admin.P" + + "roject\"B\n\026ProjectRegisterRequest\022(\n\007proj" + + "ect\030\001 \001(\0132\027.flyteidl.admin.Project\"\031\n\027Pr" + + "ojectRegisterResponse\"\027\n\025ProjectUpdateRe" + + "sponseB=Z;github.com/flyteorg/flyte/flyt" + + "eidl/gen/pb-go/flyteidl/adminb\006proto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { @@ -6306,20 +6928,26 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_flyteidl_admin_ProjectListRequest_descriptor, new java.lang.String[] { "Limit", "Token", "Filters", "SortBy", }); - internal_static_flyteidl_admin_ProjectRegisterRequest_descriptor = + internal_static_flyteidl_admin_ProjectRequest_descriptor = getDescriptor().getMessageTypes().get(4); + internal_static_flyteidl_admin_ProjectRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flyteidl_admin_ProjectRequest_descriptor, + new java.lang.String[] { "Project", }); + internal_static_flyteidl_admin_ProjectRegisterRequest_descriptor = + getDescriptor().getMessageTypes().get(5); internal_static_flyteidl_admin_ProjectRegisterRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_flyteidl_admin_ProjectRegisterRequest_descriptor, new java.lang.String[] { "Project", }); internal_static_flyteidl_admin_ProjectRegisterResponse_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(6); internal_static_flyteidl_admin_ProjectRegisterResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_flyteidl_admin_ProjectRegisterResponse_descriptor, new java.lang.String[] { }); internal_static_flyteidl_admin_ProjectUpdateResponse_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(7); internal_static_flyteidl_admin_ProjectUpdateResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_flyteidl_admin_ProjectUpdateResponse_descriptor, diff --git a/flyteidl/gen/pb-js/flyteidl.d.ts b/flyteidl/gen/pb-js/flyteidl.d.ts index 4889385c65..ac262f0656 100644 --- a/flyteidl/gen/pb-js/flyteidl.d.ts +++ b/flyteidl/gen/pb-js/flyteidl.d.ts @@ -15093,6 +15093,58 @@ export namespace flyteidl { public static verify(message: { [k: string]: any }): (string|null); } + /** Properties of a ProjectRequest. */ + interface IProjectRequest { + + /** ProjectRequest project */ + project?: (flyteidl.admin.IProject|null); + } + + /** Represents a ProjectRequest. */ + class ProjectRequest implements IProjectRequest { + + /** + * Constructs a new ProjectRequest. + * @param [properties] Properties to set + */ + constructor(properties?: flyteidl.admin.IProjectRequest); + + /** ProjectRequest project. */ + public project?: (flyteidl.admin.IProject|null); + + /** + * Creates a new ProjectRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ProjectRequest instance + */ + public static create(properties?: flyteidl.admin.IProjectRequest): flyteidl.admin.ProjectRequest; + + /** + * Encodes the specified ProjectRequest message. Does not implicitly {@link flyteidl.admin.ProjectRequest.verify|verify} messages. + * @param message ProjectRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: flyteidl.admin.IProjectRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProjectRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProjectRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): flyteidl.admin.ProjectRequest; + + /** + * Verifies a ProjectRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + } + /** Properties of a ProjectRegisterRequest. */ interface IProjectRegisterRequest { diff --git a/flyteidl/gen/pb-js/flyteidl.js b/flyteidl/gen/pb-js/flyteidl.js index 46812b6db7..4777031419 100644 --- a/flyteidl/gen/pb-js/flyteidl.js +++ b/flyteidl/gen/pb-js/flyteidl.js @@ -36381,6 +36381,118 @@ return ProjectListRequest; })(); + admin.ProjectRequest = (function() { + + /** + * Properties of a ProjectRequest. + * @memberof flyteidl.admin + * @interface IProjectRequest + * @property {flyteidl.admin.IProject|null} [project] ProjectRequest project + */ + + /** + * Constructs a new ProjectRequest. + * @memberof flyteidl.admin + * @classdesc Represents a ProjectRequest. + * @implements IProjectRequest + * @constructor + * @param {flyteidl.admin.IProjectRequest=} [properties] Properties to set + */ + function ProjectRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProjectRequest project. + * @member {flyteidl.admin.IProject|null|undefined} project + * @memberof flyteidl.admin.ProjectRequest + * @instance + */ + ProjectRequest.prototype.project = null; + + /** + * Creates a new ProjectRequest instance using the specified properties. + * @function create + * @memberof flyteidl.admin.ProjectRequest + * @static + * @param {flyteidl.admin.IProjectRequest=} [properties] Properties to set + * @returns {flyteidl.admin.ProjectRequest} ProjectRequest instance + */ + ProjectRequest.create = function create(properties) { + return new ProjectRequest(properties); + }; + + /** + * Encodes the specified ProjectRequest message. Does not implicitly {@link flyteidl.admin.ProjectRequest.verify|verify} messages. + * @function encode + * @memberof flyteidl.admin.ProjectRequest + * @static + * @param {flyteidl.admin.IProjectRequest} message ProjectRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProjectRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.project != null && message.hasOwnProperty("project")) + $root.flyteidl.admin.Project.encode(message.project, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Decodes a ProjectRequest message from the specified reader or buffer. + * @function decode + * @memberof flyteidl.admin.ProjectRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {flyteidl.admin.ProjectRequest} ProjectRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProjectRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.admin.ProjectRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.project = $root.flyteidl.admin.Project.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Verifies a ProjectRequest message. + * @function verify + * @memberof flyteidl.admin.ProjectRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProjectRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.project != null && message.hasOwnProperty("project")) { + var error = $root.flyteidl.admin.Project.verify(message.project); + if (error) + return "project." + error; + } + return null; + }; + + return ProjectRequest; + })(); + admin.ProjectRegisterRequest = (function() { /** diff --git a/flyteidl/gen/pb_python/flyteidl/admin/project_pb2.py b/flyteidl/gen/pb_python/flyteidl/admin/project_pb2.py index ae321b092c..2804a074d5 100644 --- a/flyteidl/gen/pb_python/flyteidl/admin/project_pb2.py +++ b/flyteidl/gen/pb_python/flyteidl/admin/project_pb2.py @@ -14,7 +14,7 @@ from flyteidl.admin import common_pb2 as flyteidl_dot_admin_dot_common__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1c\x66lyteidl/admin/project.proto\x12\x0e\x66lyteidl.admin\x1a\x1b\x66lyteidl/admin/common.proto\",\n\x06\x44omain\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\"\xad\x02\n\x07Project\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x30\n\x07\x64omains\x18\x03 \x03(\x0b\x32\x16.flyteidl.admin.DomainR\x07\x64omains\x12 \n\x0b\x64\x65scription\x18\x04 \x01(\tR\x0b\x64\x65scription\x12.\n\x06labels\x18\x05 \x01(\x0b\x32\x16.flyteidl.admin.LabelsR\x06labels\x12:\n\x05state\x18\x06 \x01(\x0e\x32$.flyteidl.admin.Project.ProjectStateR\x05state\">\n\x0cProjectState\x12\n\n\x06\x41\x43TIVE\x10\x00\x12\x0c\n\x08\x41RCHIVED\x10\x01\x12\x14\n\x10SYSTEM_GENERATED\x10\x02\"U\n\x08Projects\x12\x33\n\x08projects\x18\x01 \x03(\x0b\x32\x17.flyteidl.admin.ProjectR\x08projects\x12\x14\n\x05token\x18\x02 \x01(\tR\x05token\"\x89\x01\n\x12ProjectListRequest\x12\x14\n\x05limit\x18\x01 \x01(\rR\x05limit\x12\x14\n\x05token\x18\x02 \x01(\tR\x05token\x12\x18\n\x07\x66ilters\x18\x03 \x01(\tR\x07\x66ilters\x12-\n\x07sort_by\x18\x04 \x01(\x0b\x32\x14.flyteidl.admin.SortR\x06sortBy\"K\n\x16ProjectRegisterRequest\x12\x31\n\x07project\x18\x01 \x01(\x0b\x32\x17.flyteidl.admin.ProjectR\x07project\"\x19\n\x17ProjectRegisterResponse\"\x17\n\x15ProjectUpdateResponseB\xb8\x01\n\x12\x63om.flyteidl.adminB\x0cProjectProtoP\x01Z;github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin\xa2\x02\x03\x46\x41X\xaa\x02\x0e\x46lyteidl.Admin\xca\x02\x0e\x46lyteidl\\Admin\xe2\x02\x1a\x46lyteidl\\Admin\\GPBMetadata\xea\x02\x0f\x46lyteidl::Adminb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1c\x66lyteidl/admin/project.proto\x12\x0e\x66lyteidl.admin\x1a\x1b\x66lyteidl/admin/common.proto\",\n\x06\x44omain\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\"\xad\x02\n\x07Project\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x30\n\x07\x64omains\x18\x03 \x03(\x0b\x32\x16.flyteidl.admin.DomainR\x07\x64omains\x12 \n\x0b\x64\x65scription\x18\x04 \x01(\tR\x0b\x64\x65scription\x12.\n\x06labels\x18\x05 \x01(\x0b\x32\x16.flyteidl.admin.LabelsR\x06labels\x12:\n\x05state\x18\x06 \x01(\x0e\x32$.flyteidl.admin.Project.ProjectStateR\x05state\">\n\x0cProjectState\x12\n\n\x06\x41\x43TIVE\x10\x00\x12\x0c\n\x08\x41RCHIVED\x10\x01\x12\x14\n\x10SYSTEM_GENERATED\x10\x02\"U\n\x08Projects\x12\x33\n\x08projects\x18\x01 \x03(\x0b\x32\x17.flyteidl.admin.ProjectR\x08projects\x12\x14\n\x05token\x18\x02 \x01(\tR\x05token\"\x89\x01\n\x12ProjectListRequest\x12\x14\n\x05limit\x18\x01 \x01(\rR\x05limit\x12\x14\n\x05token\x18\x02 \x01(\tR\x05token\x12\x18\n\x07\x66ilters\x18\x03 \x01(\tR\x07\x66ilters\x12-\n\x07sort_by\x18\x04 \x01(\x0b\x32\x14.flyteidl.admin.SortR\x06sortBy\"C\n\x0eProjectRequest\x12\x31\n\x07project\x18\x01 \x01(\x0b\x32\x17.flyteidl.admin.ProjectR\x07project\"K\n\x16ProjectRegisterRequest\x12\x31\n\x07project\x18\x01 \x01(\x0b\x32\x17.flyteidl.admin.ProjectR\x07project\"\x19\n\x17ProjectRegisterResponse\"\x17\n\x15ProjectUpdateResponseB\xb8\x01\n\x12\x63om.flyteidl.adminB\x0cProjectProtoP\x01Z;github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin\xa2\x02\x03\x46\x41X\xaa\x02\x0e\x46lyteidl.Admin\xca\x02\x0e\x46lyteidl\\Admin\xe2\x02\x1a\x46lyteidl\\Admin\\GPBMetadata\xea\x02\x0f\x46lyteidl::Adminb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -33,10 +33,12 @@ _globals['_PROJECTS']._serialized_end=512 _globals['_PROJECTLISTREQUEST']._serialized_start=515 _globals['_PROJECTLISTREQUEST']._serialized_end=652 - _globals['_PROJECTREGISTERREQUEST']._serialized_start=654 - _globals['_PROJECTREGISTERREQUEST']._serialized_end=729 - _globals['_PROJECTREGISTERRESPONSE']._serialized_start=731 - _globals['_PROJECTREGISTERRESPONSE']._serialized_end=756 - _globals['_PROJECTUPDATERESPONSE']._serialized_start=758 - _globals['_PROJECTUPDATERESPONSE']._serialized_end=781 + _globals['_PROJECTREQUEST']._serialized_start=654 + _globals['_PROJECTREQUEST']._serialized_end=721 + _globals['_PROJECTREGISTERREQUEST']._serialized_start=723 + _globals['_PROJECTREGISTERREQUEST']._serialized_end=798 + _globals['_PROJECTREGISTERRESPONSE']._serialized_start=800 + _globals['_PROJECTREGISTERRESPONSE']._serialized_end=825 + _globals['_PROJECTUPDATERESPONSE']._serialized_start=827 + _globals['_PROJECTUPDATERESPONSE']._serialized_end=850 # @@protoc_insertion_point(module_scope) diff --git a/flyteidl/gen/pb_python/flyteidl/admin/project_pb2.pyi b/flyteidl/gen/pb_python/flyteidl/admin/project_pb2.pyi index 33b5106c81..16958e6d4e 100644 --- a/flyteidl/gen/pb_python/flyteidl/admin/project_pb2.pyi +++ b/flyteidl/gen/pb_python/flyteidl/admin/project_pb2.pyi @@ -59,6 +59,12 @@ class ProjectListRequest(_message.Message): sort_by: _common_pb2.Sort def __init__(self, limit: _Optional[int] = ..., token: _Optional[str] = ..., filters: _Optional[str] = ..., sort_by: _Optional[_Union[_common_pb2.Sort, _Mapping]] = ...) -> None: ... +class ProjectRequest(_message.Message): + __slots__ = ["project"] + PROJECT_FIELD_NUMBER: _ClassVar[int] + project: Project + def __init__(self, project: _Optional[_Union[Project, _Mapping]] = ...) -> None: ... + class ProjectRegisterRequest(_message.Message): __slots__ = ["project"] PROJECT_FIELD_NUMBER: _ClassVar[int] diff --git a/flyteidl/gen/pb_rust/flyteidl.admin.rs b/flyteidl/gen/pb_rust/flyteidl.admin.rs index 759983a507..df72af1cfb 100644 --- a/flyteidl/gen/pb_rust/flyteidl.admin.rs +++ b/flyteidl/gen/pb_rust/flyteidl.admin.rs @@ -2257,6 +2257,14 @@ pub struct ProjectListRequest { #[prost(message, optional, tag="4")] pub sort_by: ::core::option::Option, } +/// Request to retrieve a single project matching the project id. +/// See :ref:`ref_flyteidl.admin.Project` for more details +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ProjectRequest { + #[prost(message, optional, tag="1")] + pub project: ::core::option::Option, +} /// Adds a new user-project within the Flyte deployment. /// See :ref:`ref_flyteidl.admin.Project` for more details #[allow(clippy::derive_partial_eq_without_eq)] diff --git a/flyteidl/protos/flyteidl/admin/project.proto b/flyteidl/protos/flyteidl/admin/project.proto index 761ae8da05..1f60cfc53a 100644 --- a/flyteidl/protos/flyteidl/admin/project.proto +++ b/flyteidl/protos/flyteidl/admin/project.proto @@ -79,6 +79,12 @@ message ProjectListRequest { Sort sort_by = 4; } +// Request to retrieve a single project matching the project id. +// See :ref:`ref_flyteidl.admin.Project` for more details +message ProjectRequest{ + Project project = 1; +} + // Adds a new user-project within the Flyte deployment. // See :ref:`ref_flyteidl.admin.Project` for more details message ProjectRegisterRequest {