Skip to content

Commit

Permalink
feat: add 'reference_id', 'is_managed and' 'last_synced_at' fields
Browse files Browse the repository at this point in the history
Signed-off-by: ImMin5 <[email protected]>
  • Loading branch information
ImMin5 committed Mar 28, 2024
1 parent 5d979ef commit 3bb47f2
Show file tree
Hide file tree
Showing 4 changed files with 239 additions and 227 deletions.
277 changes: 140 additions & 137 deletions proto/spaceone/api/identity/v2/project.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,177 +13,180 @@ import "spaceone/api/identity/v2/project_group.proto";


service Project {
rpc create (CreateProjectRequest) returns (ProjectInfo) {
option (google.api.http) = {
post: "/identity/v2/project/create"
body: "*"
};
}
rpc update (UpdateProjectRequest) returns (ProjectInfo) {
option (google.api.http) = {
post: "/identity/v2/project/update"
body: "*"
};
}

rpc update_project_type (UpdateProjectTypeRequest) returns (ProjectInfo) {
option (google.api.http) = {
post: "/identity/v2/project/update-project-type"
body: "*"
};
}
rpc change_project_group (ChangeProjectGroupRequest) returns (ProjectInfo) {
option (google.api.http) = {
post: "/identity/v2/project/change-project-group"
body: "*"
};
}

rpc delete (ProjectRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/identity/v2/project/delete"
body: "*"
};
}

rpc add_users (UsersProjectRequest) returns (ProjectInfo) {
option (google.api.http) = {
post: "/identity/v2/project/add-users"
body: "*"
};
}

rpc remove_users (UsersProjectRequest) returns (ProjectInfo) {
option (google.api.http) = {
post: "/identity/v2/project/remove-users"
body: "*"
};
}

rpc add_user_groups (UserGroupsProjectRequest) returns (ProjectInfo) {
option (google.api.http) = {
post: "/identity/v2/project/add-user-groups"
body: "*"
};
}

rpc remove_user_groups (UserGroupsProjectRequest) returns (ProjectInfo) {
option (google.api.http) = {
post: "/identity/v2/project/remove-user-groups"
body: "*"
};
}

rpc get (ProjectRequest) returns (ProjectInfo) {
option (google.api.http) = {
post: "/identity/v2/project/get"
body: "*"
};
}

rpc list (ProjectSearchQuery) returns (ProjectsInfo) {
option (google.api.http) = {
post: "/identity/v2/project/list"
body: "*"
};
}
rpc stat (ProjectStatQuery) returns (google.protobuf.Struct) {
option (google.api.http) = {
post: "/identity/v2/project/stat"
body: "*"
};
}
rpc create (CreateProjectRequest) returns (ProjectInfo) {
option (google.api.http) = {
post: "/identity/v2/project/create"
body: "*"
};
}
rpc update (UpdateProjectRequest) returns (ProjectInfo) {
option (google.api.http) = {
post: "/identity/v2/project/update"
body: "*"
};
}

rpc update_project_type (UpdateProjectTypeRequest) returns (ProjectInfo) {
option (google.api.http) = {
post: "/identity/v2/project/update-project-type"
body: "*"
};
}
rpc change_project_group (ChangeProjectGroupRequest) returns (ProjectInfo) {
option (google.api.http) = {
post: "/identity/v2/project/change-project-group"
body: "*"
};
}

rpc delete (ProjectRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/identity/v2/project/delete"
body: "*"
};
}

rpc add_users (UsersProjectRequest) returns (ProjectInfo) {
option (google.api.http) = {
post: "/identity/v2/project/add-users"
body: "*"
};
}

rpc remove_users (UsersProjectRequest) returns (ProjectInfo) {
option (google.api.http) = {
post: "/identity/v2/project/remove-users"
body: "*"
};
}

rpc add_user_groups (UserGroupsProjectRequest) returns (ProjectInfo) {
option (google.api.http) = {
post: "/identity/v2/project/add-user-groups"
body: "*"
};
}

rpc remove_user_groups (UserGroupsProjectRequest) returns (ProjectInfo) {
option (google.api.http) = {
post: "/identity/v2/project/remove-user-groups"
body: "*"
};
}

rpc get (ProjectRequest) returns (ProjectInfo) {
option (google.api.http) = {
post: "/identity/v2/project/get"
body: "*"
};
}

rpc list (ProjectSearchQuery) returns (ProjectsInfo) {
option (google.api.http) = {
post: "/identity/v2/project/list"
body: "*"
};
}
rpc stat (ProjectStatQuery) returns (google.protobuf.Struct) {
option (google.api.http) = {
post: "/identity/v2/project/stat"
body: "*"
};
}
}

