From da6adb125891411702c8197dfbd7cd7758ae1ebe Mon Sep 17 00:00:00 2001 From: oliveromahony Date: Tue, 17 Dec 2024 11:47:44 +0000 Subject: [PATCH] Added FileOverview to UpdateOverviewResponse (#930) * added the new payload to reconcile state in a recursive loop --- api/grpc/mpi/v1/command.pb.go | 335 +++++---- api/grpc/mpi/v1/common.pb.go | 42 +- api/grpc/mpi/v1/files.pb.go | 642 +++++++++--------- api/grpc/mpi/v1/files.pb.validate.go | 29 + api/grpc/mpi/v1/files.proto | 7 +- docs/proto/protos.md | 7 +- internal/file/file_manager_service.go | 67 +- internal/file/file_manager_service_test.go | 61 +- internal/file/file_plugin.go | 2 +- internal/file/file_plugin_test.go | 4 + .../fake_file_manager_service_interface.go | 18 +- internal/logger/logger.go | 9 +- 12 files changed, 687 insertions(+), 536 deletions(-) diff --git a/api/grpc/mpi/v1/command.pb.go b/api/grpc/mpi/v1/command.pb.go index ada6092b9..1a4e8db0f 100644 --- a/api/grpc/mpi/v1/command.pb.go +++ b/api/grpc/mpi/v1/command.pb.go @@ -8,7 +8,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.2 +// protoc-gen-go v1.36.0 // protoc (unknown) // source: mpi/v1/command.proto @@ -150,14 +150,13 @@ func (InstanceMeta_InstanceType) EnumDescriptor() ([]byte, []int) { // The connection request is an initial handshake to establish a connection, sending NGINX Agent instance information type CreateConnectionRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Meta-information associated with a message MessageMeta *MessageMeta `protobuf:"bytes,1,opt,name=message_meta,json=messageMeta,proto3" json:"message_meta,omitempty"` // Instance and infrastructure information associated with the NGINX Agent - Resource *Resource `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` + Resource *Resource `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CreateConnectionRequest) Reset() { @@ -206,21 +205,20 @@ func (x *CreateConnectionRequest) GetResource() *Resource { // A representation of instances and runtime resource information type Resource struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // A resource identifier ResourceId string `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` // A list of instances associated with this resource Instances []*Instance `protobuf:"bytes,2,rep,name=instances,proto3" json:"instances,omitempty"` // Runtime information of where the instances reside. Host or container based // - // Types that are assignable to Info: + // Types that are valid to be assigned to Info: // // *Resource_HostInfo // *Resource_ContainerInfo - Info isResource_Info `protobuf_oneof:"info"` + Info isResource_Info `protobuf_oneof:"info"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Resource) Reset() { @@ -267,23 +265,27 @@ func (x *Resource) GetInstances() []*Instance { return nil } -func (m *Resource) GetInfo() isResource_Info { - if m != nil { - return m.Info +func (x *Resource) GetInfo() isResource_Info { + if x != nil { + return x.Info } return nil } func (x *Resource) GetHostInfo() *HostInfo { - if x, ok := x.GetInfo().(*Resource_HostInfo); ok { - return x.HostInfo + if x != nil { + if x, ok := x.Info.(*Resource_HostInfo); ok { + return x.HostInfo + } } return nil } func (x *Resource) GetContainerInfo() *ContainerInfo { - if x, ok := x.GetInfo().(*Resource_ContainerInfo); ok { - return x.ContainerInfo + if x != nil { + if x, ok := x.Info.(*Resource_ContainerInfo); ok { + return x.ContainerInfo + } } return nil } @@ -308,16 +310,15 @@ func (*Resource_ContainerInfo) isResource_Info() {} // Represents the host system information type HostInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The host identifier HostId string `protobuf:"bytes,1,opt,name=host_id,json=hostId,proto3" json:"host_id,omitempty"` // The name of the host Hostname string `protobuf:"bytes,2,opt,name=hostname,proto3" json:"hostname,omitempty"` // Release information of the host - ReleaseInfo *ReleaseInfo `protobuf:"bytes,3,opt,name=release_info,json=releaseInfo,proto3" json:"release_info,omitempty"` + ReleaseInfo *ReleaseInfo `protobuf:"bytes,3,opt,name=release_info,json=releaseInfo,proto3" json:"release_info,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *HostInfo) Reset() { @@ -373,10 +374,7 @@ func (x *HostInfo) GetReleaseInfo() *ReleaseInfo { // Release information of the host type ReleaseInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // OS type (e.g. freebsd, linux, etc) Codename string `protobuf:"bytes,1,opt,name=codename,proto3" json:"codename,omitempty"` // OS name (e.g. ubuntu, linuxmint, etc) @@ -386,7 +384,9 @@ type ReleaseInfo struct { // Version of the OS kernel VersionId string `protobuf:"bytes,4,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` // Version of the OS - Version string `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"` + Version string `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ReleaseInfo) Reset() { @@ -456,14 +456,13 @@ func (x *ReleaseInfo) GetVersion() string { // Container information type ContainerInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The identifier of the container ContainerId string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` // The name of the host - Hostname string `protobuf:"bytes,2,opt,name=hostname,proto3" json:"hostname,omitempty"` + Hostname string `protobuf:"bytes,2,opt,name=hostname,proto3" json:"hostname,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ContainerInfo) Reset() { @@ -512,14 +511,13 @@ func (x *ContainerInfo) GetHostname() string { // A response to a CreateConnectionRequest type CreateConnectionResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The success or failure of the CreateConnectionRequest Response *CommandResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` // The recommendation NGINX Agent configurations provided by the ManagementPlane - AgentConfig *AgentConfig `protobuf:"bytes,2,opt,name=agent_config,json=agentConfig,proto3" json:"agent_config,omitempty"` + AgentConfig *AgentConfig `protobuf:"bytes,2,opt,name=agent_config,json=agentConfig,proto3" json:"agent_config,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CreateConnectionResponse) Reset() { @@ -568,14 +566,13 @@ func (x *CreateConnectionResponse) GetAgentConfig() *AgentConfig { // Report on the status of the Data Plane type UpdateDataPlaneStatusRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Meta-information associated with a message MessageMeta *MessageMeta `protobuf:"bytes,1,opt,name=message_meta,json=messageMeta,proto3" json:"message_meta,omitempty"` // the representation of a data plane - Resource *Resource `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` + Resource *Resource `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *UpdateDataPlaneStatusRequest) Reset() { @@ -624,9 +621,9 @@ func (x *UpdateDataPlaneStatusRequest) GetResource() *Resource { // Respond to a UpdateDataPlaneStatusRequest - intentionally empty type UpdateDataPlaneStatusResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *UpdateDataPlaneStatusResponse) Reset() { @@ -660,15 +657,14 @@ func (*UpdateDataPlaneStatusResponse) Descriptor() ([]byte, []int) { } type InstanceHealth struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - InstanceId string `protobuf:"bytes,1,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + InstanceId string `protobuf:"bytes,1,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"` // Health status InstanceHealthStatus InstanceHealth_InstanceHealthStatus `protobuf:"varint,2,opt,name=instance_health_status,json=instanceHealthStatus,proto3,enum=mpi.v1.InstanceHealth_InstanceHealthStatus" json:"instance_health_status,omitempty"` // Provides a human readable context around why a health status is a particular state - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *InstanceHealth) Reset() { @@ -724,14 +720,13 @@ func (x *InstanceHealth) GetDescription() string { // Health report of a set of instances type UpdateDataPlaneHealthRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Meta-information associated with a message MessageMeta *MessageMeta `protobuf:"bytes,1,opt,name=message_meta,json=messageMeta,proto3" json:"message_meta,omitempty"` // Health report of a set of instances InstanceHealths []*InstanceHealth `protobuf:"bytes,2,rep,name=instance_healths,json=instanceHealths,proto3" json:"instance_healths,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *UpdateDataPlaneHealthRequest) Reset() { @@ -780,9 +775,9 @@ func (x *UpdateDataPlaneHealthRequest) GetInstanceHealths() []*InstanceHealth { // Response to a UpdateDataPlaneHealthRequest - intentionally empty type UpdateDataPlaneHealthResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *UpdateDataPlaneHealthResponse) Reset() { @@ -817,16 +812,15 @@ func (*UpdateDataPlaneHealthResponse) Descriptor() ([]byte, []int) { // Reports the status of an associated command. This may be in response to a ManagementPlaneRequest type DataPlaneResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Meta-information associated with a message MessageMeta *MessageMeta `protobuf:"bytes,1,opt,name=message_meta,json=messageMeta,proto3" json:"message_meta,omitempty"` // The command response with the associated request CommandResponse *CommandResponse `protobuf:"bytes,2,opt,name=command_response,json=commandResponse,proto3" json:"command_response,omitempty"` // The instance identifier, if applicable, for this response - InstanceId string `protobuf:"bytes,3,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"` + InstanceId string `protobuf:"bytes,3,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DataPlaneResponse) Reset() { @@ -882,13 +876,10 @@ func (x *DataPlaneResponse) GetInstanceId() string { // A Management Plane request for information, triggers an associated rpc on the Data Plane type ManagementPlaneRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Meta-information associated with a message MessageMeta *MessageMeta `protobuf:"bytes,1,opt,name=message_meta,json=messageMeta,proto3" json:"message_meta,omitempty"` - // Types that are assignable to Request: + // Types that are valid to be assigned to Request: // // *ManagementPlaneRequest_StatusRequest // *ManagementPlaneRequest_HealthRequest @@ -896,7 +887,9 @@ type ManagementPlaneRequest struct { // *ManagementPlaneRequest_ConfigUploadRequest // *ManagementPlaneRequest_ActionRequest // *ManagementPlaneRequest_CommandStatusRequest - Request isManagementPlaneRequest_Request `protobuf_oneof:"request"` + Request isManagementPlaneRequest_Request `protobuf_oneof:"request"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ManagementPlaneRequest) Reset() { @@ -936,51 +929,63 @@ func (x *ManagementPlaneRequest) GetMessageMeta() *MessageMeta { return nil } -func (m *ManagementPlaneRequest) GetRequest() isManagementPlaneRequest_Request { - if m != nil { - return m.Request +func (x *ManagementPlaneRequest) GetRequest() isManagementPlaneRequest_Request { + if x != nil { + return x.Request } return nil } func (x *ManagementPlaneRequest) GetStatusRequest() *StatusRequest { - if x, ok := x.GetRequest().(*ManagementPlaneRequest_StatusRequest); ok { - return x.StatusRequest + if x != nil { + if x, ok := x.Request.(*ManagementPlaneRequest_StatusRequest); ok { + return x.StatusRequest + } } return nil } func (x *ManagementPlaneRequest) GetHealthRequest() *HealthRequest { - if x, ok := x.GetRequest().(*ManagementPlaneRequest_HealthRequest); ok { - return x.HealthRequest + if x != nil { + if x, ok := x.Request.(*ManagementPlaneRequest_HealthRequest); ok { + return x.HealthRequest + } } return nil } func (x *ManagementPlaneRequest) GetConfigApplyRequest() *ConfigApplyRequest { - if x, ok := x.GetRequest().(*ManagementPlaneRequest_ConfigApplyRequest); ok { - return x.ConfigApplyRequest + if x != nil { + if x, ok := x.Request.(*ManagementPlaneRequest_ConfigApplyRequest); ok { + return x.ConfigApplyRequest + } } return nil } func (x *ManagementPlaneRequest) GetConfigUploadRequest() *ConfigUploadRequest { - if x, ok := x.GetRequest().(*ManagementPlaneRequest_ConfigUploadRequest); ok { - return x.ConfigUploadRequest + if x != nil { + if x, ok := x.Request.(*ManagementPlaneRequest_ConfigUploadRequest); ok { + return x.ConfigUploadRequest + } } return nil } func (x *ManagementPlaneRequest) GetActionRequest() *APIActionRequest { - if x, ok := x.GetRequest().(*ManagementPlaneRequest_ActionRequest); ok { - return x.ActionRequest + if x != nil { + if x, ok := x.Request.(*ManagementPlaneRequest_ActionRequest); ok { + return x.ActionRequest + } } return nil } func (x *ManagementPlaneRequest) GetCommandStatusRequest() *CommandStatusRequest { - if x, ok := x.GetRequest().(*ManagementPlaneRequest_CommandStatusRequest); ok { - return x.CommandStatusRequest + if x != nil { + if x, ok := x.Request.(*ManagementPlaneRequest_CommandStatusRequest); ok { + return x.CommandStatusRequest + } } return nil } @@ -1034,9 +1039,9 @@ func (*ManagementPlaneRequest_CommandStatusRequest) isManagementPlaneRequest_Req // Additional information associated with a StatusRequest type StatusRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *StatusRequest) Reset() { @@ -1071,9 +1076,9 @@ func (*StatusRequest) Descriptor() ([]byte, []int) { // Additional information associated with a HealthRequest type HealthRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *HealthRequest) Reset() { @@ -1108,12 +1113,11 @@ func (*HealthRequest) Descriptor() ([]byte, []int) { // Additional information associated with a ConfigApplyRequest type ConfigApplyRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // set of files related to the request - Overview *FileOverview `protobuf:"bytes,1,opt,name=overview,proto3" json:"overview,omitempty"` + Overview *FileOverview `protobuf:"bytes,1,opt,name=overview,proto3" json:"overview,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ConfigApplyRequest) Reset() { @@ -1155,12 +1159,11 @@ func (x *ConfigApplyRequest) GetOverview() *FileOverview { // Additional information associated with a ConfigUploadRequest type ConfigUploadRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // set of files related to the request - Overview *FileOverview `protobuf:"bytes,1,opt,name=overview,proto3" json:"overview,omitempty"` + Overview *FileOverview `protobuf:"bytes,1,opt,name=overview,proto3" json:"overview,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ConfigUploadRequest) Reset() { @@ -1202,9 +1205,9 @@ func (x *ConfigUploadRequest) GetOverview() *FileOverview { // Perform an associated API action on an instance type APIActionRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *APIActionRequest) Reset() { @@ -1239,9 +1242,9 @@ func (*APIActionRequest) Descriptor() ([]byte, []int) { // Request an update on a particular command type CommandStatusRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CommandStatusRequest) Reset() { @@ -1276,16 +1279,15 @@ func (*CommandStatusRequest) Descriptor() ([]byte, []int) { // This represents an instance being reported on type Instance struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Meta-information associated with an instance InstanceMeta *InstanceMeta `protobuf:"bytes,1,opt,name=instance_meta,json=instanceMeta,proto3" json:"instance_meta,omitempty"` // Read and write configuration associated with an instance that can be modified via this definition InstanceConfig *InstanceConfig `protobuf:"bytes,2,opt,name=instance_config,json=instanceConfig,proto3" json:"instance_config,omitempty"` // Read-only meta data associated with the instance running in it's environment InstanceRuntime *InstanceRuntime `protobuf:"bytes,3,opt,name=instance_runtime,json=instanceRuntime,proto3" json:"instance_runtime,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Instance) Reset() { @@ -1341,16 +1343,15 @@ func (x *Instance) GetInstanceRuntime() *InstanceRuntime { // Meta-information relating to the reported instance type InstanceMeta struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // the identifier associated with the instance InstanceId string `protobuf:"bytes,1,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"` // the types of instances possible InstanceType InstanceMeta_InstanceType `protobuf:"varint,2,opt,name=instance_type,json=instanceType,proto3,enum=mpi.v1.InstanceMeta_InstanceType" json:"instance_type,omitempty"` // the version of the instance - Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` + Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *InstanceMeta) Reset() { @@ -1406,16 +1407,15 @@ func (x *InstanceMeta) GetVersion() string { // Instance Configuration options type InstanceConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // provided actions associated with a particular instance. These are runtime based and provided by a particular version of the NGINX Agent Actions []*InstanceAction `protobuf:"bytes,1,rep,name=actions,proto3" json:"actions,omitempty"` - // Types that are assignable to Config: + // Types that are valid to be assigned to Config: // // *InstanceConfig_AgentConfig - Config isInstanceConfig_Config `protobuf_oneof:"config"` + Config isInstanceConfig_Config `protobuf_oneof:"config"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *InstanceConfig) Reset() { @@ -1455,16 +1455,18 @@ func (x *InstanceConfig) GetActions() []*InstanceAction { return nil } -func (m *InstanceConfig) GetConfig() isInstanceConfig_Config { - if m != nil { - return m.Config +func (x *InstanceConfig) GetConfig() isInstanceConfig_Config { + if x != nil { + return x.Config } return nil } func (x *InstanceConfig) GetAgentConfig() *AgentConfig { - if x, ok := x.GetConfig().(*InstanceConfig_AgentConfig); ok { - return x.AgentConfig + if x != nil { + if x, ok := x.Config.(*InstanceConfig_AgentConfig); ok { + return x.AgentConfig + } } return nil } @@ -1481,10 +1483,7 @@ type InstanceConfig_AgentConfig struct { func (*InstanceConfig_AgentConfig) isInstanceConfig_Config() {} type InstanceRuntime struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // the process identifier ProcessId int32 `protobuf:"varint,1,opt,name=process_id,json=processId,proto3" json:"process_id,omitempty"` // the binary path location @@ -1493,13 +1492,15 @@ type InstanceRuntime struct { ConfigPath string `protobuf:"bytes,3,opt,name=config_path,json=configPath,proto3" json:"config_path,omitempty"` // more detailed runtime objects // - // Types that are assignable to Details: + // Types that are valid to be assigned to Details: // // *InstanceRuntime_NginxRuntimeInfo // *InstanceRuntime_NginxPlusRuntimeInfo Details isInstanceRuntime_Details `protobuf_oneof:"details"` // List of worker processes InstanceChildren []*InstanceChild `protobuf:"bytes,6,rep,name=instance_children,json=instanceChildren,proto3" json:"instance_children,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *InstanceRuntime) Reset() { @@ -1553,23 +1554,27 @@ func (x *InstanceRuntime) GetConfigPath() string { return "" } -func (m *InstanceRuntime) GetDetails() isInstanceRuntime_Details { - if m != nil { - return m.Details +func (x *InstanceRuntime) GetDetails() isInstanceRuntime_Details { + if x != nil { + return x.Details } return nil } func (x *InstanceRuntime) GetNginxRuntimeInfo() *NGINXRuntimeInfo { - if x, ok := x.GetDetails().(*InstanceRuntime_NginxRuntimeInfo); ok { - return x.NginxRuntimeInfo + if x != nil { + if x, ok := x.Details.(*InstanceRuntime_NginxRuntimeInfo); ok { + return x.NginxRuntimeInfo + } } return nil } func (x *InstanceRuntime) GetNginxPlusRuntimeInfo() *NGINXPlusRuntimeInfo { - if x, ok := x.GetDetails().(*InstanceRuntime_NginxPlusRuntimeInfo); ok { - return x.NginxPlusRuntimeInfo + if x != nil { + if x, ok := x.Details.(*InstanceRuntime_NginxPlusRuntimeInfo); ok { + return x.NginxPlusRuntimeInfo + } } return nil } @@ -1600,12 +1605,11 @@ func (*InstanceRuntime_NginxRuntimeInfo) isInstanceRuntime_Details() {} func (*InstanceRuntime_NginxPlusRuntimeInfo) isInstanceRuntime_Details() {} type InstanceChild struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // the process identifier - ProcessId int32 `protobuf:"varint,1,opt,name=process_id,json=processId,proto3" json:"process_id,omitempty"` + ProcessId int32 `protobuf:"varint,1,opt,name=process_id,json=processId,proto3" json:"process_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *InstanceChild) Reset() { @@ -1647,10 +1651,7 @@ func (x *InstanceChild) GetProcessId() int32 { // A set of runtime NGINX OSS settings type NGINXRuntimeInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // the stub status API details StubStatus *APIDetails `protobuf:"bytes,1,opt,name=stub_status,json=stubStatus,proto3" json:"stub_status,omitempty"` // a list of access_logs @@ -1661,6 +1662,8 @@ type NGINXRuntimeInfo struct { LoadableModules []string `protobuf:"bytes,4,rep,name=loadable_modules,json=loadableModules,proto3" json:"loadable_modules,omitempty"` // List of NGINX dynamic modules. DynamicModules []string `protobuf:"bytes,5,rep,name=dynamic_modules,json=dynamicModules,proto3" json:"dynamic_modules,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *NGINXRuntimeInfo) Reset() { @@ -1730,10 +1733,7 @@ func (x *NGINXRuntimeInfo) GetDynamicModules() []string { // A set of runtime NGINX Plus settings type NGINXPlusRuntimeInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // the stub status API details StubStatus *APIDetails `protobuf:"bytes,1,opt,name=stub_status,json=stubStatus,proto3" json:"stub_status,omitempty"` // a list of access_logs @@ -1745,7 +1745,9 @@ type NGINXPlusRuntimeInfo struct { // List of NGINX dynamic modules. DynamicModules []string `protobuf:"bytes,5,rep,name=dynamic_modules,json=dynamicModules,proto3" json:"dynamic_modules,omitempty"` // the plus API details - PlusApi *APIDetails `protobuf:"bytes,6,opt,name=plus_api,json=plusApi,proto3" json:"plus_api,omitempty"` + PlusApi *APIDetails `protobuf:"bytes,6,opt,name=plus_api,json=plusApi,proto3" json:"plus_api,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *NGINXPlusRuntimeInfo) Reset() { @@ -1821,14 +1823,13 @@ func (x *NGINXPlusRuntimeInfo) GetPlusApi() *APIDetails { } type APIDetails struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // the API location directive Location string `protobuf:"bytes,1,opt,name=location,proto3" json:"location,omitempty"` // the API listen directive - Listen string `protobuf:"bytes,2,opt,name=listen,proto3" json:"listen,omitempty"` + Listen string `protobuf:"bytes,2,opt,name=listen,proto3" json:"listen,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *APIDetails) Reset() { @@ -1877,9 +1878,9 @@ func (x *APIDetails) GetListen() string { // A set of actions that can be performed on an instance type InstanceAction struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *InstanceAction) Reset() { @@ -1914,10 +1915,7 @@ func (*InstanceAction) Descriptor() ([]byte, []int) { // This contains a series of NGINX Agent configurations type AgentConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Command server settings Command *CommandServer `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"` // Metrics server settings @@ -1930,6 +1928,8 @@ type AgentConfig struct { Features []string `protobuf:"bytes,5,rep,name=features,proto3" json:"features,omitempty"` // Message buffer size, maximum not acknowledged messages from the subscribe perspective MessageBufferSize string `protobuf:"bytes,6,opt,name=message_buffer_size,json=messageBufferSize,proto3" json:"message_buffer_size,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *AgentConfig) Reset() { @@ -2006,16 +2006,15 @@ func (x *AgentConfig) GetMessageBufferSize() string { // The command server settings, associated with messaging from an external source type CommandServer struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Server configuration (e.g., host, port, type) Server *ServerSettings `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"` // Authentication configuration (e.g., token) Auth *AuthSettings `protobuf:"bytes,2,opt,name=auth,proto3" json:"auth,omitempty"` // TLS configuration for secure communication - Tls *TLSSettings `protobuf:"bytes,3,opt,name=tls,proto3" json:"tls,omitempty"` + Tls *TLSSettings `protobuf:"bytes,3,opt,name=tls,proto3" json:"tls,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CommandServer) Reset() { @@ -2071,9 +2070,9 @@ func (x *CommandServer) GetTls() *TLSSettings { // The metrics settings associated with origins (sources) of the metrics and destinations (exporter) type MetricsServer struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *MetricsServer) Reset() { @@ -2108,9 +2107,9 @@ func (*MetricsServer) Descriptor() ([]byte, []int) { // The file settings associated with file server for configurations type FileServer struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *FileServer) Reset() { diff --git a/api/grpc/mpi/v1/common.pb.go b/api/grpc/mpi/v1/common.pb.go index 008b7b98f..493030c7d 100644 --- a/api/grpc/mpi/v1/common.pb.go +++ b/api/grpc/mpi/v1/common.pb.go @@ -5,7 +5,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.2 +// protoc-gen-go v1.36.0 // protoc (unknown) // source: mpi/v1/common.proto @@ -142,16 +142,15 @@ func (ServerSettings_ServerType) EnumDescriptor() ([]byte, []int) { // Meta-information associated with a message type MessageMeta struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // uuid v7 monotonically increasing string MessageId string `protobuf:"bytes,1,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"` // if 2 or more messages associated with the same workflow, use this field as an association CorrelationId string `protobuf:"bytes,2,opt,name=correlation_id,json=correlationId,proto3" json:"correlation_id,omitempty"` // timestamp for human readable timestamp in UTC format - Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *MessageMeta) Reset() { @@ -207,16 +206,15 @@ func (x *MessageMeta) GetTimestamp() *timestamppb.Timestamp { // Represents a the status response of an command type CommandResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Command status Status CommandResponse_CommandStatus `protobuf:"varint,1,opt,name=status,proto3,enum=mpi.v1.CommandResponse_CommandStatus" json:"status,omitempty"` // Provides a user friendly message to describe the response Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // Provides an error message of why the command failed, only populated when CommandStatus is COMMAND_STATUS_ERROR - Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` + Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CommandResponse) Reset() { @@ -272,16 +270,15 @@ func (x *CommandResponse) GetError() string { // The top-level configuration for the command server type ServerSettings struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Command server host Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` // Command server port Port int32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` // Server type (enum for gRPC, HTTP, etc.) - Type ServerSettings_ServerType `protobuf:"varint,3,opt,name=type,proto3,enum=mpi.v1.ServerSettings_ServerType" json:"type,omitempty"` + Type ServerSettings_ServerType `protobuf:"varint,3,opt,name=type,proto3,enum=mpi.v1.ServerSettings_ServerType" json:"type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ServerSettings) Reset() { @@ -337,9 +334,9 @@ func (x *ServerSettings) GetType() ServerSettings_ServerType { // Defines the authentication configuration type AuthSettings struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *AuthSettings) Reset() { @@ -373,10 +370,7 @@ func (*AuthSettings) Descriptor() ([]byte, []int) { } type TLSSettings struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // TLS certificate for the command server (e.g., "/path/to/cert.pem") Cert string `protobuf:"bytes,1,opt,name=cert,proto3" json:"cert,omitempty"` // TLS key for the command server (e.g., "/path/to/key.pem") @@ -387,7 +381,9 @@ type TLSSettings struct { // If skip_verify is true, accepts any certificate presented by the server and any host name in that certificate. SkipVerify bool `protobuf:"varint,4,opt,name=skip_verify,json=skipVerify,proto3" json:"skip_verify,omitempty"` // Server name for TLS - ServerName string `protobuf:"bytes,5,opt,name=server_name,json=serverName,proto3" json:"server_name,omitempty"` + ServerName string `protobuf:"bytes,5,opt,name=server_name,json=serverName,proto3" json:"server_name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *TLSSettings) Reset() { diff --git a/api/grpc/mpi/v1/files.pb.go b/api/grpc/mpi/v1/files.pb.go index 7503e90e7..54d1e212d 100644 --- a/api/grpc/mpi/v1/files.pb.go +++ b/api/grpc/mpi/v1/files.pb.go @@ -5,7 +5,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.2 +// protoc-gen-go v1.36.0 // protoc (unknown) // source: mpi/v1/files.proto @@ -199,14 +199,13 @@ func (File_FileAction) EnumDescriptor() ([]byte, []int) { // Represents a request payload for a file overview type GetOverviewRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Meta-information associated with a message MessageMeta *MessageMeta `protobuf:"bytes,1,opt,name=message_meta,json=messageMeta,proto3" json:"message_meta,omitempty"` // The config version of the overview you are requesting ConfigVersion *ConfigVersion `protobuf:"bytes,2,opt,name=config_version,json=configVersion,proto3" json:"config_version,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetOverviewRequest) Reset() { @@ -255,12 +254,11 @@ func (x *GetOverviewRequest) GetConfigVersion() *ConfigVersion { // Represents the response payload to a GetOverviewRequest, requesting a list of logically grouped files e.g. configuration payload type GetOverviewResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The file overview of an instance - Overview *FileOverview `protobuf:"bytes,1,opt,name=overview,proto3" json:"overview,omitempty"` + Overview *FileOverview `protobuf:"bytes,1,opt,name=overview,proto3" json:"overview,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetOverviewResponse) Reset() { @@ -302,14 +300,13 @@ func (x *GetOverviewResponse) GetOverview() *FileOverview { // Represents a list of logically grouped files that have changed e.g. configuration payload type UpdateOverviewRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Meta-information associated with a message MessageMeta *MessageMeta `protobuf:"bytes,1,opt,name=message_meta,json=messageMeta,proto3" json:"message_meta,omitempty"` // The file overview of an instance - Overview *FileOverview `protobuf:"bytes,2,opt,name=overview,proto3" json:"overview,omitempty"` + Overview *FileOverview `protobuf:"bytes,2,opt,name=overview,proto3" json:"overview,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *UpdateOverviewRequest) Reset() { @@ -356,11 +353,13 @@ func (x *UpdateOverviewRequest) GetOverview() *FileOverview { return nil } -// Represents a the response from an UpdateOverviewRequest - intentionally left empty +// Represents a the response from an UpdateOverviewRequest type UpdateOverviewResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + // The file overview with the list of files that were uploaded + Overview *FileOverview `protobuf:"bytes,1,opt,name=overview,proto3" json:"overview,omitempty"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *UpdateOverviewResponse) Reset() { @@ -393,16 +392,22 @@ func (*UpdateOverviewResponse) Descriptor() ([]byte, []int) { return file_mpi_v1_files_proto_rawDescGZIP(), []int{3} } +func (x *UpdateOverviewResponse) GetOverview() *FileOverview { + if x != nil { + return x.Overview + } + return nil +} + // Represents a specific configuration version associated with an instance type ConfigVersion struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The instance identifier InstanceId string `protobuf:"bytes,1,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"` // The version of the configuration - Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ConfigVersion) Reset() { @@ -451,14 +456,13 @@ func (x *ConfigVersion) GetVersion() string { // Represents a collection of files type FileOverview struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // A list of files Files []*File `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"` // The configuration version of the current set of files ConfigVersion *ConfigVersion `protobuf:"bytes,2,opt,name=config_version,json=configVersion,proto3" json:"config_version,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *FileOverview) Reset() { @@ -507,14 +511,13 @@ func (x *FileOverview) GetConfigVersion() *ConfigVersion { // Represents meta data about a file type File struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Meta information about the file, the name (including path) and hash FileMeta *FileMeta `protobuf:"bytes,1,opt,name=file_meta,json=fileMeta,proto3" json:"file_meta,omitempty"` // Optional action - Action *File_FileAction `protobuf:"varint,2,opt,name=action,proto3,enum=mpi.v1.File_FileAction,oneof" json:"action,omitempty"` + Action *File_FileAction `protobuf:"varint,2,opt,name=action,proto3,enum=mpi.v1.File_FileAction,oneof" json:"action,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *File) Reset() { @@ -563,14 +566,13 @@ func (x *File) GetAction() File_FileAction { // Represents the get file request type GetFileRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Meta-information associated with a message MessageMeta *MessageMeta `protobuf:"bytes,1,opt,name=message_meta,json=messageMeta,proto3" json:"message_meta,omitempty"` // Meta-information associated with the file - FileMeta *FileMeta `protobuf:"bytes,2,opt,name=file_meta,json=fileMeta,proto3" json:"file_meta,omitempty"` + FileMeta *FileMeta `protobuf:"bytes,2,opt,name=file_meta,json=fileMeta,proto3" json:"file_meta,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetFileRequest) Reset() { @@ -619,12 +621,11 @@ func (x *GetFileRequest) GetFileMeta() *FileMeta { // Represents the response to a get file request type GetFileResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The contents of a file - Contents *FileContents `protobuf:"bytes,1,opt,name=contents,proto3" json:"contents,omitempty"` + Contents *FileContents `protobuf:"bytes,1,opt,name=contents,proto3" json:"contents,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetFileResponse) Reset() { @@ -666,12 +667,11 @@ func (x *GetFileResponse) GetContents() *FileContents { // Represents the bytes contents of the file https://protobuf.dev/programming-guides/api/#dont-encode-data-in-a-string type FileContents struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Byte representation of a file without encoding - Contents []byte `protobuf:"bytes,1,opt,name=contents,proto3" json:"contents,omitempty"` + Contents []byte `protobuf:"bytes,1,opt,name=contents,proto3" json:"contents,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *FileContents) Reset() { @@ -713,10 +713,7 @@ func (x *FileContents) GetContents() []byte { // Meta information about the file, the name (including path) and hash type FileMeta struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The full path of the file Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The hash of the file contents sha256, hex encoded @@ -729,10 +726,12 @@ type FileMeta struct { Size int64 `protobuf:"varint,5,opt,name=size,proto3" json:"size,omitempty"` // additional file information // - // Types that are assignable to FileType: + // Types that are valid to be assigned to FileType: // // *FileMeta_CertificateMeta - FileType isFileMeta_FileType `protobuf_oneof:"file_type"` + FileType isFileMeta_FileType `protobuf_oneof:"file_type"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *FileMeta) Reset() { @@ -800,16 +799,18 @@ func (x *FileMeta) GetSize() int64 { return 0 } -func (m *FileMeta) GetFileType() isFileMeta_FileType { - if m != nil { - return m.FileType +func (x *FileMeta) GetFileType() isFileMeta_FileType { + if x != nil { + return x.FileType } return nil } func (x *FileMeta) GetCertificateMeta() *CertificateMeta { - if x, ok := x.GetFileType().(*FileMeta_CertificateMeta); ok { - return x.CertificateMeta + if x != nil { + if x, ok := x.FileType.(*FileMeta_CertificateMeta); ok { + return x.CertificateMeta + } } return nil } @@ -826,16 +827,15 @@ func (*FileMeta_CertificateMeta) isFileMeta_FileType() {} // Represents the update file request type UpdateFileRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The file requested to be updated File *File `protobuf:"bytes,1,opt,name=file,proto3" json:"file,omitempty"` // The contents of a file Contents *FileContents `protobuf:"bytes,2,opt,name=contents,proto3" json:"contents,omitempty"` // Meta-information associated with a message - MessageMeta *MessageMeta `protobuf:"bytes,3,opt,name=message_meta,json=messageMeta,proto3" json:"message_meta,omitempty"` + MessageMeta *MessageMeta `protobuf:"bytes,3,opt,name=message_meta,json=messageMeta,proto3" json:"message_meta,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *UpdateFileRequest) Reset() { @@ -891,12 +891,11 @@ func (x *UpdateFileRequest) GetMessageMeta() *MessageMeta { // Represents the response to an update file request type UpdateFileResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Meta-information associated with the updated file - FileMeta *FileMeta `protobuf:"bytes,1,opt,name=file_meta,json=fileMeta,proto3" json:"file_meta,omitempty"` + FileMeta *FileMeta `protobuf:"bytes,1,opt,name=file_meta,json=fileMeta,proto3" json:"file_meta,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *UpdateFileResponse) Reset() { @@ -939,10 +938,7 @@ func (x *UpdateFileResponse) GetFileMeta() *FileMeta { // Define the certificate message based on https://pkg.go.dev/crypto/x509#Certificate // and https://github.com/googleapis/googleapis/blob/005df4681b89bd204a90b76168a6dc9d9e7bf4fe/google/cloud/iot/v1/resources.proto#L341 type CertificateMeta struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Serial number of the certificate, usually a unique identifier, RFC5280 states the upper limit for serial number is 20 octets SerialNumber []byte `protobuf:"bytes,1,opt,name=serial_number,json=serialNumber,proto3" json:"serial_number,omitempty"` // Issuer details (who issued the certificate) @@ -957,6 +953,8 @@ type CertificateMeta struct { SignatureAlgorithm SignatureAlgorithm `protobuf:"varint,6,opt,name=signature_algorithm,json=signatureAlgorithm,proto3,enum=mpi.v1.SignatureAlgorithm" json:"signature_algorithm,omitempty"` // The type of public key in the certificate. PublicKeyAlgorithm string `protobuf:"bytes,7,opt,name=public_key_algorithm,json=publicKeyAlgorithm,proto3" json:"public_key_algorithm,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CertificateMeta) Reset() { @@ -1040,14 +1038,13 @@ func (x *CertificateMeta) GetPublicKeyAlgorithm() string { // Represents the dates for which a certificate is valid type CertificateDates struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The start date that for when the certificate is valid NotBefore int64 `protobuf:"varint,1,opt,name=not_before,json=notBefore,proto3" json:"not_before,omitempty"` // The end date that for when the certificate is valid - NotAfter int64 `protobuf:"varint,2,opt,name=not_after,json=notAfter,proto3" json:"not_after,omitempty"` + NotAfter int64 `protobuf:"varint,2,opt,name=not_after,json=notAfter,proto3" json:"not_after,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CertificateDates) Reset() { @@ -1096,14 +1093,13 @@ func (x *CertificateDates) GetNotAfter() int64 { // Represents the Subject Alternative Names for a certificate type SubjectAlternativeNames struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // List of DNS names in the Subject Alternative Name (SAN) extension DnsNames []string `protobuf:"bytes,1,rep,name=dns_names,json=dnsNames,proto3" json:"dns_names,omitempty"` // List of ip addresses in the SAN extension - IpAddresses []string `protobuf:"bytes,2,rep,name=ip_addresses,json=ipAddresses,proto3" json:"ip_addresses,omitempty"` + IpAddresses []string `protobuf:"bytes,2,rep,name=ip_addresses,json=ipAddresses,proto3" json:"ip_addresses,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SubjectAlternativeNames) Reset() { @@ -1152,10 +1148,7 @@ func (x *SubjectAlternativeNames) GetIpAddresses() []string { // Represents the dates for which a certificate is valid as seen at https://pkg.go.dev/crypto/x509/pkix#Name type X509Name struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Country name (C): Two-letter country code as per ISO 3166. // Must be exactly 2 characters. Country []string `protobuf:"bytes,1,rep,name=country,proto3" json:"country,omitempty"` @@ -1181,7 +1174,9 @@ type X509Name struct { Names []*AttributeTypeAndValue `protobuf:"bytes,10,rep,name=names,proto3" json:"names,omitempty"` // Additional attributes to be included in the marshaled distinguished names. // These override any attributes with the same OID in `names`. - ExtraNames []*AttributeTypeAndValue `protobuf:"bytes,11,rep,name=extra_names,json=extraNames,proto3" json:"extra_names,omitempty"` + ExtraNames []*AttributeTypeAndValue `protobuf:"bytes,11,rep,name=extra_names,json=extraNames,proto3" json:"extra_names,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *X509Name) Reset() { @@ -1292,14 +1287,13 @@ func (x *X509Name) GetExtraNames() []*AttributeTypeAndValue { } type AttributeTypeAndValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The type (or identifier) of the attribute (e.g., OID). Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // The value associated with the attribute. - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *AttributeTypeAndValue) Reset() { @@ -1377,205 +1371,208 @@ var file_mpi_v1_files_proto_rawDesc = []byte{ 0x61, 0x67, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x30, 0x0a, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x76, 0x69, 0x65, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x76, 0x69, 0x65, 0x77, 0x52, - 0x08, 0x6f, 0x76, 0x65, 0x72, 0x76, 0x69, 0x65, 0x77, 0x22, 0x18, 0x0a, 0x16, 0x55, 0x70, 0x64, + 0x08, 0x6f, 0x76, 0x65, 0x72, 0x76, 0x69, 0x65, 0x77, 0x22, 0x4a, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x54, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, - 0xb0, 0x01, 0x01, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, - 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x70, 0x0a, 0x0c, 0x46, 0x69, 0x6c, - 0x65, 0x4f, 0x76, 0x65, 0x72, 0x76, 0x69, 0x65, 0x77, 0x12, 0x22, 0x0a, 0x05, 0x66, 0x69, 0x6c, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6d, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x3c, 0x0a, - 0x0e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x82, 0x02, 0x0a, 0x04, - 0x46, 0x69, 0x6c, 0x65, 0x12, 0x2d, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6d, 0x65, 0x74, - 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x4d, - 0x65, 0x74, 0x61, 0x12, 0x34, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x6d, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, - 0x65, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x06, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x22, 0x89, 0x01, 0x0a, 0x0a, 0x46, 0x69, - 0x6c, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x46, 0x49, 0x4c, 0x45, - 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x41, 0x43, - 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x44, 0x10, 0x01, - 0x12, 0x13, 0x0a, 0x0f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x41, 0x44, 0x44, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x41, 0x43, - 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x03, 0x12, 0x16, 0x0a, - 0x12, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x45, 0x4c, - 0x45, 0x54, 0x45, 0x10, 0x04, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0x77, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x36, 0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x6d, 0x65, - 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x0b, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x2d, 0x0a, 0x09, 0x66, 0x69, - 0x6c, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, - 0x6d, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, - 0x08, 0x66, 0x69, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x22, 0x43, 0x0a, 0x0f, 0x47, 0x65, 0x74, - 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x08, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x6d, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x6e, 0x74, 0x73, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x2a, - 0x0a, 0x0c, 0x46, 0x69, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1a, - 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xa2, 0x02, 0x0a, 0x08, 0x46, - 0x69, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0x3a, 0x01, 0x2f, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x49, 0x0a, 0x0d, 0x6d, 0x6f, 0x64, - 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xba, 0x48, - 0x05, 0xb2, 0x01, 0x02, 0x38, 0x01, 0x52, 0x0c, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, - 0x54, 0x69, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x10, 0xba, 0x48, 0x0d, 0x72, 0x0b, - 0x32, 0x09, 0x30, 0x5b, 0x30, 0x2d, 0x37, 0x5d, 0x7b, 0x33, 0x7d, 0x52, 0x0b, 0x70, 0x65, 0x72, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x44, 0x0a, 0x10, - 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6d, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x48, - 0x00, 0x52, 0x0f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x4d, 0x65, - 0x74, 0x61, 0x42, 0x0b, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, - 0x9f, 0x01, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6d, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, - 0x65, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x30, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x52, - 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x36, 0x0a, 0x0c, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x13, 0x2e, 0x6d, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x4d, 0x65, 0x74, 0x61, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x74, - 0x61, 0x22, 0x43, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, - 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x08, 0x66, 0x69, - 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x22, 0xfb, 0x02, 0x0a, 0x0f, 0x43, 0x65, 0x72, 0x74, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x2e, 0x0a, 0x0d, 0x73, 0x65, - 0x72, 0x69, 0x61, 0x6c, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x42, 0x09, 0xba, 0x48, 0x06, 0x7a, 0x04, 0x10, 0x00, 0x18, 0x15, 0x52, 0x0c, 0x73, 0x65, - 0x72, 0x69, 0x61, 0x6c, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x28, 0x0a, 0x06, 0x69, 0x73, - 0x73, 0x75, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x58, 0x35, 0x30, 0x39, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x06, 0x69, 0x73, - 0x73, 0x75, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x58, - 0x35, 0x30, 0x39, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x12, 0x33, 0x0a, 0x04, 0x73, 0x61, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, - 0x2e, 0x6d, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, - 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, - 0x04, 0x73, 0x61, 0x6e, 0x73, 0x12, 0x2e, 0x0a, 0x05, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6d, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x65, - 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x65, 0x73, 0x52, 0x05, - 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x4b, 0x0a, 0x13, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x6d, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x52, 0x12, - 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, - 0x68, 0x6d, 0x12, 0x30, 0x0a, 0x14, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, - 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x12, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x41, 0x6c, 0x67, 0x6f, 0x72, - 0x69, 0x74, 0x68, 0x6d, 0x22, 0x4e, 0x0a, 0x10, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x6f, 0x74, 0x5f, - 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6e, 0x6f, - 0x74, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x74, 0x5f, 0x61, - 0x66, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6e, 0x6f, 0x74, 0x41, - 0x66, 0x74, 0x65, 0x72, 0x22, 0x59, 0x0a, 0x17, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, - 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, - 0x1b, 0x0a, 0x09, 0x64, 0x6e, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x08, 0x64, 0x6e, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, - 0x69, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x0b, 0x69, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x22, - 0xac, 0x04, 0x0a, 0x08, 0x58, 0x35, 0x30, 0x39, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x07, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x0e, 0xba, - 0x48, 0x0b, 0x92, 0x01, 0x08, 0x22, 0x06, 0x72, 0x04, 0x10, 0x02, 0x18, 0x02, 0x52, 0x07, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x30, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, - 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x0c, 0xba, 0x48, - 0x09, 0x92, 0x01, 0x06, 0x22, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x61, - 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3d, 0x0a, 0x13, 0x6f, 0x72, 0x67, 0x61, - 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x09, 0x42, 0x0c, 0xba, 0x48, 0x09, 0x92, 0x01, 0x06, 0x22, 0x04, 0x72, - 0x02, 0x10, 0x01, 0x52, 0x12, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x61, 0x6c, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x28, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x6c, - 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x42, 0x0c, 0xba, 0x48, 0x09, 0x92, 0x01, - 0x06, 0x22, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, - 0x79, 0x12, 0x28, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, - 0x03, 0x28, 0x09, 0x42, 0x0c, 0xba, 0x48, 0x09, 0x92, 0x01, 0x06, 0x22, 0x04, 0x72, 0x02, 0x10, - 0x01, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x12, 0x33, 0x0a, 0x0e, 0x73, - 0x74, 0x72, 0x65, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x06, 0x20, - 0x03, 0x28, 0x09, 0x42, 0x0c, 0xba, 0x48, 0x09, 0x92, 0x01, 0x06, 0x22, 0x04, 0x72, 0x02, 0x10, - 0x01, 0x52, 0x0d, 0x73, 0x74, 0x72, 0x65, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x12, 0x2d, 0x0a, 0x0b, 0x70, 0x6f, 0x73, 0x74, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, - 0x07, 0x20, 0x03, 0x28, 0x09, 0x42, 0x0c, 0xba, 0x48, 0x09, 0x92, 0x01, 0x06, 0x22, 0x04, 0x72, - 0x02, 0x10, 0x01, 0x52, 0x0a, 0x70, 0x6f, 0x73, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x64, 0x65, 0x12, - 0x2e, 0x0a, 0x0d, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x09, 0xba, 0x48, 0x06, 0x72, 0x04, 0x10, 0x00, 0x18, - 0x15, 0x52, 0x0c, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, - 0x28, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x33, 0x0a, 0x05, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6d, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x41, - 0x6e, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x3e, - 0x0a, 0x0b, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x0b, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6d, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x41, 0x6e, 0x64, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x72, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x53, - 0x0a, 0x15, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x41, - 0x6e, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x2a, 0x8a, 0x03, 0x0a, 0x12, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x1f, 0x0a, 0x1b, 0x53, 0x49, - 0x47, 0x4e, 0x41, 0x54, 0x55, 0x52, 0x45, 0x5f, 0x41, 0x4c, 0x47, 0x4f, 0x52, 0x49, 0x54, 0x48, - 0x4d, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x4d, - 0x44, 0x32, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x52, 0x53, 0x41, 0x10, 0x01, 0x12, 0x10, 0x0a, - 0x0c, 0x4d, 0x44, 0x35, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x52, 0x53, 0x41, 0x10, 0x02, 0x12, - 0x11, 0x0a, 0x0d, 0x53, 0x48, 0x41, 0x31, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x52, 0x53, 0x41, - 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x5f, 0x57, 0x49, 0x54, - 0x48, 0x5f, 0x52, 0x53, 0x41, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x48, 0x41, 0x33, 0x38, - 0x34, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x52, 0x53, 0x41, 0x10, 0x05, 0x12, 0x13, 0x0a, 0x0f, - 0x53, 0x48, 0x41, 0x35, 0x31, 0x32, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x52, 0x53, 0x41, 0x10, - 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x44, 0x53, 0x41, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x53, 0x48, - 0x41, 0x31, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x44, 0x53, 0x41, 0x5f, 0x57, 0x49, 0x54, 0x48, - 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, 0x08, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x43, 0x44, - 0x53, 0x41, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x53, 0x48, 0x41, 0x31, 0x10, 0x09, 0x12, 0x15, + 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x76, 0x69, 0x65, 0x77, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x46, + 0x69, 0x6c, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x76, 0x69, 0x65, 0x77, 0x52, 0x08, 0x6f, 0x76, 0x65, + 0x72, 0x76, 0x69, 0x65, 0x77, 0x22, 0x54, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, + 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, + 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x70, 0x0a, 0x0c, 0x46, + 0x69, 0x6c, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x76, 0x69, 0x65, 0x77, 0x12, 0x22, 0x0a, 0x05, 0x66, + 0x69, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6d, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, + 0x3c, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0d, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x82, 0x02, + 0x0a, 0x04, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x2d, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6d, + 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x08, 0x66, 0x69, 0x6c, + 0x65, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x34, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x6d, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x46, + 0x69, 0x6c, 0x65, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, + 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x22, 0x89, 0x01, 0x0a, 0x0a, + 0x46, 0x69, 0x6c, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x46, 0x49, + 0x4c, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x46, 0x49, 0x4c, 0x45, 0x5f, + 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x44, + 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, + 0x4e, 0x5f, 0x41, 0x44, 0x44, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x46, 0x49, 0x4c, 0x45, 0x5f, + 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x03, 0x12, + 0x16, 0x0a, 0x12, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, + 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x04, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x77, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, + 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, + 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x2d, 0x0a, 0x09, + 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x10, 0x2e, 0x6d, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4d, 0x65, 0x74, + 0x61, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x22, 0x43, 0x0a, 0x0f, 0x47, + 0x65, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, + 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x6d, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, + 0x22, 0x2a, 0x0a, 0x0c, 0x46, 0x69, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, + 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xa2, 0x02, 0x0a, + 0x08, 0x46, 0x69, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0x3a, 0x01, + 0x2f, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x49, 0x0a, 0x0d, 0x6d, + 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, + 0xba, 0x48, 0x05, 0xb2, 0x01, 0x02, 0x38, 0x01, 0x52, 0x0c, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x10, 0xba, 0x48, 0x0d, + 0x72, 0x0b, 0x32, 0x09, 0x30, 0x5b, 0x30, 0x2d, 0x37, 0x5d, 0x7b, 0x33, 0x7d, 0x52, 0x0b, 0x70, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, + 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x44, + 0x0a, 0x10, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x65, + 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6d, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, + 0x61, 0x48, 0x00, 0x52, 0x0f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, + 0x4d, 0x65, 0x74, 0x61, 0x42, 0x0b, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x22, 0x9f, 0x01, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6d, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x46, + 0x69, 0x6c, 0x65, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x30, 0x0a, 0x08, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x73, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x36, 0x0a, 0x0c, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4d, + 0x65, 0x74, 0x61, 0x22, 0x43, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x69, 0x6c, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x09, 0x66, 0x69, 0x6c, + 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x08, + 0x66, 0x69, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x22, 0xfb, 0x02, 0x0a, 0x0f, 0x43, 0x65, 0x72, + 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x2e, 0x0a, 0x0d, + 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x42, 0x09, 0xba, 0x48, 0x06, 0x7a, 0x04, 0x10, 0x00, 0x18, 0x15, 0x52, 0x0c, + 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x28, 0x0a, 0x06, + 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x58, 0x35, 0x30, 0x39, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x06, + 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x58, 0x35, 0x30, 0x39, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x12, 0x33, 0x0a, 0x04, 0x73, 0x61, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1f, 0x2e, 0x6d, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x52, 0x04, 0x73, 0x61, 0x6e, 0x73, 0x12, 0x2e, 0x0a, 0x05, 0x64, 0x61, 0x74, 0x65, 0x73, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6d, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x65, 0x73, + 0x52, 0x05, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x4b, 0x0a, 0x13, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x6d, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, + 0x52, 0x12, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x41, 0x6c, 0x67, 0x6f, 0x72, + 0x69, 0x74, 0x68, 0x6d, 0x12, 0x30, 0x0a, 0x14, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, + 0x65, 0x79, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x12, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x41, 0x6c, 0x67, + 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x22, 0x4e, 0x0a, 0x10, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x6f, + 0x74, 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, + 0x6e, 0x6f, 0x74, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x74, + 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6e, 0x6f, + 0x74, 0x41, 0x66, 0x74, 0x65, 0x72, 0x22, 0x59, 0x0a, 0x17, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x6e, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x64, 0x6e, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x21, + 0x0a, 0x0c, 0x69, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, + 0x73, 0x22, 0xac, 0x04, 0x0a, 0x08, 0x58, 0x35, 0x30, 0x39, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x28, + 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, + 0x0e, 0xba, 0x48, 0x0b, 0x92, 0x01, 0x08, 0x22, 0x06, 0x72, 0x04, 0x10, 0x02, 0x18, 0x02, 0x52, + 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x30, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x0c, + 0xba, 0x48, 0x09, 0x92, 0x01, 0x06, 0x22, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x6f, 0x72, + 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3d, 0x0a, 0x13, 0x6f, 0x72, + 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x75, 0x6e, 0x69, + 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x42, 0x0c, 0xba, 0x48, 0x09, 0x92, 0x01, 0x06, 0x22, + 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x12, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x28, 0x0a, 0x08, 0x6c, 0x6f, 0x63, + 0x61, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x42, 0x0c, 0xba, 0x48, 0x09, + 0x92, 0x01, 0x06, 0x22, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x6c, + 0x69, 0x74, 0x79, 0x12, 0x28, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x18, + 0x05, 0x20, 0x03, 0x28, 0x09, 0x42, 0x0c, 0xba, 0x48, 0x09, 0x92, 0x01, 0x06, 0x22, 0x04, 0x72, + 0x02, 0x10, 0x01, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x12, 0x33, 0x0a, + 0x0e, 0x73, 0x74, 0x72, 0x65, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x09, 0x42, 0x0c, 0xba, 0x48, 0x09, 0x92, 0x01, 0x06, 0x22, 0x04, 0x72, + 0x02, 0x10, 0x01, 0x52, 0x0d, 0x73, 0x74, 0x72, 0x65, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x2d, 0x0a, 0x0b, 0x70, 0x6f, 0x73, 0x74, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x64, + 0x65, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x42, 0x0c, 0xba, 0x48, 0x09, 0x92, 0x01, 0x06, 0x22, + 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x70, 0x6f, 0x73, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x64, + 0x65, 0x12, 0x2e, 0x0a, 0x0d, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x5f, 0x6e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x09, 0xba, 0x48, 0x06, 0x72, 0x04, 0x10, + 0x00, 0x18, 0x15, 0x52, 0x0c, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x4e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x12, 0x28, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, + 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x33, 0x0a, 0x05, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6d, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x41, 0x6e, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x12, 0x3e, 0x0a, 0x0b, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, + 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6d, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x41, 0x6e, 0x64, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x72, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x73, + 0x22, 0x53, 0x0a, 0x15, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x41, 0x6e, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, + 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2a, 0x8a, 0x03, 0x0a, 0x12, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x1f, 0x0a, 0x1b, + 0x53, 0x49, 0x47, 0x4e, 0x41, 0x54, 0x55, 0x52, 0x45, 0x5f, 0x41, 0x4c, 0x47, 0x4f, 0x52, 0x49, + 0x54, 0x48, 0x4d, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x10, 0x0a, + 0x0c, 0x4d, 0x44, 0x32, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x52, 0x53, 0x41, 0x10, 0x01, 0x12, + 0x10, 0x0a, 0x0c, 0x4d, 0x44, 0x35, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x52, 0x53, 0x41, 0x10, + 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x48, 0x41, 0x31, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x52, + 0x53, 0x41, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x5f, 0x57, + 0x49, 0x54, 0x48, 0x5f, 0x52, 0x53, 0x41, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x48, 0x41, + 0x33, 0x38, 0x34, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x52, 0x53, 0x41, 0x10, 0x05, 0x12, 0x13, + 0x0a, 0x0f, 0x53, 0x48, 0x41, 0x35, 0x31, 0x32, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x52, 0x53, + 0x41, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x44, 0x53, 0x41, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, + 0x53, 0x48, 0x41, 0x31, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x44, 0x53, 0x41, 0x5f, 0x57, 0x49, + 0x54, 0x48, 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, 0x08, 0x12, 0x13, 0x0a, 0x0f, 0x45, + 0x43, 0x44, 0x53, 0x41, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x53, 0x48, 0x41, 0x31, 0x10, 0x09, + 0x12, 0x15, 0x0a, 0x11, 0x45, 0x43, 0x44, 0x53, 0x41, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x53, + 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, 0x0a, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x43, 0x44, 0x53, 0x41, + 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x53, 0x48, 0x41, 0x33, 0x38, 0x34, 0x10, 0x0b, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x43, 0x44, 0x53, 0x41, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x53, 0x48, 0x41, - 0x32, 0x35, 0x36, 0x10, 0x0a, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x43, 0x44, 0x53, 0x41, 0x5f, 0x57, - 0x49, 0x54, 0x48, 0x5f, 0x53, 0x48, 0x41, 0x33, 0x38, 0x34, 0x10, 0x0b, 0x12, 0x15, 0x0a, 0x11, - 0x45, 0x43, 0x44, 0x53, 0x41, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x53, 0x48, 0x41, 0x35, 0x31, - 0x32, 0x10, 0x0c, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x5f, 0x57, 0x49, - 0x54, 0x48, 0x5f, 0x52, 0x53, 0x41, 0x5f, 0x50, 0x53, 0x53, 0x10, 0x0d, 0x12, 0x17, 0x0a, 0x13, - 0x53, 0x48, 0x41, 0x33, 0x38, 0x34, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x52, 0x53, 0x41, 0x5f, - 0x50, 0x53, 0x53, 0x10, 0x0e, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x48, 0x41, 0x35, 0x31, 0x32, 0x5f, - 0x57, 0x49, 0x54, 0x48, 0x5f, 0x52, 0x53, 0x41, 0x5f, 0x50, 0x53, 0x53, 0x10, 0x0f, 0x12, 0x10, - 0x0a, 0x0c, 0x50, 0x55, 0x52, 0x45, 0x5f, 0x45, 0x44, 0x32, 0x35, 0x35, 0x31, 0x39, 0x10, 0x10, - 0x32, 0xaf, 0x02, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x48, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x76, 0x69, 0x65, 0x77, 0x12, - 0x1a, 0x2e, 0x6d, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x76, 0x65, 0x72, - 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6d, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x76, 0x69, 0x65, 0x77, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x0e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x76, 0x69, 0x65, 0x77, 0x12, 0x1d, 0x2e, 0x6d, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x76, 0x65, 0x72, - 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6d, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x76, - 0x69, 0x65, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3c, 0x0a, - 0x07, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x16, 0x2e, 0x6d, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x17, 0x2e, 0x6d, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0a, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x19, 0x2e, 0x6d, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6d, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x42, 0x08, 0x5a, 0x06, 0x6d, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x35, 0x31, 0x32, 0x10, 0x0c, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x5f, + 0x57, 0x49, 0x54, 0x48, 0x5f, 0x52, 0x53, 0x41, 0x5f, 0x50, 0x53, 0x53, 0x10, 0x0d, 0x12, 0x17, + 0x0a, 0x13, 0x53, 0x48, 0x41, 0x33, 0x38, 0x34, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x52, 0x53, + 0x41, 0x5f, 0x50, 0x53, 0x53, 0x10, 0x0e, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x48, 0x41, 0x35, 0x31, + 0x32, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x52, 0x53, 0x41, 0x5f, 0x50, 0x53, 0x53, 0x10, 0x0f, + 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x55, 0x52, 0x45, 0x5f, 0x45, 0x44, 0x32, 0x35, 0x35, 0x31, 0x39, + 0x10, 0x10, 0x32, 0xaf, 0x02, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x48, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x76, 0x69, 0x65, + 0x77, 0x12, 0x1a, 0x2e, 0x6d, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x76, + 0x65, 0x72, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, + 0x6d, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x76, 0x69, + 0x65, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x0e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x76, 0x69, 0x65, 0x77, 0x12, 0x1d, + 0x2e, 0x6d, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x76, + 0x65, 0x72, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, + 0x6d, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x76, 0x65, + 0x72, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x3c, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x16, 0x2e, 0x6d, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6d, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x46, + 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, + 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x19, 0x2e, 0x6d, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6d, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x42, 0x08, 0x5a, 0x06, 0x6d, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1622,39 +1619,40 @@ var file_mpi_v1_files_proto_depIdxs = []int32{ 7, // 2: mpi.v1.GetOverviewResponse.overview:type_name -> mpi.v1.FileOverview 20, // 3: mpi.v1.UpdateOverviewRequest.message_meta:type_name -> mpi.v1.MessageMeta 7, // 4: mpi.v1.UpdateOverviewRequest.overview:type_name -> mpi.v1.FileOverview - 8, // 5: mpi.v1.FileOverview.files:type_name -> mpi.v1.File - 6, // 6: mpi.v1.FileOverview.config_version:type_name -> mpi.v1.ConfigVersion - 12, // 7: mpi.v1.File.file_meta:type_name -> mpi.v1.FileMeta - 1, // 8: mpi.v1.File.action:type_name -> mpi.v1.File.FileAction - 20, // 9: mpi.v1.GetFileRequest.message_meta:type_name -> mpi.v1.MessageMeta - 12, // 10: mpi.v1.GetFileRequest.file_meta:type_name -> mpi.v1.FileMeta - 11, // 11: mpi.v1.GetFileResponse.contents:type_name -> mpi.v1.FileContents - 21, // 12: mpi.v1.FileMeta.modified_time:type_name -> google.protobuf.Timestamp - 15, // 13: mpi.v1.FileMeta.certificate_meta:type_name -> mpi.v1.CertificateMeta - 8, // 14: mpi.v1.UpdateFileRequest.file:type_name -> mpi.v1.File - 11, // 15: mpi.v1.UpdateFileRequest.contents:type_name -> mpi.v1.FileContents - 20, // 16: mpi.v1.UpdateFileRequest.message_meta:type_name -> mpi.v1.MessageMeta - 12, // 17: mpi.v1.UpdateFileResponse.file_meta:type_name -> mpi.v1.FileMeta - 18, // 18: mpi.v1.CertificateMeta.issuer:type_name -> mpi.v1.X509Name - 18, // 19: mpi.v1.CertificateMeta.subject:type_name -> mpi.v1.X509Name - 17, // 20: mpi.v1.CertificateMeta.sans:type_name -> mpi.v1.SubjectAlternativeNames - 16, // 21: mpi.v1.CertificateMeta.dates:type_name -> mpi.v1.CertificateDates - 0, // 22: mpi.v1.CertificateMeta.signature_algorithm:type_name -> mpi.v1.SignatureAlgorithm - 19, // 23: mpi.v1.X509Name.names:type_name -> mpi.v1.AttributeTypeAndValue - 19, // 24: mpi.v1.X509Name.extra_names:type_name -> mpi.v1.AttributeTypeAndValue - 2, // 25: mpi.v1.FileService.GetOverview:input_type -> mpi.v1.GetOverviewRequest - 4, // 26: mpi.v1.FileService.UpdateOverview:input_type -> mpi.v1.UpdateOverviewRequest - 9, // 27: mpi.v1.FileService.GetFile:input_type -> mpi.v1.GetFileRequest - 13, // 28: mpi.v1.FileService.UpdateFile:input_type -> mpi.v1.UpdateFileRequest - 3, // 29: mpi.v1.FileService.GetOverview:output_type -> mpi.v1.GetOverviewResponse - 5, // 30: mpi.v1.FileService.UpdateOverview:output_type -> mpi.v1.UpdateOverviewResponse - 10, // 31: mpi.v1.FileService.GetFile:output_type -> mpi.v1.GetFileResponse - 14, // 32: mpi.v1.FileService.UpdateFile:output_type -> mpi.v1.UpdateFileResponse - 29, // [29:33] is the sub-list for method output_type - 25, // [25:29] is the sub-list for method input_type - 25, // [25:25] is the sub-list for extension type_name - 25, // [25:25] is the sub-list for extension extendee - 0, // [0:25] is the sub-list for field type_name + 7, // 5: mpi.v1.UpdateOverviewResponse.overview:type_name -> mpi.v1.FileOverview + 8, // 6: mpi.v1.FileOverview.files:type_name -> mpi.v1.File + 6, // 7: mpi.v1.FileOverview.config_version:type_name -> mpi.v1.ConfigVersion + 12, // 8: mpi.v1.File.file_meta:type_name -> mpi.v1.FileMeta + 1, // 9: mpi.v1.File.action:type_name -> mpi.v1.File.FileAction + 20, // 10: mpi.v1.GetFileRequest.message_meta:type_name -> mpi.v1.MessageMeta + 12, // 11: mpi.v1.GetFileRequest.file_meta:type_name -> mpi.v1.FileMeta + 11, // 12: mpi.v1.GetFileResponse.contents:type_name -> mpi.v1.FileContents + 21, // 13: mpi.v1.FileMeta.modified_time:type_name -> google.protobuf.Timestamp + 15, // 14: mpi.v1.FileMeta.certificate_meta:type_name -> mpi.v1.CertificateMeta + 8, // 15: mpi.v1.UpdateFileRequest.file:type_name -> mpi.v1.File + 11, // 16: mpi.v1.UpdateFileRequest.contents:type_name -> mpi.v1.FileContents + 20, // 17: mpi.v1.UpdateFileRequest.message_meta:type_name -> mpi.v1.MessageMeta + 12, // 18: mpi.v1.UpdateFileResponse.file_meta:type_name -> mpi.v1.FileMeta + 18, // 19: mpi.v1.CertificateMeta.issuer:type_name -> mpi.v1.X509Name + 18, // 20: mpi.v1.CertificateMeta.subject:type_name -> mpi.v1.X509Name + 17, // 21: mpi.v1.CertificateMeta.sans:type_name -> mpi.v1.SubjectAlternativeNames + 16, // 22: mpi.v1.CertificateMeta.dates:type_name -> mpi.v1.CertificateDates + 0, // 23: mpi.v1.CertificateMeta.signature_algorithm:type_name -> mpi.v1.SignatureAlgorithm + 19, // 24: mpi.v1.X509Name.names:type_name -> mpi.v1.AttributeTypeAndValue + 19, // 25: mpi.v1.X509Name.extra_names:type_name -> mpi.v1.AttributeTypeAndValue + 2, // 26: mpi.v1.FileService.GetOverview:input_type -> mpi.v1.GetOverviewRequest + 4, // 27: mpi.v1.FileService.UpdateOverview:input_type -> mpi.v1.UpdateOverviewRequest + 9, // 28: mpi.v1.FileService.GetFile:input_type -> mpi.v1.GetFileRequest + 13, // 29: mpi.v1.FileService.UpdateFile:input_type -> mpi.v1.UpdateFileRequest + 3, // 30: mpi.v1.FileService.GetOverview:output_type -> mpi.v1.GetOverviewResponse + 5, // 31: mpi.v1.FileService.UpdateOverview:output_type -> mpi.v1.UpdateOverviewResponse + 10, // 32: mpi.v1.FileService.GetFile:output_type -> mpi.v1.GetFileResponse + 14, // 33: mpi.v1.FileService.UpdateFile:output_type -> mpi.v1.UpdateFileResponse + 30, // [30:34] is the sub-list for method output_type + 26, // [26:30] is the sub-list for method input_type + 26, // [26:26] is the sub-list for extension type_name + 26, // [26:26] is the sub-list for extension extendee + 0, // [0:26] is the sub-list for field type_name } func init() { file_mpi_v1_files_proto_init() } diff --git a/api/grpc/mpi/v1/files.pb.validate.go b/api/grpc/mpi/v1/files.pb.validate.go index 25095e599..a912068e9 100644 --- a/api/grpc/mpi/v1/files.pb.validate.go +++ b/api/grpc/mpi/v1/files.pb.validate.go @@ -508,6 +508,35 @@ func (m *UpdateOverviewResponse) validate(all bool) error { var errors []error + if all { + switch v := interface{}(m.GetOverview()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UpdateOverviewResponseValidationError{ + field: "Overview", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UpdateOverviewResponseValidationError{ + field: "Overview", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOverview()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return UpdateOverviewResponseValidationError{ + field: "Overview", + reason: "embedded message failed validation", + cause: err, + } + } + } + if len(errors) > 0 { return UpdateOverviewResponseMultiError(errors) } diff --git a/api/grpc/mpi/v1/files.proto b/api/grpc/mpi/v1/files.proto index 816043f39..e8168e1bd 100644 --- a/api/grpc/mpi/v1/files.proto +++ b/api/grpc/mpi/v1/files.proto @@ -51,8 +51,11 @@ message UpdateOverviewRequest { FileOverview overview = 2; } -// Represents a the response from an UpdateOverviewRequest - intentionally left empty -message UpdateOverviewResponse {} +// Represents a the response from an UpdateOverviewRequest +message UpdateOverviewResponse { + // The file overview with the list of files that were uploaded + FileOverview overview = 1; +} // Represents a specific configuration version associated with an instance message ConfigVersion { diff --git a/docs/proto/protos.md b/docs/proto/protos.md index 6875763a0..408c23385 100644 --- a/docs/proto/protos.md +++ b/docs/proto/protos.md @@ -481,7 +481,12 @@ Represents a list of logically grouped files that have changed e.g. configuratio ### UpdateOverviewResponse -Represents a the response from an UpdateOverviewRequest - intentionally left empty +Represents a the response from an UpdateOverviewRequest + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| overview | [FileOverview](#mpi-v1-FileOverview) | | The file overview with the list of files that were uploaded | diff --git a/internal/file/file_manager_service.go b/internal/file/file_manager_service.go index cc55f9876..af9f782b7 100644 --- a/internal/file/file_manager_service.go +++ b/internal/file/file_manager_service.go @@ -10,7 +10,9 @@ import ( "errors" "fmt" "log/slog" + "maps" "os" + "slices" "sync" "sync/atomic" @@ -35,13 +37,15 @@ import ( //go:generate go run github.com/maxbrunsfeld/counterfeiter/v6@v6.8.1 -generate //counterfeiter:generate . fileManagerServiceInterface +const maxAttempts = 5 + type ( fileOperator interface { Write(ctx context.Context, fileContent []byte, file *mpi.FileMeta) error } fileManagerServiceInterface interface { - UpdateOverview(ctx context.Context, instanceID string, filesToUpdate []*mpi.File) error + UpdateOverview(ctx context.Context, instanceID string, filesToUpdate []*mpi.File, iteration int) error ConfigApply(ctx context.Context, configApplyRequest *mpi.ConfigApplyRequest) (writeStatus model.WriteStatus, err error) Rollback(ctx context.Context, instanceID string) error @@ -87,18 +91,21 @@ func (fms *FileManagerService) UpdateOverview( ctx context.Context, instanceID string, filesToUpdate []*mpi.File, + iteration int, ) error { correlationID := logger.GetCorrelationID(ctx) - requestCorrelationID := logger.GenerateCorrelationID() - newCtx := context.WithValue(ctx, logger.CorrelationIDContextKey, requestCorrelationID) - slog.InfoContext(newCtx, "Updating file overview", "instance_id", instanceID, - "parent_correlation_id", correlationID) + // error case for the UpdateOverview attempts + if iteration > maxAttempts { + return errors.New("too many UpdateOverview attempts") + } + + newCtx, correlationID := fms.setupIdentifiers(ctx, iteration) request := &mpi.UpdateOverviewRequest{ MessageMeta: &mpi.MessageMeta{ MessageId: proto.GenerateMessageID(), - CorrelationId: requestCorrelationID.Value.String(), + CorrelationId: correlationID, Timestamp: timestamppb.Now(), }, Overview: &mpi.FileOverview{ @@ -147,9 +154,57 @@ func (fms *FileManagerService) UpdateOverview( slog.DebugContext(newCtx, "UpdateOverview response", "response", response) + if response.GetOverview() == nil { + slog.Debug("UpdateOverview response is empty") + return nil + } + delta := files.ConvertToMapOfFiles(response.GetOverview().GetFiles()) + + if len(delta) != 0 { + return fms.updateFiles(ctx, delta, instanceID, iteration) + } + return err } +func (fms *FileManagerService) setupIdentifiers(ctx context.Context, iteration int) (context.Context, string) { + correlationID := logger.GetCorrelationID(ctx) + var requestCorrelationID slog.Attr + + if iteration == 0 { + requestCorrelationID = logger.GenerateCorrelationID() + } else { + requestCorrelationID = logger.GetCorrelationIDAttr(ctx) + } + + newCtx := context.WithValue(ctx, logger.CorrelationIDContextKey, requestCorrelationID) + slog.InfoContext(newCtx, "Updating file overview", "instance_id", logger.GetCorrelationIDAttr(ctx), + "parent_correlation_id", correlationID) + + return newCtx, correlationID +} + +func (fms *FileManagerService) updateFiles( + ctx context.Context, + delta map[string]*mpi.File, + instanceID string, + iteration int, +) error { + diffFiles := slices.Collect(maps.Values(delta)) + + for _, file := range diffFiles { + updateErr := fms.UpdateFile(ctx, instanceID, file) + if updateErr != nil { + return updateErr + } + } + + iteration++ + slog.Debug("Updating file overview", "attempt_number", iteration) + + return fms.UpdateOverview(ctx, instanceID, diffFiles, iteration) +} + func (fms *FileManagerService) UpdateFile( ctx context.Context, instanceID string, diff --git a/internal/file/file_manager_service_test.go b/internal/file/file_manager_service_test.go index 13aaad896..ee058b1a3 100644 --- a/internal/file/file_manager_service_test.go +++ b/internal/file/file_manager_service_test.go @@ -29,9 +29,26 @@ import ( func TestFileManagerService_UpdateOverview(t *testing.T) { ctx := context.Background() - fileMeta := protos.FileMeta("/etc/nginx/nginx.conf", "") + filePath := filepath.Join(t.TempDir(), "nginx.conf") + fileMeta := protos.FileMeta(filePath, "") + + fileContent := []byte("location /test {\n return 200 \"Test location\\n\";\n}") + fileHash := files.GenerateHash(fileContent) + + fileWriteErr := os.WriteFile(filePath, fileContent, 0o600) + require.NoError(t, fileWriteErr) + + overview := protos.FileOverview(filePath, fileHash) fakeFileServiceClient := &v1fakes.FakeFileServiceClient{} + fakeFileServiceClient.UpdateOverviewReturnsOnCall(0, &mpi.UpdateOverviewResponse{ + Overview: overview, + }, nil) + + fakeFileServiceClient.UpdateOverviewReturnsOnCall(1, &mpi.UpdateOverviewResponse{}, nil) + + fakeFileServiceClient.UpdateFileReturns(&mpi.UpdateFileResponse{}, nil) + fileManagerService := NewFileManagerService(fakeFileServiceClient, types.AgentConfig()) fileManagerService.SetIsConnected(true) @@ -39,10 +56,48 @@ func TestFileManagerService_UpdateOverview(t *testing.T) { { FileMeta: fileMeta, }, - }) + }, 0) require.NoError(t, err) - assert.Equal(t, 1, fakeFileServiceClient.UpdateOverviewCallCount()) + assert.Equal(t, 2, fakeFileServiceClient.UpdateOverviewCallCount()) +} + +func TestFileManagerService_UpdateOverview_MaxIterations(t *testing.T) { + ctx := context.Background() + + filePath := filepath.Join(t.TempDir(), "nginx.conf") + fileMeta := protos.FileMeta(filePath, "") + + fileContent := []byte("location /test {\n return 200 \"Test location\\n\";\n}") + fileHash := files.GenerateHash(fileContent) + + fileWriteErr := os.WriteFile(filePath, fileContent, 0o600) + require.NoError(t, fileWriteErr) + + overview := protos.FileOverview(filePath, fileHash) + + fakeFileServiceClient := &v1fakes.FakeFileServiceClient{} + + // do 5 iterations + for i := 0; i <= 5; i++ { + fakeFileServiceClient.UpdateOverviewReturnsOnCall(i, &mpi.UpdateOverviewResponse{ + Overview: overview, + }, nil) + } + + fakeFileServiceClient.UpdateFileReturns(&mpi.UpdateFileResponse{}, nil) + + fileManagerService := NewFileManagerService(fakeFileServiceClient, types.AgentConfig()) + fileManagerService.SetIsConnected(true) + + err := fileManagerService.UpdateOverview(ctx, "123", []*mpi.File{ + { + FileMeta: fileMeta, + }, + }, 0) + + require.Error(t, err) + assert.Equal(t, "too many UpdateOverview attempts", err.Error()) } func TestFileManagerService_UpdateFile(t *testing.T) { diff --git a/internal/file/file_plugin.go b/internal/file/file_plugin.go index 1b9356548..8acfdef00 100644 --- a/internal/file/file_plugin.go +++ b/internal/file/file_plugin.go @@ -259,7 +259,7 @@ func (fp *FilePlugin) handleNginxConfigUpdate(ctx context.Context, msg *bus.Mess fp.fileManagerService.UpdateCurrentFilesOnDisk(files.ConvertToMapOfFiles(nginxConfigContext.Files)) - err := fp.fileManagerService.UpdateOverview(ctx, nginxConfigContext.InstanceID, nginxConfigContext.Files) + err := fp.fileManagerService.UpdateOverview(ctx, nginxConfigContext.InstanceID, nginxConfigContext.Files, 0) if err != nil { slog.ErrorContext( ctx, diff --git a/internal/file/file_plugin_test.go b/internal/file/file_plugin_test.go index 27c29949b..e3e2270a5 100644 --- a/internal/file/file_plugin_test.go +++ b/internal/file/file_plugin_test.go @@ -77,6 +77,10 @@ func TestFilePlugin_Process_NginxConfigUpdateTopic(t *testing.T) { } fakeFileServiceClient := &v1fakes.FakeFileServiceClient{} + fakeFileServiceClient.UpdateOverviewReturns(&mpi.UpdateOverviewResponse{ + Overview: nil, + }, nil) + fakeGrpcConnection := &grpcfakes.FakeGrpcConnectionInterface{} fakeGrpcConnection.FileServiceClientReturns(fakeFileServiceClient) messagePipe := busfakes.NewFakeMessagePipe() diff --git a/internal/file/filefakes/fake_file_manager_service_interface.go b/internal/file/filefakes/fake_file_manager_service_interface.go index 96adf0e5a..4819613ca 100644 --- a/internal/file/filefakes/fake_file_manager_service_interface.go +++ b/internal/file/filefakes/fake_file_manager_service_interface.go @@ -79,12 +79,13 @@ type FakeFileManagerServiceInterface struct { updateFileReturnsOnCall map[int]struct { result1 error } - UpdateOverviewStub func(context.Context, string, []*v1.File) error + UpdateOverviewStub func(context.Context, string, []*v1.File, int) error updateOverviewMutex sync.RWMutex updateOverviewArgsForCall []struct { arg1 context.Context arg2 string arg3 []*v1.File + arg4 int } updateOverviewReturns struct { result1 error @@ -442,7 +443,7 @@ func (fake *FakeFileManagerServiceInterface) UpdateFileReturnsOnCall(i int, resu }{result1} } -func (fake *FakeFileManagerServiceInterface) UpdateOverview(arg1 context.Context, arg2 string, arg3 []*v1.File) error { +func (fake *FakeFileManagerServiceInterface) UpdateOverview(arg1 context.Context, arg2 string, arg3 []*v1.File, arg4 int) error { var arg3Copy []*v1.File if arg3 != nil { arg3Copy = make([]*v1.File, len(arg3)) @@ -454,13 +455,14 @@ func (fake *FakeFileManagerServiceInterface) UpdateOverview(arg1 context.Context arg1 context.Context arg2 string arg3 []*v1.File - }{arg1, arg2, arg3Copy}) + arg4 int + }{arg1, arg2, arg3Copy, arg4}) stub := fake.UpdateOverviewStub fakeReturns := fake.updateOverviewReturns - fake.recordInvocation("UpdateOverview", []interface{}{arg1, arg2, arg3Copy}) + fake.recordInvocation("UpdateOverview", []interface{}{arg1, arg2, arg3Copy, arg4}) fake.updateOverviewMutex.Unlock() if stub != nil { - return stub(arg1, arg2, arg3) + return stub(arg1, arg2, arg3, arg4) } if specificReturn { return ret.result1 @@ -474,17 +476,17 @@ func (fake *FakeFileManagerServiceInterface) UpdateOverviewCallCount() int { return len(fake.updateOverviewArgsForCall) } -func (fake *FakeFileManagerServiceInterface) UpdateOverviewCalls(stub func(context.Context, string, []*v1.File) error) { +func (fake *FakeFileManagerServiceInterface) UpdateOverviewCalls(stub func(context.Context, string, []*v1.File, int) error) { fake.updateOverviewMutex.Lock() defer fake.updateOverviewMutex.Unlock() fake.UpdateOverviewStub = stub } -func (fake *FakeFileManagerServiceInterface) UpdateOverviewArgsForCall(i int) (context.Context, string, []*v1.File) { +func (fake *FakeFileManagerServiceInterface) UpdateOverviewArgsForCall(i int) (context.Context, string, []*v1.File, int) { fake.updateOverviewMutex.RLock() defer fake.updateOverviewMutex.RUnlock() argsForCall := fake.updateOverviewArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 + return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4 } func (fake *FakeFileManagerServiceInterface) UpdateOverviewReturns(result1 error) { diff --git a/internal/logger/logger.go b/internal/logger/logger.go index ec7491f52..811d55820 100644 --- a/internal/logger/logger.go +++ b/internal/logger/logger.go @@ -131,8 +131,13 @@ func GetCorrelationID(ctx context.Context) string { func GetCorrelationIDAttr(ctx context.Context) slog.Attr { value, ok := ctx.Value(CorrelationIDContextKey).(slog.Attr) if !ok { - slog.Debug("Correlation ID not found in context") - return slog.Attr{} + correlationID := GenerateCorrelationID() + slog.Debug( + "Correlation ID not found in context, generating new correlation ID", + "correlation_id", + correlationID) + + return GenerateCorrelationID() } return value