From e87e7b5a7672b305626a6293090266d278e530f0 Mon Sep 17 00:00:00 2001 From: Yoshiki Fujikane Date: Tue, 24 Dec 2024 18:34:55 +0900 Subject: [PATCH 1/4] Add rpc for livestate in the plugin architecture Signed-off-by: Yoshiki Fujikane --- pkg/model/application_live_state.proto | 44 +++++++++++++++++++++ pkg/plugin/api/v1alpha1/livestate/api.proto | 36 +++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 pkg/plugin/api/v1alpha1/livestate/api.proto diff --git a/pkg/model/application_live_state.proto b/pkg/model/application_live_state.proto index ef09a0e4a5..342e9ec7f3 100644 --- a/pkg/model/application_live_state.proto +++ b/pkg/model/application_live_state.proto @@ -43,6 +43,7 @@ message ApplicationLiveStateSnapshot { ECSApplicationLiveState ecs = 14; ApplicationLiveStateVersion version = 15 [(validate.rules).message.required = true]; + ApplicationLiveState application_live_state = 16; } message ApplicationLiveStateVersion { @@ -71,6 +72,49 @@ message LambdaApplicationLiveState { repeated LambdaResourceState resources = 1; } +message ApplicationLiveState { + repeated ResourceState resources = 1; + + enum Status { + UNKNOWN = 0; + HEALTHY = 1; + OTHER = 2; + } + // The health status of the application. + Status health_status = 2; +} + +// TODO: refine the actual state information +// Existing fields: api_version, kind, namespace +// Addtional fields: deploy_target +message ResourceState { + enum HealthStatus { + UNKNOWN = 0; + HEALTHY = 1; + UNHEALTHY = 2; + } + + // The unique ID. + string id = 1 [(validate.rules).string.min_len = 1]; + // The sorted list of unique IDs of the parents. + repeated string parent_ids = 2; + // The name of resource. + string name = 3 [(validate.rules).string.min_len = 1]; + // The type of this resource. + string resource_type = 4; + // The metadata of this resource. + map resource_metadata = 5; + // The health status of this resource. + HealthStatus health_status = 6 [(validate.rules).enum.defined_only = true]; + // The description of the health status. + string health_description = 7; + + // The timestamp when this resource was created. + int64 created_at = 10 [(validate.rules).int64.gt = 0]; + // The timestamp of the last time when this resource was updated. + int64 updated_at = 11 [(validate.rules).int64.gt = 0]; +} + // KubernetesResourceState represents the state of a single kubernetes resource object. message KubernetesResourceState { enum HealthStatus { diff --git a/pkg/plugin/api/v1alpha1/livestate/api.proto b/pkg/plugin/api/v1alpha1/livestate/api.proto new file mode 100644 index 0000000000..c5edfb4cc2 --- /dev/null +++ b/pkg/plugin/api/v1alpha1/livestate/api.proto @@ -0,0 +1,36 @@ +// Copyright 2024 The PipeCD Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grpc.plugin.livestateapi.v1alpha1; +option go_package = "github.com/pipe-cd/pipecd/pkg/plugin/api/v1alpha1/livestate"; + +import "pkg/model/application_live_state.proto"; +import "pkg/model/application.proto"; + +// LivestateService defines the public API for the livestate feature for plugin. +service LivestateService { + // GetLivestate gets the application live state for the give app id. + rpc GetLivestate(GetLivestateRequest) returns (GetLivestateResponse) {} +} + +message GetLivestateRequest { + string application_id = 1; +} + +message GetLivestateResponse { + model.ApplicationLiveState application_live_state = 1; + model.ApplicationSyncState sync_state = 2; +} From 2caeb796f13eef243cdc1c56e597172a4b36df32 Mon Sep 17 00:00:00 2001 From: Yoshiki Fujikane Date: Tue, 24 Dec 2024 18:49:14 +0900 Subject: [PATCH 2/4] Do gen/code Signed-off-by: Yoshiki Fujikane --- pkg/model/application_live_state.pb.go | 893 +++++++++++++----- .../application_live_state.pb.validate.go | 328 +++++++ pkg/plugin/api/v1alpha1/livestate/api.pb.go | 263 ++++++ .../api/v1alpha1/livestate/api.pb.validate.go | 300 ++++++ .../api/v1alpha1/livestate/api_grpc.pb.go | 107 +++ tool/codegen/codegen.sh | 1 + web/model/application_live_state_pb.d.ts | 94 ++ web/model/application_live_state_pb.js | 707 +++++++++++++- 8 files changed, 2431 insertions(+), 262 deletions(-) create mode 100644 pkg/plugin/api/v1alpha1/livestate/api.pb.go create mode 100644 pkg/plugin/api/v1alpha1/livestate/api.pb.validate.go create mode 100644 pkg/plugin/api/v1alpha1/livestate/api_grpc.pb.go diff --git a/pkg/model/application_live_state.pb.go b/pkg/model/application_live_state.pb.go index bc6cb44bbc..ec9db2a6d0 100644 --- a/pkg/model/application_live_state.pb.go +++ b/pkg/model/application_live_state.pb.go @@ -84,6 +84,104 @@ func (ApplicationLiveStateSnapshot_Status) EnumDescriptor() ([]byte, []int) { return file_pkg_model_application_live_state_proto_rawDescGZIP(), []int{0, 0} } +type ApplicationLiveState_Status int32 + +const ( + ApplicationLiveState_UNKNOWN ApplicationLiveState_Status = 0 + ApplicationLiveState_HEALTHY ApplicationLiveState_Status = 1 + ApplicationLiveState_OTHER ApplicationLiveState_Status = 2 +) + +// Enum value maps for ApplicationLiveState_Status. +var ( + ApplicationLiveState_Status_name = map[int32]string{ + 0: "UNKNOWN", + 1: "HEALTHY", + 2: "OTHER", + } + ApplicationLiveState_Status_value = map[string]int32{ + "UNKNOWN": 0, + "HEALTHY": 1, + "OTHER": 2, + } +) + +func (x ApplicationLiveState_Status) Enum() *ApplicationLiveState_Status { + p := new(ApplicationLiveState_Status) + *p = x + return p +} + +func (x ApplicationLiveState_Status) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ApplicationLiveState_Status) Descriptor() protoreflect.EnumDescriptor { + return file_pkg_model_application_live_state_proto_enumTypes[1].Descriptor() +} + +func (ApplicationLiveState_Status) Type() protoreflect.EnumType { + return &file_pkg_model_application_live_state_proto_enumTypes[1] +} + +func (x ApplicationLiveState_Status) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ApplicationLiveState_Status.Descriptor instead. +func (ApplicationLiveState_Status) EnumDescriptor() ([]byte, []int) { + return file_pkg_model_application_live_state_proto_rawDescGZIP(), []int{7, 0} +} + +type ResourceState_HealthStatus int32 + +const ( + ResourceState_UNKNOWN ResourceState_HealthStatus = 0 + ResourceState_HEALTHY ResourceState_HealthStatus = 1 + ResourceState_UNHEALTHY ResourceState_HealthStatus = 2 +) + +// Enum value maps for ResourceState_HealthStatus. +var ( + ResourceState_HealthStatus_name = map[int32]string{ + 0: "UNKNOWN", + 1: "HEALTHY", + 2: "UNHEALTHY", + } + ResourceState_HealthStatus_value = map[string]int32{ + "UNKNOWN": 0, + "HEALTHY": 1, + "UNHEALTHY": 2, + } +) + +func (x ResourceState_HealthStatus) Enum() *ResourceState_HealthStatus { + p := new(ResourceState_HealthStatus) + *p = x + return p +} + +func (x ResourceState_HealthStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ResourceState_HealthStatus) Descriptor() protoreflect.EnumDescriptor { + return file_pkg_model_application_live_state_proto_enumTypes[2].Descriptor() +} + +func (ResourceState_HealthStatus) Type() protoreflect.EnumType { + return &file_pkg_model_application_live_state_proto_enumTypes[2] +} + +func (x ResourceState_HealthStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ResourceState_HealthStatus.Descriptor instead. +func (ResourceState_HealthStatus) EnumDescriptor() ([]byte, []int) { + return file_pkg_model_application_live_state_proto_rawDescGZIP(), []int{8, 0} +} + type KubernetesResourceState_HealthStatus int32 const ( @@ -117,11 +215,11 @@ func (x KubernetesResourceState_HealthStatus) String() string { } func (KubernetesResourceState_HealthStatus) Descriptor() protoreflect.EnumDescriptor { - return file_pkg_model_application_live_state_proto_enumTypes[1].Descriptor() + return file_pkg_model_application_live_state_proto_enumTypes[3].Descriptor() } func (KubernetesResourceState_HealthStatus) Type() protoreflect.EnumType { - return &file_pkg_model_application_live_state_proto_enumTypes[1] + return &file_pkg_model_application_live_state_proto_enumTypes[3] } func (x KubernetesResourceState_HealthStatus) Number() protoreflect.EnumNumber { @@ -130,7 +228,7 @@ func (x KubernetesResourceState_HealthStatus) Number() protoreflect.EnumNumber { // Deprecated: Use KubernetesResourceState_HealthStatus.Descriptor instead. func (KubernetesResourceState_HealthStatus) EnumDescriptor() ([]byte, []int) { - return file_pkg_model_application_live_state_proto_rawDescGZIP(), []int{7, 0} + return file_pkg_model_application_live_state_proto_rawDescGZIP(), []int{9, 0} } type KubernetesResourceStateEvent_Type int32 @@ -163,11 +261,11 @@ func (x KubernetesResourceStateEvent_Type) String() string { } func (KubernetesResourceStateEvent_Type) Descriptor() protoreflect.EnumDescriptor { - return file_pkg_model_application_live_state_proto_enumTypes[2].Descriptor() + return file_pkg_model_application_live_state_proto_enumTypes[4].Descriptor() } func (KubernetesResourceStateEvent_Type) Type() protoreflect.EnumType { - return &file_pkg_model_application_live_state_proto_enumTypes[2] + return &file_pkg_model_application_live_state_proto_enumTypes[4] } func (x KubernetesResourceStateEvent_Type) Number() protoreflect.EnumNumber { @@ -176,7 +274,7 @@ func (x KubernetesResourceStateEvent_Type) Number() protoreflect.EnumNumber { // Deprecated: Use KubernetesResourceStateEvent_Type.Descriptor instead. func (KubernetesResourceStateEvent_Type) EnumDescriptor() ([]byte, []int) { - return file_pkg_model_application_live_state_proto_rawDescGZIP(), []int{8, 0} + return file_pkg_model_application_live_state_proto_rawDescGZIP(), []int{10, 0} } type CloudRunResourceState_HealthStatus int32 @@ -212,11 +310,11 @@ func (x CloudRunResourceState_HealthStatus) String() string { } func (CloudRunResourceState_HealthStatus) Descriptor() protoreflect.EnumDescriptor { - return file_pkg_model_application_live_state_proto_enumTypes[3].Descriptor() + return file_pkg_model_application_live_state_proto_enumTypes[5].Descriptor() } func (CloudRunResourceState_HealthStatus) Type() protoreflect.EnumType { - return &file_pkg_model_application_live_state_proto_enumTypes[3] + return &file_pkg_model_application_live_state_proto_enumTypes[5] } func (x CloudRunResourceState_HealthStatus) Number() protoreflect.EnumNumber { @@ -225,7 +323,7 @@ func (x CloudRunResourceState_HealthStatus) Number() protoreflect.EnumNumber { // Deprecated: Use CloudRunResourceState_HealthStatus.Descriptor instead. func (CloudRunResourceState_HealthStatus) EnumDescriptor() ([]byte, []int) { - return file_pkg_model_application_live_state_proto_rawDescGZIP(), []int{9, 0} + return file_pkg_model_application_live_state_proto_rawDescGZIP(), []int{11, 0} } type ECSResourceState_HealthStatus int32 @@ -261,11 +359,11 @@ func (x ECSResourceState_HealthStatus) String() string { } func (ECSResourceState_HealthStatus) Descriptor() protoreflect.EnumDescriptor { - return file_pkg_model_application_live_state_proto_enumTypes[4].Descriptor() + return file_pkg_model_application_live_state_proto_enumTypes[6].Descriptor() } func (ECSResourceState_HealthStatus) Type() protoreflect.EnumType { - return &file_pkg_model_application_live_state_proto_enumTypes[4] + return &file_pkg_model_application_live_state_proto_enumTypes[6] } func (x ECSResourceState_HealthStatus) Number() protoreflect.EnumNumber { @@ -274,7 +372,7 @@ func (x ECSResourceState_HealthStatus) Number() protoreflect.EnumNumber { // Deprecated: Use ECSResourceState_HealthStatus.Descriptor instead. func (ECSResourceState_HealthStatus) EnumDescriptor() ([]byte, []int) { - return file_pkg_model_application_live_state_proto_rawDescGZIP(), []int{10, 0} + return file_pkg_model_application_live_state_proto_rawDescGZIP(), []int{12, 0} } type LambdaResourceState_HealthStatus int32 @@ -310,11 +408,11 @@ func (x LambdaResourceState_HealthStatus) String() string { } func (LambdaResourceState_HealthStatus) Descriptor() protoreflect.EnumDescriptor { - return file_pkg_model_application_live_state_proto_enumTypes[5].Descriptor() + return file_pkg_model_application_live_state_proto_enumTypes[7].Descriptor() } func (LambdaResourceState_HealthStatus) Type() protoreflect.EnumType { - return &file_pkg_model_application_live_state_proto_enumTypes[5] + return &file_pkg_model_application_live_state_proto_enumTypes[7] } func (x LambdaResourceState_HealthStatus) Number() protoreflect.EnumNumber { @@ -323,7 +421,7 @@ func (x LambdaResourceState_HealthStatus) Number() protoreflect.EnumNumber { // Deprecated: Use LambdaResourceState_HealthStatus.Descriptor instead. func (LambdaResourceState_HealthStatus) EnumDescriptor() ([]byte, []int) { - return file_pkg_model_application_live_state_proto_rawDescGZIP(), []int{11, 0} + return file_pkg_model_application_live_state_proto_rawDescGZIP(), []int{13, 0} } // ApplicationLiveStateSnapshot represents the full live state information of an application @@ -333,17 +431,18 @@ type ApplicationLiveStateSnapshot struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ApplicationId string `protobuf:"bytes,1,opt,name=application_id,json=applicationId,proto3" json:"application_id,omitempty"` - PipedId string `protobuf:"bytes,3,opt,name=piped_id,json=pipedId,proto3" json:"piped_id,omitempty"` - ProjectId string `protobuf:"bytes,4,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` - Kind ApplicationKind `protobuf:"varint,5,opt,name=kind,proto3,enum=model.ApplicationKind" json:"kind,omitempty"` - HealthStatus ApplicationLiveStateSnapshot_Status `protobuf:"varint,6,opt,name=health_status,json=healthStatus,proto3,enum=model.ApplicationLiveStateSnapshot_Status" json:"health_status,omitempty"` - Kubernetes *KubernetesApplicationLiveState `protobuf:"bytes,10,opt,name=kubernetes,proto3" json:"kubernetes,omitempty"` - Terraform *TerraformApplicationLiveState `protobuf:"bytes,11,opt,name=terraform,proto3" json:"terraform,omitempty"` - Cloudrun *CloudRunApplicationLiveState `protobuf:"bytes,12,opt,name=cloudrun,proto3" json:"cloudrun,omitempty"` - Lambda *LambdaApplicationLiveState `protobuf:"bytes,13,opt,name=lambda,proto3" json:"lambda,omitempty"` - Ecs *ECSApplicationLiveState `protobuf:"bytes,14,opt,name=ecs,proto3" json:"ecs,omitempty"` - Version *ApplicationLiveStateVersion `protobuf:"bytes,15,opt,name=version,proto3" json:"version,omitempty"` + ApplicationId string `protobuf:"bytes,1,opt,name=application_id,json=applicationId,proto3" json:"application_id,omitempty"` + PipedId string `protobuf:"bytes,3,opt,name=piped_id,json=pipedId,proto3" json:"piped_id,omitempty"` + ProjectId string `protobuf:"bytes,4,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + Kind ApplicationKind `protobuf:"varint,5,opt,name=kind,proto3,enum=model.ApplicationKind" json:"kind,omitempty"` + HealthStatus ApplicationLiveStateSnapshot_Status `protobuf:"varint,6,opt,name=health_status,json=healthStatus,proto3,enum=model.ApplicationLiveStateSnapshot_Status" json:"health_status,omitempty"` + Kubernetes *KubernetesApplicationLiveState `protobuf:"bytes,10,opt,name=kubernetes,proto3" json:"kubernetes,omitempty"` + Terraform *TerraformApplicationLiveState `protobuf:"bytes,11,opt,name=terraform,proto3" json:"terraform,omitempty"` + Cloudrun *CloudRunApplicationLiveState `protobuf:"bytes,12,opt,name=cloudrun,proto3" json:"cloudrun,omitempty"` + Lambda *LambdaApplicationLiveState `protobuf:"bytes,13,opt,name=lambda,proto3" json:"lambda,omitempty"` + Ecs *ECSApplicationLiveState `protobuf:"bytes,14,opt,name=ecs,proto3" json:"ecs,omitempty"` + Version *ApplicationLiveStateVersion `protobuf:"bytes,15,opt,name=version,proto3" json:"version,omitempty"` + ApplicationLiveState *ApplicationLiveState `protobuf:"bytes,16,opt,name=application_live_state,json=applicationLiveState,proto3" json:"application_live_state,omitempty"` } func (x *ApplicationLiveStateSnapshot) Reset() { @@ -455,6 +554,13 @@ func (x *ApplicationLiveStateSnapshot) GetVersion() *ApplicationLiveStateVersion return nil } +func (x *ApplicationLiveStateSnapshot) GetApplicationLiveState() *ApplicationLiveState { + if x != nil { + return x.ApplicationLiveState + } + return nil +} + type ApplicationLiveStateVersion struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -738,6 +844,185 @@ func (x *LambdaApplicationLiveState) GetResources() []*LambdaResourceState { return nil } +type ApplicationLiveState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Resources []*ResourceState `protobuf:"bytes,1,rep,name=resources,proto3" json:"resources,omitempty"` + // The health status of the application. + HealthStatus ApplicationLiveState_Status `protobuf:"varint,2,opt,name=health_status,json=healthStatus,proto3,enum=model.ApplicationLiveState_Status" json:"health_status,omitempty"` +} + +func (x *ApplicationLiveState) Reset() { + *x = ApplicationLiveState{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_model_application_live_state_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ApplicationLiveState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ApplicationLiveState) ProtoMessage() {} + +func (x *ApplicationLiveState) ProtoReflect() protoreflect.Message { + mi := &file_pkg_model_application_live_state_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ApplicationLiveState.ProtoReflect.Descriptor instead. +func (*ApplicationLiveState) Descriptor() ([]byte, []int) { + return file_pkg_model_application_live_state_proto_rawDescGZIP(), []int{7} +} + +func (x *ApplicationLiveState) GetResources() []*ResourceState { + if x != nil { + return x.Resources + } + return nil +} + +func (x *ApplicationLiveState) GetHealthStatus() ApplicationLiveState_Status { + if x != nil { + return x.HealthStatus + } + return ApplicationLiveState_UNKNOWN +} + +// TODO: refine the actual state information +// Existing fields: api_version, kind, namespace +// Addtional fields: deploy_target +type ResourceState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The unique ID. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // The sorted list of unique IDs of the parents. + ParentIds []string `protobuf:"bytes,2,rep,name=parent_ids,json=parentIds,proto3" json:"parent_ids,omitempty"` + // The name of resource. + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + // The type of this resource. + ResourceType string `protobuf:"bytes,4,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"` + // The metadata of this resource. + ResourceMetadata map[string]string `protobuf:"bytes,5,rep,name=resource_metadata,json=resourceMetadata,proto3" json:"resource_metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // The health status of this resource. + HealthStatus ResourceState_HealthStatus `protobuf:"varint,6,opt,name=health_status,json=healthStatus,proto3,enum=model.ResourceState_HealthStatus" json:"health_status,omitempty"` + // The description of the health status. + HealthDescription string `protobuf:"bytes,7,opt,name=health_description,json=healthDescription,proto3" json:"health_description,omitempty"` + // The timestamp when this resource was created. + CreatedAt int64 `protobuf:"varint,10,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + // The timestamp of the last time when this resource was updated. + UpdatedAt int64 `protobuf:"varint,11,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` +} + +func (x *ResourceState) Reset() { + *x = ResourceState{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_model_application_live_state_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResourceState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourceState) ProtoMessage() {} + +func (x *ResourceState) ProtoReflect() protoreflect.Message { + mi := &file_pkg_model_application_live_state_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResourceState.ProtoReflect.Descriptor instead. +func (*ResourceState) Descriptor() ([]byte, []int) { + return file_pkg_model_application_live_state_proto_rawDescGZIP(), []int{8} +} + +func (x *ResourceState) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *ResourceState) GetParentIds() []string { + if x != nil { + return x.ParentIds + } + return nil +} + +func (x *ResourceState) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ResourceState) GetResourceType() string { + if x != nil { + return x.ResourceType + } + return "" +} + +func (x *ResourceState) GetResourceMetadata() map[string]string { + if x != nil { + return x.ResourceMetadata + } + return nil +} + +func (x *ResourceState) GetHealthStatus() ResourceState_HealthStatus { + if x != nil { + return x.HealthStatus + } + return ResourceState_UNKNOWN +} + +func (x *ResourceState) GetHealthDescription() string { + if x != nil { + return x.HealthDescription + } + return "" +} + +func (x *ResourceState) GetCreatedAt() int64 { + if x != nil { + return x.CreatedAt + } + return 0 +} + +func (x *ResourceState) GetUpdatedAt() int64 { + if x != nil { + return x.UpdatedAt + } + return 0 +} + // KubernetesResourceState represents the state of a single kubernetes resource object. type KubernetesResourceState struct { state protoimpl.MessageState @@ -771,7 +1056,7 @@ type KubernetesResourceState struct { func (x *KubernetesResourceState) Reset() { *x = KubernetesResourceState{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_model_application_live_state_proto_msgTypes[7] + mi := &file_pkg_model_application_live_state_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -784,7 +1069,7 @@ func (x *KubernetesResourceState) String() string { func (*KubernetesResourceState) ProtoMessage() {} func (x *KubernetesResourceState) ProtoReflect() protoreflect.Message { - mi := &file_pkg_model_application_live_state_proto_msgTypes[7] + mi := &file_pkg_model_application_live_state_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -797,7 +1082,7 @@ func (x *KubernetesResourceState) ProtoReflect() protoreflect.Message { // Deprecated: Use KubernetesResourceState.ProtoReflect.Descriptor instead. func (*KubernetesResourceState) Descriptor() ([]byte, []int) { - return file_pkg_model_application_live_state_proto_rawDescGZIP(), []int{7} + return file_pkg_model_application_live_state_proto_rawDescGZIP(), []int{9} } func (x *KubernetesResourceState) GetId() string { @@ -894,7 +1179,7 @@ type KubernetesResourceStateEvent struct { func (x *KubernetesResourceStateEvent) Reset() { *x = KubernetesResourceStateEvent{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_model_application_live_state_proto_msgTypes[8] + mi := &file_pkg_model_application_live_state_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -907,7 +1192,7 @@ func (x *KubernetesResourceStateEvent) String() string { func (*KubernetesResourceStateEvent) ProtoMessage() {} func (x *KubernetesResourceStateEvent) ProtoReflect() protoreflect.Message { - mi := &file_pkg_model_application_live_state_proto_msgTypes[8] + mi := &file_pkg_model_application_live_state_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -920,7 +1205,7 @@ func (x *KubernetesResourceStateEvent) ProtoReflect() protoreflect.Message { // Deprecated: Use KubernetesResourceStateEvent.ProtoReflect.Descriptor instead. func (*KubernetesResourceStateEvent) Descriptor() ([]byte, []int) { - return file_pkg_model_application_live_state_proto_rawDescGZIP(), []int{8} + return file_pkg_model_application_live_state_proto_rawDescGZIP(), []int{10} } func (x *KubernetesResourceStateEvent) GetId() string { @@ -998,7 +1283,7 @@ type CloudRunResourceState struct { func (x *CloudRunResourceState) Reset() { *x = CloudRunResourceState{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_model_application_live_state_proto_msgTypes[9] + mi := &file_pkg_model_application_live_state_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1011,7 +1296,7 @@ func (x *CloudRunResourceState) String() string { func (*CloudRunResourceState) ProtoMessage() {} func (x *CloudRunResourceState) ProtoReflect() protoreflect.Message { - mi := &file_pkg_model_application_live_state_proto_msgTypes[9] + mi := &file_pkg_model_application_live_state_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1024,7 +1309,7 @@ func (x *CloudRunResourceState) ProtoReflect() protoreflect.Message { // Deprecated: Use CloudRunResourceState.ProtoReflect.Descriptor instead. func (*CloudRunResourceState) Descriptor() ([]byte, []int) { - return file_pkg_model_application_live_state_proto_rawDescGZIP(), []int{9} + return file_pkg_model_application_live_state_proto_rawDescGZIP(), []int{11} } func (x *CloudRunResourceState) GetId() string { @@ -1132,7 +1417,7 @@ type ECSResourceState struct { func (x *ECSResourceState) Reset() { *x = ECSResourceState{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_model_application_live_state_proto_msgTypes[10] + mi := &file_pkg_model_application_live_state_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1145,7 +1430,7 @@ func (x *ECSResourceState) String() string { func (*ECSResourceState) ProtoMessage() {} func (x *ECSResourceState) ProtoReflect() protoreflect.Message { - mi := &file_pkg_model_application_live_state_proto_msgTypes[10] + mi := &file_pkg_model_application_live_state_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1158,7 +1443,7 @@ func (x *ECSResourceState) ProtoReflect() protoreflect.Message { // Deprecated: Use ECSResourceState.ProtoReflect.Descriptor instead. func (*ECSResourceState) Descriptor() ([]byte, []int) { - return file_pkg_model_application_live_state_proto_rawDescGZIP(), []int{10} + return file_pkg_model_application_live_state_proto_rawDescGZIP(), []int{12} } func (x *ECSResourceState) GetId() string { @@ -1252,7 +1537,7 @@ type LambdaResourceState struct { func (x *LambdaResourceState) Reset() { *x = LambdaResourceState{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_model_application_live_state_proto_msgTypes[11] + mi := &file_pkg_model_application_live_state_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1265,7 +1550,7 @@ func (x *LambdaResourceState) String() string { func (*LambdaResourceState) ProtoMessage() {} func (x *LambdaResourceState) ProtoReflect() protoreflect.Message { - mi := &file_pkg_model_application_live_state_proto_msgTypes[11] + mi := &file_pkg_model_application_live_state_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1278,7 +1563,7 @@ func (x *LambdaResourceState) ProtoReflect() protoreflect.Message { // Deprecated: Use LambdaResourceState.ProtoReflect.Descriptor instead. func (*LambdaResourceState) Descriptor() ([]byte, []int) { - return file_pkg_model_application_live_state_proto_rawDescGZIP(), []int{11} + return file_pkg_model_application_live_state_proto_rawDescGZIP(), []int{13} } func (x *LambdaResourceState) GetId() string { @@ -1353,7 +1638,7 @@ var file_pkg_model_application_live_state_proto_rawDesc = []byte{ 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x70, 0x6b, 0x67, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0xd7, 0x05, 0x0a, 0x1c, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0xaa, 0x06, 0x0a, 0x1c, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x76, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x2e, 0x0a, 0x0e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, @@ -1395,187 +1680,239 @@ var file_pkg_model_application_live_state_proto_rawDesc = []byte{ 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x76, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x2d, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, - 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x59, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x4f, 0x54, 0x48, - 0x45, 0x52, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x22, 0x63, 0x0a, 0x1b, 0x41, 0x70, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x51, 0x0a, 0x16, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, + 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x76, 0x65, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x09, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x12, 0x1d, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x28, 0x00, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, - 0x5e, 0x0a, 0x1e, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x41, 0x70, 0x70, - 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x76, 0x65, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x12, 0x3c, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x4b, 0x75, 0x62, - 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, + 0x74, 0x65, 0x52, 0x14, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, + 0x69, 0x76, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x2d, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, + 0x0b, 0x0a, 0x07, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x59, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, + 0x4f, 0x54, 0x48, 0x45, 0x52, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x22, 0x63, 0x0a, + 0x1b, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x76, 0x65, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x09, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, + 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x12, 0x1d, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x28, 0x00, 0x52, 0x05, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x22, 0x5e, 0x0a, 0x1e, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, + 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x76, 0x65, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x3c, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, + 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x73, 0x22, 0x1f, 0x0a, 0x1d, 0x54, 0x65, 0x72, 0x72, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x41, + 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x76, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x22, 0x5a, 0x0a, 0x1c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x52, 0x75, 0x6e, 0x41, + 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x76, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x3a, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x43, + 0x6c, 0x6f, 0x75, 0x64, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, - 0x1f, 0x0a, 0x1d, 0x54, 0x65, 0x72, 0x72, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x41, 0x70, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x76, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x22, 0x5a, 0x0a, 0x1c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x52, 0x75, 0x6e, 0x41, 0x70, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x76, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x12, 0x3a, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x43, 0x6c, 0x6f, 0x75, - 0x64, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x50, 0x0a, 0x17, - 0x45, 0x43, 0x53, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, - 0x76, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x35, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6d, 0x6f, 0x64, - 0x65, 0x6c, 0x2e, 0x45, 0x43, 0x53, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x56, - 0x0a, 0x1a, 0x4c, 0x61, 0x6d, 0x62, 0x64, 0x61, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x76, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x38, 0x0a, 0x09, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x4c, 0x61, 0x6d, 0x62, 0x64, 0x61, 0x52, 0x65, + 0x50, 0x0a, 0x17, 0x45, 0x43, 0x53, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4c, 0x69, 0x76, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x35, 0x0a, 0x09, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x45, 0x43, 0x53, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x73, 0x22, 0x56, 0x0a, 0x1a, 0x4c, 0x61, 0x6d, 0x62, 0x64, 0x61, 0x41, 0x70, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x76, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x38, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x4c, 0x61, 0x6d, 0x62, 0x64, + 0x61, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x09, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0xc2, 0x01, 0x0a, 0x14, 0x41, 0x70, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x76, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x32, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x80, 0x04, 0x0a, 0x17, 0x4b, 0x75, 0x62, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x12, 0x17, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, - 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6f, - 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, - 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x65, - 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, - 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x73, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x0b, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, - 0x10, 0x01, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, - 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x5a, 0x0a, 0x0d, 0x68, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x2b, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, - 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4c, 0x69, 0x76, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, + 0x2d, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, + 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, + 0x59, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x10, 0x02, 0x22, 0xb1, + 0x04, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x12, 0x17, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, + 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x73, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x57, 0x0a, 0x11, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x50, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x6d, 0x6f, 0x64, + 0x65, 0x6c, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x61, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, + 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x26, 0x0a, 0x0a, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x64, 0x41, 0x74, 0x22, 0x33, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, - 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x59, 0x10, 0x01, 0x12, 0x09, - 0x0a, 0x05, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x10, 0x02, 0x22, 0x99, 0x03, 0x0a, 0x1c, 0x4b, 0x75, - 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x2e, 0x0a, 0x0e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, - 0x72, 0x02, 0x10, 0x01, 0x52, 0x0d, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x64, 0x12, 0x46, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x28, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, + 0x65, 0x64, 0x41, 0x74, 0x1a, 0x43, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x37, 0x0a, 0x0c, 0x48, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, + 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, + 0x59, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x55, 0x4e, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x59, + 0x10, 0x02, 0x22, 0x80, 0x04, 0x0a, 0x17, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x17, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, + 0x02, 0x10, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, + 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x77, 0x6e, 0x65, + 0x72, 0x49, 0x64, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, + 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x49, 0x64, 0x73, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x28, 0x0a, 0x0b, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, + 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x04, 0x6b, 0x69, + 0x6e, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, + 0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x5a, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x6d, + 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x48, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, + 0x02, 0x10, 0x01, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x68, + 0x65, 0x61, 0x6c, 0x74, 0x68, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x26, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0e, + 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x09, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x26, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, + 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, + 0x22, 0x33, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, + 0x07, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x59, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x4f, 0x54, + 0x48, 0x45, 0x52, 0x10, 0x02, 0x22, 0x99, 0x03, 0x0a, 0x1c, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x3e, 0x0a, 0x05, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x6f, 0x64, - 0x65, 0x6c, 0x2e, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, - 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x57, 0x0a, 0x10, 0x73, - 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x41, 0x70, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x76, 0x65, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x0f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x61, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, - 0x00, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x27, 0x0a, 0x04, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x44, 0x44, 0x5f, 0x4f, 0x52, 0x5f, 0x55, - 0x50, 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x4c, 0x45, - 0x54, 0x45, 0x44, 0x10, 0x02, 0x22, 0xfc, 0x03, 0x0a, 0x15, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x52, - 0x75, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, - 0x17, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, - 0x72, 0x02, 0x10, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x77, 0x6e, 0x65, - 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x77, 0x6e, - 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, - 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, - 0x74, 0x49, 0x64, 0x73, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x28, 0x0a, 0x0b, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, - 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x04, 0x6b, - 0x69, 0x6e, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, - 0x10, 0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, - 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x52, 0x75, 0x6e, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, - 0x10, 0x01, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x2d, 0x0a, 0x12, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x68, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x26, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0e, 0x20, - 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x09, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x26, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, - 0x22, 0x02, 0x20, 0x00, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, - 0x33, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, - 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x59, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x4f, 0x54, 0x48, - 0x45, 0x52, 0x10, 0x02, 0x22, 0xaa, 0x03, 0x0a, 0x10, 0x45, 0x43, 0x53, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x17, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, - 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x73, 0x12, 0x1b, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x6b, - 0x69, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, - 0x10, 0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x53, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x24, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x45, 0x43, 0x53, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, - 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2d, 0x0a, - 0x12, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x68, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0a, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, - 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x41, 0x74, 0x12, 0x26, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, - 0x00, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x33, 0x0a, 0x0c, - 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, - 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x45, 0x41, - 0x4c, 0x54, 0x48, 0x59, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x10, - 0x02, 0x22, 0x9e, 0x03, 0x0a, 0x13, 0x4c, 0x61, 0x6d, 0x62, 0x64, 0x61, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x17, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, - 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x73, 0x12, 0x1b, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x6b, - 0x69, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, - 0x10, 0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x56, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x27, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x4c, 0x61, 0x6d, 0x62, 0x64, 0x61, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, - 0x10, 0x01, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x2d, 0x0a, 0x12, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x68, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1d, - 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x33, 0x0a, - 0x0c, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, - 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x45, - 0x41, 0x4c, 0x54, 0x48, 0x59, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x4f, 0x54, 0x48, 0x45, 0x52, - 0x10, 0x02, 0x42, 0x25, 0x5a, 0x23, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x70, 0x69, 0x70, 0x65, 0x2d, 0x63, 0x64, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x63, 0x64, 0x2f, - 0x70, 0x6b, 0x67, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x2e, 0x0a, 0x0e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, + 0x52, 0x0d, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, + 0x46, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, + 0x01, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x3e, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x4b, + 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, + 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x57, 0x0a, 0x10, 0x73, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x22, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x76, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, + 0x0f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x26, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0f, + 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x09, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x27, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x44, 0x44, 0x5f, 0x4f, 0x52, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, + 0x02, 0x22, 0xfc, 0x03, 0x0a, 0x15, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x52, 0x75, 0x6e, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x17, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, + 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x73, + 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, + 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, + 0x0b, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x61, 0x70, 0x69, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, + 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x12, 0x58, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x6d, 0x6f, 0x64, 0x65, + 0x6c, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, + 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2d, 0x0a, 0x12, + 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0a, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x42, + 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x12, 0x26, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, + 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x33, 0x0a, 0x0c, 0x48, + 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, + 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x45, 0x41, 0x4c, + 0x54, 0x48, 0x59, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x10, 0x02, + 0x22, 0xaa, 0x03, 0x0a, 0x10, 0x45, 0x43, 0x53, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x17, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, + 0x0a, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x73, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, + 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, + 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x53, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x6d, 0x6f, + 0x64, 0x65, 0x6c, 0x2e, 0x45, 0x43, 0x53, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x68, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x68, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x44, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, + 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, + 0x12, 0x26, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x09, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x33, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x6c, + 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, + 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x59, + 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x10, 0x02, 0x22, 0x9e, 0x03, + 0x0a, 0x13, 0x4c, 0x61, 0x6d, 0x62, 0x64, 0x61, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x17, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, + 0x0a, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x73, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, + 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, + 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x56, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x6d, 0x6f, + 0x64, 0x65, 0x6c, 0x2e, 0x4c, 0x61, 0x6d, 0x62, 0x64, 0x61, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, + 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2d, 0x0a, 0x12, + 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x33, 0x0a, 0x0c, 0x48, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, + 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, + 0x59, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x10, 0x02, 0x42, 0x25, + 0x5a, 0x23, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x69, 0x70, + 0x65, 0x2d, 0x63, 0x64, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x63, 0x64, 0x2f, 0x70, 0x6b, 0x67, 0x2f, + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1590,54 +1927,64 @@ func file_pkg_model_application_live_state_proto_rawDescGZIP() []byte { return file_pkg_model_application_live_state_proto_rawDescData } -var file_pkg_model_application_live_state_proto_enumTypes = make([]protoimpl.EnumInfo, 6) -var file_pkg_model_application_live_state_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_pkg_model_application_live_state_proto_enumTypes = make([]protoimpl.EnumInfo, 8) +var file_pkg_model_application_live_state_proto_msgTypes = make([]protoimpl.MessageInfo, 15) var file_pkg_model_application_live_state_proto_goTypes = []interface{}{ (ApplicationLiveStateSnapshot_Status)(0), // 0: model.ApplicationLiveStateSnapshot.Status - (KubernetesResourceState_HealthStatus)(0), // 1: model.KubernetesResourceState.HealthStatus - (KubernetesResourceStateEvent_Type)(0), // 2: model.KubernetesResourceStateEvent.Type - (CloudRunResourceState_HealthStatus)(0), // 3: model.CloudRunResourceState.HealthStatus - (ECSResourceState_HealthStatus)(0), // 4: model.ECSResourceState.HealthStatus - (LambdaResourceState_HealthStatus)(0), // 5: model.LambdaResourceState.HealthStatus - (*ApplicationLiveStateSnapshot)(nil), // 6: model.ApplicationLiveStateSnapshot - (*ApplicationLiveStateVersion)(nil), // 7: model.ApplicationLiveStateVersion - (*KubernetesApplicationLiveState)(nil), // 8: model.KubernetesApplicationLiveState - (*TerraformApplicationLiveState)(nil), // 9: model.TerraformApplicationLiveState - (*CloudRunApplicationLiveState)(nil), // 10: model.CloudRunApplicationLiveState - (*ECSApplicationLiveState)(nil), // 11: model.ECSApplicationLiveState - (*LambdaApplicationLiveState)(nil), // 12: model.LambdaApplicationLiveState - (*KubernetesResourceState)(nil), // 13: model.KubernetesResourceState - (*KubernetesResourceStateEvent)(nil), // 14: model.KubernetesResourceStateEvent - (*CloudRunResourceState)(nil), // 15: model.CloudRunResourceState - (*ECSResourceState)(nil), // 16: model.ECSResourceState - (*LambdaResourceState)(nil), // 17: model.LambdaResourceState - (ApplicationKind)(0), // 18: model.ApplicationKind + (ApplicationLiveState_Status)(0), // 1: model.ApplicationLiveState.Status + (ResourceState_HealthStatus)(0), // 2: model.ResourceState.HealthStatus + (KubernetesResourceState_HealthStatus)(0), // 3: model.KubernetesResourceState.HealthStatus + (KubernetesResourceStateEvent_Type)(0), // 4: model.KubernetesResourceStateEvent.Type + (CloudRunResourceState_HealthStatus)(0), // 5: model.CloudRunResourceState.HealthStatus + (ECSResourceState_HealthStatus)(0), // 6: model.ECSResourceState.HealthStatus + (LambdaResourceState_HealthStatus)(0), // 7: model.LambdaResourceState.HealthStatus + (*ApplicationLiveStateSnapshot)(nil), // 8: model.ApplicationLiveStateSnapshot + (*ApplicationLiveStateVersion)(nil), // 9: model.ApplicationLiveStateVersion + (*KubernetesApplicationLiveState)(nil), // 10: model.KubernetesApplicationLiveState + (*TerraformApplicationLiveState)(nil), // 11: model.TerraformApplicationLiveState + (*CloudRunApplicationLiveState)(nil), // 12: model.CloudRunApplicationLiveState + (*ECSApplicationLiveState)(nil), // 13: model.ECSApplicationLiveState + (*LambdaApplicationLiveState)(nil), // 14: model.LambdaApplicationLiveState + (*ApplicationLiveState)(nil), // 15: model.ApplicationLiveState + (*ResourceState)(nil), // 16: model.ResourceState + (*KubernetesResourceState)(nil), // 17: model.KubernetesResourceState + (*KubernetesResourceStateEvent)(nil), // 18: model.KubernetesResourceStateEvent + (*CloudRunResourceState)(nil), // 19: model.CloudRunResourceState + (*ECSResourceState)(nil), // 20: model.ECSResourceState + (*LambdaResourceState)(nil), // 21: model.LambdaResourceState + nil, // 22: model.ResourceState.ResourceMetadataEntry + (ApplicationKind)(0), // 23: model.ApplicationKind } var file_pkg_model_application_live_state_proto_depIdxs = []int32{ - 18, // 0: model.ApplicationLiveStateSnapshot.kind:type_name -> model.ApplicationKind + 23, // 0: model.ApplicationLiveStateSnapshot.kind:type_name -> model.ApplicationKind 0, // 1: model.ApplicationLiveStateSnapshot.health_status:type_name -> model.ApplicationLiveStateSnapshot.Status - 8, // 2: model.ApplicationLiveStateSnapshot.kubernetes:type_name -> model.KubernetesApplicationLiveState - 9, // 3: model.ApplicationLiveStateSnapshot.terraform:type_name -> model.TerraformApplicationLiveState - 10, // 4: model.ApplicationLiveStateSnapshot.cloudrun:type_name -> model.CloudRunApplicationLiveState - 12, // 5: model.ApplicationLiveStateSnapshot.lambda:type_name -> model.LambdaApplicationLiveState - 11, // 6: model.ApplicationLiveStateSnapshot.ecs:type_name -> model.ECSApplicationLiveState - 7, // 7: model.ApplicationLiveStateSnapshot.version:type_name -> model.ApplicationLiveStateVersion - 13, // 8: model.KubernetesApplicationLiveState.resources:type_name -> model.KubernetesResourceState - 15, // 9: model.CloudRunApplicationLiveState.resources:type_name -> model.CloudRunResourceState - 16, // 10: model.ECSApplicationLiveState.resources:type_name -> model.ECSResourceState - 17, // 11: model.LambdaApplicationLiveState.resources:type_name -> model.LambdaResourceState - 1, // 12: model.KubernetesResourceState.health_status:type_name -> model.KubernetesResourceState.HealthStatus - 2, // 13: model.KubernetesResourceStateEvent.type:type_name -> model.KubernetesResourceStateEvent.Type - 13, // 14: model.KubernetesResourceStateEvent.state:type_name -> model.KubernetesResourceState - 7, // 15: model.KubernetesResourceStateEvent.snapshot_version:type_name -> model.ApplicationLiveStateVersion - 3, // 16: model.CloudRunResourceState.health_status:type_name -> model.CloudRunResourceState.HealthStatus - 4, // 17: model.ECSResourceState.health_status:type_name -> model.ECSResourceState.HealthStatus - 5, // 18: model.LambdaResourceState.health_status:type_name -> model.LambdaResourceState.HealthStatus - 19, // [19:19] is the sub-list for method output_type - 19, // [19:19] is the sub-list for method input_type - 19, // [19:19] is the sub-list for extension type_name - 19, // [19:19] is the sub-list for extension extendee - 0, // [0:19] is the sub-list for field type_name + 10, // 2: model.ApplicationLiveStateSnapshot.kubernetes:type_name -> model.KubernetesApplicationLiveState + 11, // 3: model.ApplicationLiveStateSnapshot.terraform:type_name -> model.TerraformApplicationLiveState + 12, // 4: model.ApplicationLiveStateSnapshot.cloudrun:type_name -> model.CloudRunApplicationLiveState + 14, // 5: model.ApplicationLiveStateSnapshot.lambda:type_name -> model.LambdaApplicationLiveState + 13, // 6: model.ApplicationLiveStateSnapshot.ecs:type_name -> model.ECSApplicationLiveState + 9, // 7: model.ApplicationLiveStateSnapshot.version:type_name -> model.ApplicationLiveStateVersion + 15, // 8: model.ApplicationLiveStateSnapshot.application_live_state:type_name -> model.ApplicationLiveState + 17, // 9: model.KubernetesApplicationLiveState.resources:type_name -> model.KubernetesResourceState + 19, // 10: model.CloudRunApplicationLiveState.resources:type_name -> model.CloudRunResourceState + 20, // 11: model.ECSApplicationLiveState.resources:type_name -> model.ECSResourceState + 21, // 12: model.LambdaApplicationLiveState.resources:type_name -> model.LambdaResourceState + 16, // 13: model.ApplicationLiveState.resources:type_name -> model.ResourceState + 1, // 14: model.ApplicationLiveState.health_status:type_name -> model.ApplicationLiveState.Status + 22, // 15: model.ResourceState.resource_metadata:type_name -> model.ResourceState.ResourceMetadataEntry + 2, // 16: model.ResourceState.health_status:type_name -> model.ResourceState.HealthStatus + 3, // 17: model.KubernetesResourceState.health_status:type_name -> model.KubernetesResourceState.HealthStatus + 4, // 18: model.KubernetesResourceStateEvent.type:type_name -> model.KubernetesResourceStateEvent.Type + 17, // 19: model.KubernetesResourceStateEvent.state:type_name -> model.KubernetesResourceState + 9, // 20: model.KubernetesResourceStateEvent.snapshot_version:type_name -> model.ApplicationLiveStateVersion + 5, // 21: model.CloudRunResourceState.health_status:type_name -> model.CloudRunResourceState.HealthStatus + 6, // 22: model.ECSResourceState.health_status:type_name -> model.ECSResourceState.HealthStatus + 7, // 23: model.LambdaResourceState.health_status:type_name -> model.LambdaResourceState.HealthStatus + 24, // [24:24] is the sub-list for method output_type + 24, // [24:24] is the sub-list for method input_type + 24, // [24:24] is the sub-list for extension type_name + 24, // [24:24] is the sub-list for extension extendee + 0, // [0:24] is the sub-list for field type_name } func init() { file_pkg_model_application_live_state_proto_init() } @@ -1732,7 +2079,7 @@ func file_pkg_model_application_live_state_proto_init() { } } file_pkg_model_application_live_state_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KubernetesResourceState); i { + switch v := v.(*ApplicationLiveState); i { case 0: return &v.state case 1: @@ -1744,7 +2091,7 @@ func file_pkg_model_application_live_state_proto_init() { } } file_pkg_model_application_live_state_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KubernetesResourceStateEvent); i { + switch v := v.(*ResourceState); i { case 0: return &v.state case 1: @@ -1756,7 +2103,7 @@ func file_pkg_model_application_live_state_proto_init() { } } file_pkg_model_application_live_state_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CloudRunResourceState); i { + switch v := v.(*KubernetesResourceState); i { case 0: return &v.state case 1: @@ -1768,7 +2115,7 @@ func file_pkg_model_application_live_state_proto_init() { } } file_pkg_model_application_live_state_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ECSResourceState); i { + switch v := v.(*KubernetesResourceStateEvent); i { case 0: return &v.state case 1: @@ -1780,6 +2127,30 @@ func file_pkg_model_application_live_state_proto_init() { } } file_pkg_model_application_live_state_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CloudRunResourceState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_model_application_live_state_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ECSResourceState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_model_application_live_state_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LambdaResourceState); i { case 0: return &v.state @@ -1797,8 +2168,8 @@ func file_pkg_model_application_live_state_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pkg_model_application_live_state_proto_rawDesc, - NumEnums: 6, - NumMessages: 12, + NumEnums: 8, + NumMessages: 15, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/model/application_live_state.pb.validate.go b/pkg/model/application_live_state.pb.validate.go index 571b8937fb..1592be4632 100644 --- a/pkg/model/application_live_state.pb.validate.go +++ b/pkg/model/application_live_state.pb.validate.go @@ -288,6 +288,35 @@ func (m *ApplicationLiveStateSnapshot) validate(all bool) error { } } + if all { + switch v := interface{}(m.GetApplicationLiveState()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ApplicationLiveStateSnapshotValidationError{ + field: "ApplicationLiveState", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ApplicationLiveStateSnapshotValidationError{ + field: "ApplicationLiveState", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetApplicationLiveState()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ApplicationLiveStateSnapshotValidationError{ + field: "ApplicationLiveState", + reason: "embedded message failed validation", + cause: err, + } + } + } + if len(errors) > 0 { return ApplicationLiveStateSnapshotMultiError(errors) } @@ -1143,6 +1172,305 @@ var _ interface { ErrorName() string } = LambdaApplicationLiveStateValidationError{} +// Validate checks the field values on ApplicationLiveState with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ApplicationLiveState) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ApplicationLiveState with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ApplicationLiveStateMultiError, or nil if none found. +func (m *ApplicationLiveState) ValidateAll() error { + return m.validate(true) +} + +func (m *ApplicationLiveState) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetResources() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ApplicationLiveStateValidationError{ + field: fmt.Sprintf("Resources[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ApplicationLiveStateValidationError{ + field: fmt.Sprintf("Resources[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ApplicationLiveStateValidationError{ + field: fmt.Sprintf("Resources[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + // no validation rules for HealthStatus + + if len(errors) > 0 { + return ApplicationLiveStateMultiError(errors) + } + + return nil +} + +// ApplicationLiveStateMultiError is an error wrapping multiple validation +// errors returned by ApplicationLiveState.ValidateAll() if the designated +// constraints aren't met. +type ApplicationLiveStateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ApplicationLiveStateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ApplicationLiveStateMultiError) AllErrors() []error { return m } + +// ApplicationLiveStateValidationError is the validation error returned by +// ApplicationLiveState.Validate if the designated constraints aren't met. +type ApplicationLiveStateValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ApplicationLiveStateValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ApplicationLiveStateValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ApplicationLiveStateValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ApplicationLiveStateValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ApplicationLiveStateValidationError) ErrorName() string { + return "ApplicationLiveStateValidationError" +} + +// Error satisfies the builtin error interface +func (e ApplicationLiveStateValidationError) 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 %sApplicationLiveState.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ApplicationLiveStateValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ApplicationLiveStateValidationError{} + +// Validate checks the field values on ResourceState with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *ResourceState) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ResourceState with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ResourceStateMultiError, or +// nil if none found. +func (m *ResourceState) ValidateAll() error { + return m.validate(true) +} + +func (m *ResourceState) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetId()) < 1 { + err := ResourceStateValidationError{ + field: "Id", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if utf8.RuneCountInString(m.GetName()) < 1 { + err := ResourceStateValidationError{ + field: "Name", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for ResourceType + + // no validation rules for ResourceMetadata + + if _, ok := ResourceState_HealthStatus_name[int32(m.GetHealthStatus())]; !ok { + err := ResourceStateValidationError{ + field: "HealthStatus", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for HealthDescription + + if m.GetCreatedAt() <= 0 { + err := ResourceStateValidationError{ + field: "CreatedAt", + reason: "value must be greater than 0", + } + if !all { + return err + } + errors = append(errors, err) + } + + if m.GetUpdatedAt() <= 0 { + err := ResourceStateValidationError{ + field: "UpdatedAt", + reason: "value must be greater than 0", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return ResourceStateMultiError(errors) + } + + return nil +} + +// ResourceStateMultiError is an error wrapping multiple validation errors +// returned by ResourceState.ValidateAll() if the designated constraints +// aren't met. +type ResourceStateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ResourceStateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ResourceStateMultiError) AllErrors() []error { return m } + +// ResourceStateValidationError is the validation error returned by +// ResourceState.Validate if the designated constraints aren't met. +type ResourceStateValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ResourceStateValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ResourceStateValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ResourceStateValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ResourceStateValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ResourceStateValidationError) ErrorName() string { return "ResourceStateValidationError" } + +// Error satisfies the builtin error interface +func (e ResourceStateValidationError) 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 %sResourceState.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ResourceStateValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ResourceStateValidationError{} + // Validate checks the field values on KubernetesResourceState with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. diff --git a/pkg/plugin/api/v1alpha1/livestate/api.pb.go b/pkg/plugin/api/v1alpha1/livestate/api.pb.go new file mode 100644 index 0000000000..0ec5e9eb8a --- /dev/null +++ b/pkg/plugin/api/v1alpha1/livestate/api.pb.go @@ -0,0 +1,263 @@ +// Copyright 2024 The PipeCD Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.21.12 +// source: pkg/plugin/api/v1alpha1/livestate/api.proto + +package livestate + +import ( + model "github.com/pipe-cd/pipecd/pkg/model" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetLivestateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApplicationId string `protobuf:"bytes,1,opt,name=application_id,json=applicationId,proto3" json:"application_id,omitempty"` +} + +func (x *GetLivestateRequest) Reset() { + *x = GetLivestateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_plugin_api_v1alpha1_livestate_api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetLivestateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetLivestateRequest) ProtoMessage() {} + +func (x *GetLivestateRequest) ProtoReflect() protoreflect.Message { + mi := &file_pkg_plugin_api_v1alpha1_livestate_api_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetLivestateRequest.ProtoReflect.Descriptor instead. +func (*GetLivestateRequest) Descriptor() ([]byte, []int) { + return file_pkg_plugin_api_v1alpha1_livestate_api_proto_rawDescGZIP(), []int{0} +} + +func (x *GetLivestateRequest) GetApplicationId() string { + if x != nil { + return x.ApplicationId + } + return "" +} + +type GetLivestateResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApplicationLiveState *model.ApplicationLiveState `protobuf:"bytes,1,opt,name=application_live_state,json=applicationLiveState,proto3" json:"application_live_state,omitempty"` + SyncState *model.ApplicationSyncState `protobuf:"bytes,2,opt,name=sync_state,json=syncState,proto3" json:"sync_state,omitempty"` +} + +func (x *GetLivestateResponse) Reset() { + *x = GetLivestateResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_plugin_api_v1alpha1_livestate_api_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetLivestateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetLivestateResponse) ProtoMessage() {} + +func (x *GetLivestateResponse) ProtoReflect() protoreflect.Message { + mi := &file_pkg_plugin_api_v1alpha1_livestate_api_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetLivestateResponse.ProtoReflect.Descriptor instead. +func (*GetLivestateResponse) Descriptor() ([]byte, []int) { + return file_pkg_plugin_api_v1alpha1_livestate_api_proto_rawDescGZIP(), []int{1} +} + +func (x *GetLivestateResponse) GetApplicationLiveState() *model.ApplicationLiveState { + if x != nil { + return x.ApplicationLiveState + } + return nil +} + +func (x *GetLivestateResponse) GetSyncState() *model.ApplicationSyncState { + if x != nil { + return x.SyncState + } + return nil +} + +var File_pkg_plugin_api_v1alpha1_livestate_api_proto protoreflect.FileDescriptor + +var file_pkg_plugin_api_v1alpha1_livestate_api_proto_rawDesc = []byte{ + 0x0a, 0x2b, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6c, 0x69, 0x76, 0x65, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x67, + 0x72, 0x70, 0x63, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x1a, 0x26, 0x70, 0x6b, 0x67, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x61, 0x70, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x70, 0x6b, 0x67, 0x2f, 0x6d, 0x6f, + 0x64, 0x65, 0x6c, 0x2f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3c, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x76, 0x65, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0e, + 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x64, 0x22, 0xa5, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x76, 0x65, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x16, + 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x69, 0x76, 0x65, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6d, + 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4c, 0x69, 0x76, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x14, 0x61, 0x70, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x76, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x3a, 0x0a, 0x0a, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x41, 0x70, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x52, 0x09, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x65, 0x32, 0x96, 0x01, 0x0a, 0x10, + 0x4c, 0x69, 0x76, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x81, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x76, 0x65, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x36, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, + 0x6c, 0x69, 0x76, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x76, 0x65, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x67, 0x72, 0x70, 0x63, + 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x4c, 0x69, 0x76, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x42, 0x3d, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x2d, 0x63, 0x64, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x63, + 0x64, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6c, 0x69, 0x76, 0x65, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_pkg_plugin_api_v1alpha1_livestate_api_proto_rawDescOnce sync.Once + file_pkg_plugin_api_v1alpha1_livestate_api_proto_rawDescData = file_pkg_plugin_api_v1alpha1_livestate_api_proto_rawDesc +) + +func file_pkg_plugin_api_v1alpha1_livestate_api_proto_rawDescGZIP() []byte { + file_pkg_plugin_api_v1alpha1_livestate_api_proto_rawDescOnce.Do(func() { + file_pkg_plugin_api_v1alpha1_livestate_api_proto_rawDescData = protoimpl.X.CompressGZIP(file_pkg_plugin_api_v1alpha1_livestate_api_proto_rawDescData) + }) + return file_pkg_plugin_api_v1alpha1_livestate_api_proto_rawDescData +} + +var file_pkg_plugin_api_v1alpha1_livestate_api_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_pkg_plugin_api_v1alpha1_livestate_api_proto_goTypes = []interface{}{ + (*GetLivestateRequest)(nil), // 0: grpc.plugin.livestateapi.v1alpha1.GetLivestateRequest + (*GetLivestateResponse)(nil), // 1: grpc.plugin.livestateapi.v1alpha1.GetLivestateResponse + (*model.ApplicationLiveState)(nil), // 2: model.ApplicationLiveState + (*model.ApplicationSyncState)(nil), // 3: model.ApplicationSyncState +} +var file_pkg_plugin_api_v1alpha1_livestate_api_proto_depIdxs = []int32{ + 2, // 0: grpc.plugin.livestateapi.v1alpha1.GetLivestateResponse.application_live_state:type_name -> model.ApplicationLiveState + 3, // 1: grpc.plugin.livestateapi.v1alpha1.GetLivestateResponse.sync_state:type_name -> model.ApplicationSyncState + 0, // 2: grpc.plugin.livestateapi.v1alpha1.LivestateService.GetLivestate:input_type -> grpc.plugin.livestateapi.v1alpha1.GetLivestateRequest + 1, // 3: grpc.plugin.livestateapi.v1alpha1.LivestateService.GetLivestate:output_type -> grpc.plugin.livestateapi.v1alpha1.GetLivestateResponse + 3, // [3:4] is the sub-list for method output_type + 2, // [2:3] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_pkg_plugin_api_v1alpha1_livestate_api_proto_init() } +func file_pkg_plugin_api_v1alpha1_livestate_api_proto_init() { + if File_pkg_plugin_api_v1alpha1_livestate_api_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_pkg_plugin_api_v1alpha1_livestate_api_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetLivestateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_plugin_api_v1alpha1_livestate_api_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetLivestateResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_pkg_plugin_api_v1alpha1_livestate_api_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_pkg_plugin_api_v1alpha1_livestate_api_proto_goTypes, + DependencyIndexes: file_pkg_plugin_api_v1alpha1_livestate_api_proto_depIdxs, + MessageInfos: file_pkg_plugin_api_v1alpha1_livestate_api_proto_msgTypes, + }.Build() + File_pkg_plugin_api_v1alpha1_livestate_api_proto = out.File + file_pkg_plugin_api_v1alpha1_livestate_api_proto_rawDesc = nil + file_pkg_plugin_api_v1alpha1_livestate_api_proto_goTypes = nil + file_pkg_plugin_api_v1alpha1_livestate_api_proto_depIdxs = nil +} diff --git a/pkg/plugin/api/v1alpha1/livestate/api.pb.validate.go b/pkg/plugin/api/v1alpha1/livestate/api.pb.validate.go new file mode 100644 index 0000000000..5408dc079d --- /dev/null +++ b/pkg/plugin/api/v1alpha1/livestate/api.pb.validate.go @@ -0,0 +1,300 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: pkg/plugin/api/v1alpha1/livestate/api.proto + +package livestate + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on GetLivestateRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *GetLivestateRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GetLivestateRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// GetLivestateRequestMultiError, or nil if none found. +func (m *GetLivestateRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *GetLivestateRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for ApplicationId + + if len(errors) > 0 { + return GetLivestateRequestMultiError(errors) + } + + return nil +} + +// GetLivestateRequestMultiError is an error wrapping multiple validation +// errors returned by GetLivestateRequest.ValidateAll() if the designated +// constraints aren't met. +type GetLivestateRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GetLivestateRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GetLivestateRequestMultiError) AllErrors() []error { return m } + +// GetLivestateRequestValidationError is the validation error returned by +// GetLivestateRequest.Validate if the designated constraints aren't met. +type GetLivestateRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GetLivestateRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GetLivestateRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GetLivestateRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GetLivestateRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GetLivestateRequestValidationError) ErrorName() string { + return "GetLivestateRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e GetLivestateRequestValidationError) 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 %sGetLivestateRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GetLivestateRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GetLivestateRequestValidationError{} + +// Validate checks the field values on GetLivestateResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *GetLivestateResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GetLivestateResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// GetLivestateResponseMultiError, or nil if none found. +func (m *GetLivestateResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *GetLivestateResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetApplicationLiveState()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GetLivestateResponseValidationError{ + field: "ApplicationLiveState", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GetLivestateResponseValidationError{ + field: "ApplicationLiveState", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetApplicationLiveState()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GetLivestateResponseValidationError{ + field: "ApplicationLiveState", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetSyncState()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GetLivestateResponseValidationError{ + field: "SyncState", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GetLivestateResponseValidationError{ + field: "SyncState", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSyncState()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GetLivestateResponseValidationError{ + field: "SyncState", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return GetLivestateResponseMultiError(errors) + } + + return nil +} + +// GetLivestateResponseMultiError is an error wrapping multiple validation +// errors returned by GetLivestateResponse.ValidateAll() if the designated +// constraints aren't met. +type GetLivestateResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GetLivestateResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GetLivestateResponseMultiError) AllErrors() []error { return m } + +// GetLivestateResponseValidationError is the validation error returned by +// GetLivestateResponse.Validate if the designated constraints aren't met. +type GetLivestateResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GetLivestateResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GetLivestateResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GetLivestateResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GetLivestateResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GetLivestateResponseValidationError) ErrorName() string { + return "GetLivestateResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e GetLivestateResponseValidationError) 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 %sGetLivestateResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GetLivestateResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GetLivestateResponseValidationError{} diff --git a/pkg/plugin/api/v1alpha1/livestate/api_grpc.pb.go b/pkg/plugin/api/v1alpha1/livestate/api_grpc.pb.go new file mode 100644 index 0000000000..b724df262e --- /dev/null +++ b/pkg/plugin/api/v1alpha1/livestate/api_grpc.pb.go @@ -0,0 +1,107 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v3.21.12 +// source: pkg/plugin/api/v1alpha1/livestate/api.proto + +package livestate + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// LivestateServiceClient is the client API for LivestateService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type LivestateServiceClient interface { + // GetLivestate gets the application live state for the give app id. + GetLivestate(ctx context.Context, in *GetLivestateRequest, opts ...grpc.CallOption) (*GetLivestateResponse, error) +} + +type livestateServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewLivestateServiceClient(cc grpc.ClientConnInterface) LivestateServiceClient { + return &livestateServiceClient{cc} +} + +func (c *livestateServiceClient) GetLivestate(ctx context.Context, in *GetLivestateRequest, opts ...grpc.CallOption) (*GetLivestateResponse, error) { + out := new(GetLivestateResponse) + err := c.cc.Invoke(ctx, "/grpc.plugin.livestateapi.v1alpha1.LivestateService/GetLivestate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// LivestateServiceServer is the server API for LivestateService service. +// All implementations must embed UnimplementedLivestateServiceServer +// for forward compatibility +type LivestateServiceServer interface { + // GetLivestate gets the application live state for the give app id. + GetLivestate(context.Context, *GetLivestateRequest) (*GetLivestateResponse, error) + mustEmbedUnimplementedLivestateServiceServer() +} + +// UnimplementedLivestateServiceServer must be embedded to have forward compatible implementations. +type UnimplementedLivestateServiceServer struct { +} + +func (UnimplementedLivestateServiceServer) GetLivestate(context.Context, *GetLivestateRequest) (*GetLivestateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetLivestate not implemented") +} +func (UnimplementedLivestateServiceServer) mustEmbedUnimplementedLivestateServiceServer() {} + +// UnsafeLivestateServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to LivestateServiceServer will +// result in compilation errors. +type UnsafeLivestateServiceServer interface { + mustEmbedUnimplementedLivestateServiceServer() +} + +func RegisterLivestateServiceServer(s grpc.ServiceRegistrar, srv LivestateServiceServer) { + s.RegisterService(&LivestateService_ServiceDesc, srv) +} + +func _LivestateService_GetLivestate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetLivestateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LivestateServiceServer).GetLivestate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.plugin.livestateapi.v1alpha1.LivestateService/GetLivestate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LivestateServiceServer).GetLivestate(ctx, req.(*GetLivestateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// LivestateService_ServiceDesc is the grpc.ServiceDesc for LivestateService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var LivestateService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "grpc.plugin.livestateapi.v1alpha1.LivestateService", + HandlerType: (*LivestateServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetLivestate", + Handler: _LivestateService_GetLivestate_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "pkg/plugin/api/v1alpha1/livestate/api.proto", +} diff --git a/tool/codegen/codegen.sh b/tool/codegen/codegen.sh index 8f30860e33..d5eed2aef5 100755 --- a/tool/codegen/codegen.sh +++ b/tool/codegen/codegen.sh @@ -20,6 +20,7 @@ goProtoDirs=( "pkg/app/server/service/webservice" "pkg/app/helloworld/service" "pkg/plugin/api/v1alpha1/deployment" + "pkg/plugin/api/v1alpha1/livestate" "pkg/app/pipedv1/cmd/piped/service" ) diff --git a/web/model/application_live_state_pb.d.ts b/web/model/application_live_state_pb.d.ts index e9fc1346c6..528d713e9c 100644 --- a/web/model/application_live_state_pb.d.ts +++ b/web/model/application_live_state_pb.d.ts @@ -50,6 +50,11 @@ export class ApplicationLiveStateSnapshot extends jspb.Message { hasVersion(): boolean; clearVersion(): ApplicationLiveStateSnapshot; + getApplicationLiveState(): ApplicationLiveState | undefined; + setApplicationLiveState(value?: ApplicationLiveState): ApplicationLiveStateSnapshot; + hasApplicationLiveState(): boolean; + clearApplicationLiveState(): ApplicationLiveStateSnapshot; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ApplicationLiveStateSnapshot.AsObject; static toObject(includeInstance: boolean, msg: ApplicationLiveStateSnapshot): ApplicationLiveStateSnapshot.AsObject; @@ -71,6 +76,7 @@ export namespace ApplicationLiveStateSnapshot { lambda?: LambdaApplicationLiveState.AsObject, ecs?: ECSApplicationLiveState.AsObject, version?: ApplicationLiveStateVersion.AsObject, + applicationLiveState?: ApplicationLiveState.AsObject, } export enum Status { @@ -196,6 +202,94 @@ export namespace LambdaApplicationLiveState { } } +export class ApplicationLiveState extends jspb.Message { + getResourcesList(): Array; + setResourcesList(value: Array): ApplicationLiveState; + clearResourcesList(): ApplicationLiveState; + addResources(value?: ResourceState, index?: number): ResourceState; + + getHealthStatus(): ApplicationLiveState.Status; + setHealthStatus(value: ApplicationLiveState.Status): ApplicationLiveState; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ApplicationLiveState.AsObject; + static toObject(includeInstance: boolean, msg: ApplicationLiveState): ApplicationLiveState.AsObject; + static serializeBinaryToWriter(message: ApplicationLiveState, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ApplicationLiveState; + static deserializeBinaryFromReader(message: ApplicationLiveState, reader: jspb.BinaryReader): ApplicationLiveState; +} + +export namespace ApplicationLiveState { + export type AsObject = { + resourcesList: Array, + healthStatus: ApplicationLiveState.Status, + } + + export enum Status { + UNKNOWN = 0, + HEALTHY = 1, + OTHER = 2, + } +} + +export class ResourceState extends jspb.Message { + getId(): string; + setId(value: string): ResourceState; + + getParentIdsList(): Array; + setParentIdsList(value: Array): ResourceState; + clearParentIdsList(): ResourceState; + addParentIds(value: string, index?: number): ResourceState; + + getName(): string; + setName(value: string): ResourceState; + + getResourceType(): string; + setResourceType(value: string): ResourceState; + + getResourceMetadataMap(): jspb.Map; + clearResourceMetadataMap(): ResourceState; + + getHealthStatus(): ResourceState.HealthStatus; + setHealthStatus(value: ResourceState.HealthStatus): ResourceState; + + getHealthDescription(): string; + setHealthDescription(value: string): ResourceState; + + getCreatedAt(): number; + setCreatedAt(value: number): ResourceState; + + getUpdatedAt(): number; + setUpdatedAt(value: number): ResourceState; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResourceState.AsObject; + static toObject(includeInstance: boolean, msg: ResourceState): ResourceState.AsObject; + static serializeBinaryToWriter(message: ResourceState, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResourceState; + static deserializeBinaryFromReader(message: ResourceState, reader: jspb.BinaryReader): ResourceState; +} + +export namespace ResourceState { + export type AsObject = { + id: string, + parentIdsList: Array, + name: string, + resourceType: string, + resourceMetadataMap: Array<[string, string]>, + healthStatus: ResourceState.HealthStatus, + healthDescription: string, + createdAt: number, + updatedAt: number, + } + + export enum HealthStatus { + UNKNOWN = 0, + HEALTHY = 1, + UNHEALTHY = 2, + } +} + export class KubernetesResourceState extends jspb.Message { getId(): string; setId(value: string): KubernetesResourceState; diff --git a/web/model/application_live_state_pb.js b/web/model/application_live_state_pb.js index b800bfde71..812520c37e 100644 --- a/web/model/application_live_state_pb.js +++ b/web/model/application_live_state_pb.js @@ -25,6 +25,8 @@ var global = var pkg_model_common_pb = require('pipecd/web/model/common_pb.js'); goog.object.extend(proto, pkg_model_common_pb); +goog.exportSymbol('proto.model.ApplicationLiveState', null, global); +goog.exportSymbol('proto.model.ApplicationLiveState.Status', null, global); goog.exportSymbol('proto.model.ApplicationLiveStateSnapshot', null, global); goog.exportSymbol('proto.model.ApplicationLiveStateSnapshot.Status', null, global); goog.exportSymbol('proto.model.ApplicationLiveStateVersion', null, global); @@ -42,6 +44,8 @@ goog.exportSymbol('proto.model.KubernetesResourceStateEvent.Type', null, global) goog.exportSymbol('proto.model.LambdaApplicationLiveState', null, global); goog.exportSymbol('proto.model.LambdaResourceState', null, global); goog.exportSymbol('proto.model.LambdaResourceState.HealthStatus', null, global); +goog.exportSymbol('proto.model.ResourceState', null, global); +goog.exportSymbol('proto.model.ResourceState.HealthStatus', null, global); goog.exportSymbol('proto.model.TerraformApplicationLiveState', null, global); /** * Generated by JsPbCodeGenerator. @@ -190,6 +194,48 @@ if (goog.DEBUG && !COMPILED) { */ proto.model.LambdaApplicationLiveState.displayName = 'proto.model.LambdaApplicationLiveState'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.model.ApplicationLiveState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.model.ApplicationLiveState.repeatedFields_, null); +}; +goog.inherits(proto.model.ApplicationLiveState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.model.ApplicationLiveState.displayName = 'proto.model.ApplicationLiveState'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.model.ResourceState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.model.ResourceState.repeatedFields_, null); +}; +goog.inherits(proto.model.ResourceState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.model.ResourceState.displayName = 'proto.model.ResourceState'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -337,7 +383,8 @@ proto.model.ApplicationLiveStateSnapshot.toObject = function(includeInstance, ms cloudrun: (f = msg.getCloudrun()) && proto.model.CloudRunApplicationLiveState.toObject(includeInstance, f), lambda: (f = msg.getLambda()) && proto.model.LambdaApplicationLiveState.toObject(includeInstance, f), ecs: (f = msg.getEcs()) && proto.model.ECSApplicationLiveState.toObject(includeInstance, f), - version: (f = msg.getVersion()) && proto.model.ApplicationLiveStateVersion.toObject(includeInstance, f) + version: (f = msg.getVersion()) && proto.model.ApplicationLiveStateVersion.toObject(includeInstance, f), + applicationLiveState: (f = msg.getApplicationLiveState()) && proto.model.ApplicationLiveState.toObject(includeInstance, f) }; if (includeInstance) { @@ -424,6 +471,11 @@ proto.model.ApplicationLiveStateSnapshot.deserializeBinaryFromReader = function( reader.readMessage(value,proto.model.ApplicationLiveStateVersion.deserializeBinaryFromReader); msg.setVersion(value); break; + case 16: + var value = new proto.model.ApplicationLiveState; + reader.readMessage(value,proto.model.ApplicationLiveState.deserializeBinaryFromReader); + msg.setApplicationLiveState(value); + break; default: reader.skipField(); break; @@ -536,6 +588,14 @@ proto.model.ApplicationLiveStateSnapshot.serializeBinaryToWriter = function(mess proto.model.ApplicationLiveStateVersion.serializeBinaryToWriter ); } + f = message.getApplicationLiveState(); + if (f != null) { + writer.writeMessage( + 16, + f, + proto.model.ApplicationLiveState.serializeBinaryToWriter + ); + } }; @@ -860,6 +920,43 @@ proto.model.ApplicationLiveStateSnapshot.prototype.hasVersion = function() { }; +/** + * optional ApplicationLiveState application_live_state = 16; + * @return {?proto.model.ApplicationLiveState} + */ +proto.model.ApplicationLiveStateSnapshot.prototype.getApplicationLiveState = function() { + return /** @type{?proto.model.ApplicationLiveState} */ ( + jspb.Message.getWrapperField(this, proto.model.ApplicationLiveState, 16)); +}; + + +/** + * @param {?proto.model.ApplicationLiveState|undefined} value + * @return {!proto.model.ApplicationLiveStateSnapshot} returns this +*/ +proto.model.ApplicationLiveStateSnapshot.prototype.setApplicationLiveState = function(value) { + return jspb.Message.setWrapperField(this, 16, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.model.ApplicationLiveStateSnapshot} returns this + */ +proto.model.ApplicationLiveStateSnapshot.prototype.clearApplicationLiveState = function() { + return this.setApplicationLiveState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.model.ApplicationLiveStateSnapshot.prototype.hasApplicationLiveState = function() { + return jspb.Message.getField(this, 16) != null; +}; + + @@ -1762,6 +1859,614 @@ proto.model.LambdaApplicationLiveState.prototype.clearResourcesList = function() +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.model.ApplicationLiveState.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.model.ApplicationLiveState.prototype.toObject = function(opt_includeInstance) { + return proto.model.ApplicationLiveState.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.model.ApplicationLiveState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.model.ApplicationLiveState.toObject = function(includeInstance, msg) { + var f, obj = { + resourcesList: jspb.Message.toObjectList(msg.getResourcesList(), + proto.model.ResourceState.toObject, includeInstance), + healthStatus: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.model.ApplicationLiveState} + */ +proto.model.ApplicationLiveState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.model.ApplicationLiveState; + return proto.model.ApplicationLiveState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.model.ApplicationLiveState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.model.ApplicationLiveState} + */ +proto.model.ApplicationLiveState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.model.ResourceState; + reader.readMessage(value,proto.model.ResourceState.deserializeBinaryFromReader); + msg.addResources(value); + break; + case 2: + var value = /** @type {!proto.model.ApplicationLiveState.Status} */ (reader.readEnum()); + msg.setHealthStatus(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.model.ApplicationLiveState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.model.ApplicationLiveState.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.model.ApplicationLiveState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.model.ApplicationLiveState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getResourcesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.model.ResourceState.serializeBinaryToWriter + ); + } + f = message.getHealthStatus(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.model.ApplicationLiveState.Status = { + UNKNOWN: 0, + HEALTHY: 1, + OTHER: 2 +}; + +/** + * repeated ResourceState resources = 1; + * @return {!Array} + */ +proto.model.ApplicationLiveState.prototype.getResourcesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.model.ResourceState, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.model.ApplicationLiveState} returns this +*/ +proto.model.ApplicationLiveState.prototype.setResourcesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.model.ResourceState=} opt_value + * @param {number=} opt_index + * @return {!proto.model.ResourceState} + */ +proto.model.ApplicationLiveState.prototype.addResources = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.model.ResourceState, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.model.ApplicationLiveState} returns this + */ +proto.model.ApplicationLiveState.prototype.clearResourcesList = function() { + return this.setResourcesList([]); +}; + + +/** + * optional Status health_status = 2; + * @return {!proto.model.ApplicationLiveState.Status} + */ +proto.model.ApplicationLiveState.prototype.getHealthStatus = function() { + return /** @type {!proto.model.ApplicationLiveState.Status} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.model.ApplicationLiveState.Status} value + * @return {!proto.model.ApplicationLiveState} returns this + */ +proto.model.ApplicationLiveState.prototype.setHealthStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.model.ResourceState.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.model.ResourceState.prototype.toObject = function(opt_includeInstance) { + return proto.model.ResourceState.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.model.ResourceState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.model.ResourceState.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + parentIdsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, + name: jspb.Message.getFieldWithDefault(msg, 3, ""), + resourceType: jspb.Message.getFieldWithDefault(msg, 4, ""), + resourceMetadataMap: (f = msg.getResourceMetadataMap()) ? f.toObject(includeInstance, undefined) : [], + healthStatus: jspb.Message.getFieldWithDefault(msg, 6, 0), + healthDescription: jspb.Message.getFieldWithDefault(msg, 7, ""), + createdAt: jspb.Message.getFieldWithDefault(msg, 10, 0), + updatedAt: jspb.Message.getFieldWithDefault(msg, 11, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.model.ResourceState} + */ +proto.model.ResourceState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.model.ResourceState; + return proto.model.ResourceState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.model.ResourceState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.model.ResourceState} + */ +proto.model.ResourceState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addParentIds(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setResourceType(value); + break; + case 5: + var value = msg.getResourceMetadataMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + case 6: + var value = /** @type {!proto.model.ResourceState.HealthStatus} */ (reader.readEnum()); + msg.setHealthStatus(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setHealthDescription(value); + break; + case 10: + var value = /** @type {number} */ (reader.readInt64()); + msg.setCreatedAt(value); + break; + case 11: + var value = /** @type {number} */ (reader.readInt64()); + msg.setUpdatedAt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.model.ResourceState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.model.ResourceState.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.model.ResourceState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.model.ResourceState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getParentIdsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getResourceType(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getResourceMetadataMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(5, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } + f = message.getHealthStatus(); + if (f !== 0.0) { + writer.writeEnum( + 6, + f + ); + } + f = message.getHealthDescription(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getCreatedAt(); + if (f !== 0) { + writer.writeInt64( + 10, + f + ); + } + f = message.getUpdatedAt(); + if (f !== 0) { + writer.writeInt64( + 11, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.model.ResourceState.HealthStatus = { + UNKNOWN: 0, + HEALTHY: 1, + UNHEALTHY: 2 +}; + +/** + * optional string id = 1; + * @return {string} + */ +proto.model.ResourceState.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.model.ResourceState} returns this + */ +proto.model.ResourceState.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated string parent_ids = 2; + * @return {!Array} + */ +proto.model.ResourceState.prototype.getParentIdsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.model.ResourceState} returns this + */ +proto.model.ResourceState.prototype.setParentIdsList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.model.ResourceState} returns this + */ +proto.model.ResourceState.prototype.addParentIds = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.model.ResourceState} returns this + */ +proto.model.ResourceState.prototype.clearParentIdsList = function() { + return this.setParentIdsList([]); +}; + + +/** + * optional string name = 3; + * @return {string} + */ +proto.model.ResourceState.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.model.ResourceState} returns this + */ +proto.model.ResourceState.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string resource_type = 4; + * @return {string} + */ +proto.model.ResourceState.prototype.getResourceType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.model.ResourceState} returns this + */ +proto.model.ResourceState.prototype.setResourceType = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * map resource_metadata = 5; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.model.ResourceState.prototype.getResourceMetadataMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 5, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.model.ResourceState} returns this + */ +proto.model.ResourceState.prototype.clearResourceMetadataMap = function() { + this.getResourceMetadataMap().clear(); + return this; +}; + + +/** + * optional HealthStatus health_status = 6; + * @return {!proto.model.ResourceState.HealthStatus} + */ +proto.model.ResourceState.prototype.getHealthStatus = function() { + return /** @type {!proto.model.ResourceState.HealthStatus} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {!proto.model.ResourceState.HealthStatus} value + * @return {!proto.model.ResourceState} returns this + */ +proto.model.ResourceState.prototype.setHealthStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 6, value); +}; + + +/** + * optional string health_description = 7; + * @return {string} + */ +proto.model.ResourceState.prototype.getHealthDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.model.ResourceState} returns this + */ +proto.model.ResourceState.prototype.setHealthDescription = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional int64 created_at = 10; + * @return {number} + */ +proto.model.ResourceState.prototype.getCreatedAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.model.ResourceState} returns this + */ +proto.model.ResourceState.prototype.setCreatedAt = function(value) { + return jspb.Message.setProto3IntField(this, 10, value); +}; + + +/** + * optional int64 updated_at = 11; + * @return {number} + */ +proto.model.ResourceState.prototype.getUpdatedAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.model.ResourceState} returns this + */ +proto.model.ResourceState.prototype.setUpdatedAt = function(value) { + return jspb.Message.setProto3IntField(this, 11, value); +}; + + + /** * List of repeated fields within this message type. * @private {!Array} From 50744d8b0f821b3bc5100438a9e3780de451f6b1 Mon Sep 17 00:00:00 2001 From: Yoshiki Fujikane Date: Tue, 24 Dec 2024 19:12:46 +0900 Subject: [PATCH 3/4] Fix comment Signed-off-by: Yoshiki Fujikane --- pkg/model/application_live_state.pb.go | 4 +--- pkg/model/application_live_state.proto | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/pkg/model/application_live_state.pb.go b/pkg/model/application_live_state.pb.go index ec9db2a6d0..0c49206f56 100644 --- a/pkg/model/application_live_state.pb.go +++ b/pkg/model/application_live_state.pb.go @@ -900,9 +900,7 @@ func (x *ApplicationLiveState) GetHealthStatus() ApplicationLiveState_Status { return ApplicationLiveState_UNKNOWN } -// TODO: refine the actual state information -// Existing fields: api_version, kind, namespace -// Addtional fields: deploy_target +// TODO: Add some more fields to consider about the deployment for multi clusters. type ResourceState struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/pkg/model/application_live_state.proto b/pkg/model/application_live_state.proto index 342e9ec7f3..2bf98dc225 100644 --- a/pkg/model/application_live_state.proto +++ b/pkg/model/application_live_state.proto @@ -84,9 +84,7 @@ message ApplicationLiveState { Status health_status = 2; } -// TODO: refine the actual state information -// Existing fields: api_version, kind, namespace -// Addtional fields: deploy_target +// TODO: Add some more fields to consider about the deployment for multi clusters. message ResourceState { enum HealthStatus { UNKNOWN = 0; From f478a1ae1785b7eda3acb9934115172367855c10 Mon Sep 17 00:00:00 2001 From: Yoshiki Fujikane Date: Tue, 24 Dec 2024 19:23:38 +0900 Subject: [PATCH 4/4] Fix for lint Signed-off-by: Yoshiki Fujikane --- web/src/__fixtures__/dummy-application-live-state.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/web/src/__fixtures__/dummy-application-live-state.ts b/web/src/__fixtures__/dummy-application-live-state.ts index 565a40a156..e40eca8e47 100644 --- a/web/src/__fixtures__/dummy-application-live-state.ts +++ b/web/src/__fixtures__/dummy-application-live-state.ts @@ -69,6 +69,7 @@ export const dummyApplicationLiveState: ApplicationLiveState = { lambda: { resourcesList: [] }, terraform: {}, kubernetes: { resourcesList }, + applicationLiveState: { resourcesList: [], healthStatus: 0 }, }; export const dummyLiveStates: Record = {