enum ProjectType {
PROJECT_TYPE_NONE = 0;
PRIVATE = 1;
PUBLIC = 2;
PROJECT_TYPE_NONE = 0;
PRIVATE = 1;
PUBLIC = 2;
}

message CreateProjectRequest {
string name = 1;
ProjectType project_type = 2;
// +optional
google.protobuf.Struct tags = 3;
// +optional
string project_group_id = 4;
string name = 1;
ProjectType project_type = 2;
// +optional
google.protobuf.Struct tags = 3;
// +optional
string project_group_id = 4;
}

message UpdateProjectRequest {
string project_id = 1;
// +optional
string name = 2;
// +optional
google.protobuf.Struct tags = 3;
string project_id = 1;
// +optional
string name = 2;
// +optional
google.protobuf.Struct tags = 3;
}

message UpdateProjectTypeRequest {
string project_id = 1;
ProjectType project_type = 2;
string project_id = 1;
ProjectType project_type = 2;
}

message ChangeProjectGroupRequest {
string project_id = 1;
string project_group_id = 2;
string project_id = 1;
string project_group_id = 2;
}

message ProjectRequest {
string project_id = 1;
string project_id = 1;
}

message UsersProjectRequest {
string project_id = 1;
repeated string users = 2;
string project_id = 1;
repeated string users = 2;
}

message UserGroupsProjectRequest {
string project_id = 1;
repeated string user_groups = 2;
string project_id = 1;
repeated string user_groups = 2;
}

message ProjectInfo {
string project_id = 1;
string name = 2;
ProjectType project_type = 3;
google.protobuf.Struct tags = 4;
repeated string users = 5;
repeated string user_groups = 6;
string created_by = 7;
string domain_id = 21;
string workspace_id = 22;
string project_group_id = 23;
string created_at = 31;
string project_id = 1;
string name = 2;
ProjectType project_type = 3;
google.protobuf.Struct tags = 4;
repeated string users = 5;
repeated string user_groups = 6;
string created_by = 7;
string reference_id = 8;
bool is_managed = 9;
string domain_id = 21;
string workspace_id = 22;
string project_group_id = 23;
string created_at = 31;
string last_synced_at = 32;
}

message ProjectSearchQuery {
// +optional
spaceone.api.core.v2.Query query = 1;
// +optional
string project_id = 2;
// +optional
string name = 3;
// +optional
ProjectType project_type = 4;
// +optional
string created_by = 5;
// +optional
bool include_children = 6;
// +optional
string workspace_id = 21;
// +optional
string project_group_id = 23;
// +optional
string user_group_id = 24;
// +optional
string user_id = 25;
// +optional
spaceone.api.core.v2.Query query = 1;
// +optional
string project_id = 2;
// +optional
string name = 3;
// +optional
ProjectType project_type = 4;
// +optional
string created_by = 5;
// +optional
bool include_children = 6;
// +optional
string workspace_id = 21;
// +optional
string project_group_id = 23;
// +optional
string user_group_id = 24;
// +optional
string user_id = 25;
}

message ProjectsInfo {
repeated ProjectInfo results = 1;
int32 total_count = 2;
repeated ProjectInfo results = 1;
int32 total_count = 2;
}

message ProjectStatQuery {
spaceone.api.core.v2.StatisticsQuery query = 1;
spaceone.api.core.v2.StatisticsQuery query = 1;
}
3 changes: 3 additions & 0 deletions proto/spaceone/api/identity/v2/project_group.proto
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,13 @@ message ProjectGroupInfo {
string name = 2;
google.protobuf.Struct tags = 3;
repeated string users = 4;
string reference_id = 5;
bool is_managed = 6;
string domain_id = 21;
string workspace_id = 22;
string parent_group_id = 23;
string created_at = 31;
string last_synced_at = 32;
}

message ProjectGroupSearchQuery {
Expand Down
3 changes: 3 additions & 0 deletions proto/spaceone/api/identity/v2/service_account.proto
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ message ServiceAccountInfo {
string provider = 4;
google.protobuf.Struct options = 5;
google.protobuf.Struct tags = 6;
string reference_id = 7;
bool is_managed = 8;
string domain_id = 21;
string workspace_id = 22;
string project_id = 23;
Expand All @@ -162,6 +164,7 @@ message ServiceAccountInfo {
string secret_id = 26;
string app_id = 27;
string created_at = 31;
string last_synced_at = 32;
}

message ServiceAccountSearchQuery {
Expand Down
Loading

0 comments on commit 3bb47f2

Please sign in to comment.