diff --git a/plugin/proto/server.proto b/plugin/proto/server.proto new file mode 100644 index 0000000..fdef29b --- /dev/null +++ b/plugin/proto/server.proto @@ -0,0 +1,105 @@ +syntax = "proto3"; + +package pluginkubernetes.optimization.v1; +option go_package="github.com/kaytu-io/plugin-kubernetes-internal/plugin/proto/src/golang"; +import "google/protobuf/wrappers.proto"; + +// Requests + +message GcpComputeInstance { + string id = 1; + string zone = 2; + string machine_type = 3; +} + +message GcpComputeDisk { + string id = 1; + string zone = 2; + string region = 3; + string disk_type = 4; + google.protobuf.Int64Value size_gb = 5; + google.protobuf.Int64Value provisioned_iops = 6; +} + +message DataPoint { + google.protobuf.Int64Value start_time = 1; + google.protobuf.Int64Value end_time = 2; + double value = 3; +} + +message Metric { + repeated DataPoint data = 1; +} + +message DiskMetrics { + map metrics = 1; +} + +message GCPComputeOptimizationRequest { + google.protobuf.StringValue request_id = 1; + google.protobuf.StringValue cli_version = 2; + map identification = 3; + GcpComputeInstance instance = 4; + repeated GcpComputeDisk disks = 5; + map preferences = 6; + map metrics = 7; + map disks_metrics = 8; + bool loading = 9; + string region = 10; +} + +// Responses +message Usage { + google.protobuf.DoubleValue avg = 1; + google.protobuf.DoubleValue max = 2; + google.protobuf.DoubleValue min = 3; +} + +message RightsizingGcpComputeDisk { + string zone = 1; + string region = 2; + string disk_type = 3; + int64 disk_size = 4; + int64 read_iops_limit = 5; + int64 write_iops_limit = 6; + double read_throughput_limit = 7; + double write_throughput_limit = 8; + double cost = 9; +} + +message RightsizingGcpComputeInstance { + string zone = 1; + string region = 2; + string machine_type = 3; + string machine_family = 4; + int64 cpu = 5; + int64 memory_mb = 6; + double cost = 7; +} + +message GcpComputeInstanceRightsizingRecommendation { + RightsizingGcpComputeInstance current = 1; + RightsizingGcpComputeInstance recommended = 2; + Usage cpu = 3; + Usage memory = 4; + string description = 5; +} + +message GcpComputeDiskRecommendation { + RightsizingGcpComputeDisk current = 1; + RightsizingGcpComputeDisk recommended = 2; + Usage read_iops = 3; + Usage write_iops = 4; + Usage read_throughput = 5; + Usage write_throughput = 6; + string description = 7; +} + +message GCPComputeOptimizationResponse { + GcpComputeInstanceRightsizingRecommendation rightsizing = 1; + map volumes_rightsizing = 2; +} + +service Optimization { + rpc GCPComputeOptimization(GCPComputeOptimizationRequest) returns (GCPComputeOptimizationResponse); +} \ No newline at end of file diff --git a/plugin/proto/src/golang/server.pb.go b/plugin/proto/src/golang/server.pb.go new file mode 100644 index 0000000..63f1e3a --- /dev/null +++ b/plugin/proto/src/golang/server.pb.go @@ -0,0 +1,1478 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.1 +// protoc v3.12.4 +// source: plugin/proto/server.proto + +package golang + +import ( + wrappers "github.com/golang/protobuf/ptypes/wrappers" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GcpComputeInstance struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Zone string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"` + MachineType string `protobuf:"bytes,3,opt,name=machine_type,json=machineType,proto3" json:"machine_type,omitempty"` +} + +func (x *GcpComputeInstance) Reset() { + *x = GcpComputeInstance{} + if protoimpl.UnsafeEnabled { + mi := &file_plugin_proto_server_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GcpComputeInstance) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GcpComputeInstance) ProtoMessage() {} + +func (x *GcpComputeInstance) ProtoReflect() protoreflect.Message { + mi := &file_plugin_proto_server_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GcpComputeInstance.ProtoReflect.Descriptor instead. +func (*GcpComputeInstance) Descriptor() ([]byte, []int) { + return file_plugin_proto_server_proto_rawDescGZIP(), []int{0} +} + +func (x *GcpComputeInstance) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *GcpComputeInstance) GetZone() string { + if x != nil { + return x.Zone + } + return "" +} + +func (x *GcpComputeInstance) GetMachineType() string { + if x != nil { + return x.MachineType + } + return "" +} + +type GcpComputeDisk struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Zone string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"` + Region string `protobuf:"bytes,3,opt,name=region,proto3" json:"region,omitempty"` + DiskType string `protobuf:"bytes,4,opt,name=disk_type,json=diskType,proto3" json:"disk_type,omitempty"` + SizeGb *wrappers.Int64Value `protobuf:"bytes,5,opt,name=size_gb,json=sizeGb,proto3" json:"size_gb,omitempty"` + ProvisionedIops *wrappers.Int64Value `protobuf:"bytes,6,opt,name=provisioned_iops,json=provisionedIops,proto3" json:"provisioned_iops,omitempty"` +} + +func (x *GcpComputeDisk) Reset() { + *x = GcpComputeDisk{} + if protoimpl.UnsafeEnabled { + mi := &file_plugin_proto_server_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GcpComputeDisk) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GcpComputeDisk) ProtoMessage() {} + +func (x *GcpComputeDisk) ProtoReflect() protoreflect.Message { + mi := &file_plugin_proto_server_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GcpComputeDisk.ProtoReflect.Descriptor instead. +func (*GcpComputeDisk) Descriptor() ([]byte, []int) { + return file_plugin_proto_server_proto_rawDescGZIP(), []int{1} +} + +func (x *GcpComputeDisk) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *GcpComputeDisk) GetZone() string { + if x != nil { + return x.Zone + } + return "" +} + +func (x *GcpComputeDisk) GetRegion() string { + if x != nil { + return x.Region + } + return "" +} + +func (x *GcpComputeDisk) GetDiskType() string { + if x != nil { + return x.DiskType + } + return "" +} + +func (x *GcpComputeDisk) GetSizeGb() *wrappers.Int64Value { + if x != nil { + return x.SizeGb + } + return nil +} + +func (x *GcpComputeDisk) GetProvisionedIops() *wrappers.Int64Value { + if x != nil { + return x.ProvisionedIops + } + return nil +} + +type DataPoint struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + StartTime *wrappers.Int64Value `protobuf:"bytes,1,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + EndTime *wrappers.Int64Value `protobuf:"bytes,2,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` + Value float64 `protobuf:"fixed64,3,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *DataPoint) Reset() { + *x = DataPoint{} + if protoimpl.UnsafeEnabled { + mi := &file_plugin_proto_server_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DataPoint) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DataPoint) ProtoMessage() {} + +func (x *DataPoint) ProtoReflect() protoreflect.Message { + mi := &file_plugin_proto_server_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DataPoint.ProtoReflect.Descriptor instead. +func (*DataPoint) Descriptor() ([]byte, []int) { + return file_plugin_proto_server_proto_rawDescGZIP(), []int{2} +} + +func (x *DataPoint) GetStartTime() *wrappers.Int64Value { + if x != nil { + return x.StartTime + } + return nil +} + +func (x *DataPoint) GetEndTime() *wrappers.Int64Value { + if x != nil { + return x.EndTime + } + return nil +} + +func (x *DataPoint) GetValue() float64 { + if x != nil { + return x.Value + } + return 0 +} + +type Metric struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data []*DataPoint `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` +} + +func (x *Metric) Reset() { + *x = Metric{} + if protoimpl.UnsafeEnabled { + mi := &file_plugin_proto_server_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Metric) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Metric) ProtoMessage() {} + +func (x *Metric) ProtoReflect() protoreflect.Message { + mi := &file_plugin_proto_server_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Metric.ProtoReflect.Descriptor instead. +func (*Metric) Descriptor() ([]byte, []int) { + return file_plugin_proto_server_proto_rawDescGZIP(), []int{3} +} + +func (x *Metric) GetData() []*DataPoint { + if x != nil { + return x.Data + } + return nil +} + +type DiskMetrics struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metrics map[string]*Metric `protobuf:"bytes,1,rep,name=metrics,proto3" json:"metrics,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *DiskMetrics) Reset() { + *x = DiskMetrics{} + if protoimpl.UnsafeEnabled { + mi := &file_plugin_proto_server_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DiskMetrics) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DiskMetrics) ProtoMessage() {} + +func (x *DiskMetrics) ProtoReflect() protoreflect.Message { + mi := &file_plugin_proto_server_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DiskMetrics.ProtoReflect.Descriptor instead. +func (*DiskMetrics) Descriptor() ([]byte, []int) { + return file_plugin_proto_server_proto_rawDescGZIP(), []int{4} +} + +func (x *DiskMetrics) GetMetrics() map[string]*Metric { + if x != nil { + return x.Metrics + } + return nil +} + +type GCPComputeOptimizationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RequestId *wrappers.StringValue `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` + CliVersion *wrappers.StringValue `protobuf:"bytes,2,opt,name=cli_version,json=cliVersion,proto3" json:"cli_version,omitempty"` + Identification map[string]string `protobuf:"bytes,3,rep,name=identification,proto3" json:"identification,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Instance *GcpComputeInstance `protobuf:"bytes,4,opt,name=instance,proto3" json:"instance,omitempty"` + Disks []*GcpComputeDisk `protobuf:"bytes,5,rep,name=disks,proto3" json:"disks,omitempty"` + Preferences map[string]*wrappers.StringValue `protobuf:"bytes,6,rep,name=preferences,proto3" json:"preferences,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Metrics map[string]*Metric `protobuf:"bytes,7,rep,name=metrics,proto3" json:"metrics,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + DisksMetrics map[string]*DiskMetrics `protobuf:"bytes,8,rep,name=disks_metrics,json=disksMetrics,proto3" json:"disks_metrics,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Loading bool `protobuf:"varint,9,opt,name=loading,proto3" json:"loading,omitempty"` + Region string `protobuf:"bytes,10,opt,name=region,proto3" json:"region,omitempty"` +} + +func (x *GCPComputeOptimizationRequest) Reset() { + *x = GCPComputeOptimizationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_plugin_proto_server_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GCPComputeOptimizationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GCPComputeOptimizationRequest) ProtoMessage() {} + +func (x *GCPComputeOptimizationRequest) ProtoReflect() protoreflect.Message { + mi := &file_plugin_proto_server_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GCPComputeOptimizationRequest.ProtoReflect.Descriptor instead. +func (*GCPComputeOptimizationRequest) Descriptor() ([]byte, []int) { + return file_plugin_proto_server_proto_rawDescGZIP(), []int{5} +} + +func (x *GCPComputeOptimizationRequest) GetRequestId() *wrappers.StringValue { + if x != nil { + return x.RequestId + } + return nil +} + +func (x *GCPComputeOptimizationRequest) GetCliVersion() *wrappers.StringValue { + if x != nil { + return x.CliVersion + } + return nil +} + +func (x *GCPComputeOptimizationRequest) GetIdentification() map[string]string { + if x != nil { + return x.Identification + } + return nil +} + +func (x *GCPComputeOptimizationRequest) GetInstance() *GcpComputeInstance { + if x != nil { + return x.Instance + } + return nil +} + +func (x *GCPComputeOptimizationRequest) GetDisks() []*GcpComputeDisk { + if x != nil { + return x.Disks + } + return nil +} + +func (x *GCPComputeOptimizationRequest) GetPreferences() map[string]*wrappers.StringValue { + if x != nil { + return x.Preferences + } + return nil +} + +func (x *GCPComputeOptimizationRequest) GetMetrics() map[string]*Metric { + if x != nil { + return x.Metrics + } + return nil +} + +func (x *GCPComputeOptimizationRequest) GetDisksMetrics() map[string]*DiskMetrics { + if x != nil { + return x.DisksMetrics + } + return nil +} + +func (x *GCPComputeOptimizationRequest) GetLoading() bool { + if x != nil { + return x.Loading + } + return false +} + +func (x *GCPComputeOptimizationRequest) GetRegion() string { + if x != nil { + return x.Region + } + return "" +} + +// Responses +type Usage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Avg *wrappers.DoubleValue `protobuf:"bytes,1,opt,name=avg,proto3" json:"avg,omitempty"` + Max *wrappers.DoubleValue `protobuf:"bytes,2,opt,name=max,proto3" json:"max,omitempty"` + Min *wrappers.DoubleValue `protobuf:"bytes,3,opt,name=min,proto3" json:"min,omitempty"` +} + +func (x *Usage) Reset() { + *x = Usage{} + if protoimpl.UnsafeEnabled { + mi := &file_plugin_proto_server_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Usage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Usage) ProtoMessage() {} + +func (x *Usage) ProtoReflect() protoreflect.Message { + mi := &file_plugin_proto_server_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Usage.ProtoReflect.Descriptor instead. +func (*Usage) Descriptor() ([]byte, []int) { + return file_plugin_proto_server_proto_rawDescGZIP(), []int{6} +} + +func (x *Usage) GetAvg() *wrappers.DoubleValue { + if x != nil { + return x.Avg + } + return nil +} + +func (x *Usage) GetMax() *wrappers.DoubleValue { + if x != nil { + return x.Max + } + return nil +} + +func (x *Usage) GetMin() *wrappers.DoubleValue { + if x != nil { + return x.Min + } + return nil +} + +type RightsizingGcpComputeDisk struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Zone string `protobuf:"bytes,1,opt,name=zone,proto3" json:"zone,omitempty"` + Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty"` + DiskType string `protobuf:"bytes,3,opt,name=disk_type,json=diskType,proto3" json:"disk_type,omitempty"` + DiskSize int64 `protobuf:"varint,4,opt,name=disk_size,json=diskSize,proto3" json:"disk_size,omitempty"` + ReadIopsLimit int64 `protobuf:"varint,5,opt,name=read_iops_limit,json=readIopsLimit,proto3" json:"read_iops_limit,omitempty"` + WriteIopsLimit int64 `protobuf:"varint,6,opt,name=write_iops_limit,json=writeIopsLimit,proto3" json:"write_iops_limit,omitempty"` + ReadThroughputLimit float64 `protobuf:"fixed64,7,opt,name=read_throughput_limit,json=readThroughputLimit,proto3" json:"read_throughput_limit,omitempty"` + WriteThroughputLimit float64 `protobuf:"fixed64,8,opt,name=write_throughput_limit,json=writeThroughputLimit,proto3" json:"write_throughput_limit,omitempty"` + Cost float64 `protobuf:"fixed64,9,opt,name=cost,proto3" json:"cost,omitempty"` +} + +func (x *RightsizingGcpComputeDisk) Reset() { + *x = RightsizingGcpComputeDisk{} + if protoimpl.UnsafeEnabled { + mi := &file_plugin_proto_server_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RightsizingGcpComputeDisk) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RightsizingGcpComputeDisk) ProtoMessage() {} + +func (x *RightsizingGcpComputeDisk) ProtoReflect() protoreflect.Message { + mi := &file_plugin_proto_server_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RightsizingGcpComputeDisk.ProtoReflect.Descriptor instead. +func (*RightsizingGcpComputeDisk) Descriptor() ([]byte, []int) { + return file_plugin_proto_server_proto_rawDescGZIP(), []int{7} +} + +func (x *RightsizingGcpComputeDisk) GetZone() string { + if x != nil { + return x.Zone + } + return "" +} + +func (x *RightsizingGcpComputeDisk) GetRegion() string { + if x != nil { + return x.Region + } + return "" +} + +func (x *RightsizingGcpComputeDisk) GetDiskType() string { + if x != nil { + return x.DiskType + } + return "" +} + +func (x *RightsizingGcpComputeDisk) GetDiskSize() int64 { + if x != nil { + return x.DiskSize + } + return 0 +} + +func (x *RightsizingGcpComputeDisk) GetReadIopsLimit() int64 { + if x != nil { + return x.ReadIopsLimit + } + return 0 +} + +func (x *RightsizingGcpComputeDisk) GetWriteIopsLimit() int64 { + if x != nil { + return x.WriteIopsLimit + } + return 0 +} + +func (x *RightsizingGcpComputeDisk) GetReadThroughputLimit() float64 { + if x != nil { + return x.ReadThroughputLimit + } + return 0 +} + +func (x *RightsizingGcpComputeDisk) GetWriteThroughputLimit() float64 { + if x != nil { + return x.WriteThroughputLimit + } + return 0 +} + +func (x *RightsizingGcpComputeDisk) GetCost() float64 { + if x != nil { + return x.Cost + } + return 0 +} + +type RightsizingGcpComputeInstance struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Zone string `protobuf:"bytes,1,opt,name=zone,proto3" json:"zone,omitempty"` + Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty"` + MachineType string `protobuf:"bytes,3,opt,name=machine_type,json=machineType,proto3" json:"machine_type,omitempty"` + MachineFamily string `protobuf:"bytes,4,opt,name=machine_family,json=machineFamily,proto3" json:"machine_family,omitempty"` + Cpu int64 `protobuf:"varint,5,opt,name=cpu,proto3" json:"cpu,omitempty"` + MemoryMb int64 `protobuf:"varint,6,opt,name=memory_mb,json=memoryMb,proto3" json:"memory_mb,omitempty"` + Cost float64 `protobuf:"fixed64,7,opt,name=cost,proto3" json:"cost,omitempty"` +} + +func (x *RightsizingGcpComputeInstance) Reset() { + *x = RightsizingGcpComputeInstance{} + if protoimpl.UnsafeEnabled { + mi := &file_plugin_proto_server_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RightsizingGcpComputeInstance) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RightsizingGcpComputeInstance) ProtoMessage() {} + +func (x *RightsizingGcpComputeInstance) ProtoReflect() protoreflect.Message { + mi := &file_plugin_proto_server_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RightsizingGcpComputeInstance.ProtoReflect.Descriptor instead. +func (*RightsizingGcpComputeInstance) Descriptor() ([]byte, []int) { + return file_plugin_proto_server_proto_rawDescGZIP(), []int{8} +} + +func (x *RightsizingGcpComputeInstance) GetZone() string { + if x != nil { + return x.Zone + } + return "" +} + +func (x *RightsizingGcpComputeInstance) GetRegion() string { + if x != nil { + return x.Region + } + return "" +} + +func (x *RightsizingGcpComputeInstance) GetMachineType() string { + if x != nil { + return x.MachineType + } + return "" +} + +func (x *RightsizingGcpComputeInstance) GetMachineFamily() string { + if x != nil { + return x.MachineFamily + } + return "" +} + +func (x *RightsizingGcpComputeInstance) GetCpu() int64 { + if x != nil { + return x.Cpu + } + return 0 +} + +func (x *RightsizingGcpComputeInstance) GetMemoryMb() int64 { + if x != nil { + return x.MemoryMb + } + return 0 +} + +func (x *RightsizingGcpComputeInstance) GetCost() float64 { + if x != nil { + return x.Cost + } + return 0 +} + +type GcpComputeInstanceRightsizingRecommendation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Current *RightsizingGcpComputeInstance `protobuf:"bytes,1,opt,name=current,proto3" json:"current,omitempty"` + Recommended *RightsizingGcpComputeInstance `protobuf:"bytes,2,opt,name=recommended,proto3" json:"recommended,omitempty"` + Cpu *Usage `protobuf:"bytes,3,opt,name=cpu,proto3" json:"cpu,omitempty"` + Memory *Usage `protobuf:"bytes,4,opt,name=memory,proto3" json:"memory,omitempty"` + Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` +} + +func (x *GcpComputeInstanceRightsizingRecommendation) Reset() { + *x = GcpComputeInstanceRightsizingRecommendation{} + if protoimpl.UnsafeEnabled { + mi := &file_plugin_proto_server_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GcpComputeInstanceRightsizingRecommendation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GcpComputeInstanceRightsizingRecommendation) ProtoMessage() {} + +func (x *GcpComputeInstanceRightsizingRecommendation) ProtoReflect() protoreflect.Message { + mi := &file_plugin_proto_server_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GcpComputeInstanceRightsizingRecommendation.ProtoReflect.Descriptor instead. +func (*GcpComputeInstanceRightsizingRecommendation) Descriptor() ([]byte, []int) { + return file_plugin_proto_server_proto_rawDescGZIP(), []int{9} +} + +func (x *GcpComputeInstanceRightsizingRecommendation) GetCurrent() *RightsizingGcpComputeInstance { + if x != nil { + return x.Current + } + return nil +} + +func (x *GcpComputeInstanceRightsizingRecommendation) GetRecommended() *RightsizingGcpComputeInstance { + if x != nil { + return x.Recommended + } + return nil +} + +func (x *GcpComputeInstanceRightsizingRecommendation) GetCpu() *Usage { + if x != nil { + return x.Cpu + } + return nil +} + +func (x *GcpComputeInstanceRightsizingRecommendation) GetMemory() *Usage { + if x != nil { + return x.Memory + } + return nil +} + +func (x *GcpComputeInstanceRightsizingRecommendation) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +type GcpComputeDiskRecommendation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Current *RightsizingGcpComputeDisk `protobuf:"bytes,1,opt,name=current,proto3" json:"current,omitempty"` + Recommended *RightsizingGcpComputeDisk `protobuf:"bytes,2,opt,name=recommended,proto3" json:"recommended,omitempty"` + ReadIops *Usage `protobuf:"bytes,3,opt,name=read_iops,json=readIops,proto3" json:"read_iops,omitempty"` + WriteIops *Usage `protobuf:"bytes,4,opt,name=write_iops,json=writeIops,proto3" json:"write_iops,omitempty"` + ReadThroughput *Usage `protobuf:"bytes,5,opt,name=read_throughput,json=readThroughput,proto3" json:"read_throughput,omitempty"` + WriteThroughput *Usage `protobuf:"bytes,6,opt,name=write_throughput,json=writeThroughput,proto3" json:"write_throughput,omitempty"` + Description string `protobuf:"bytes,7,opt,name=description,proto3" json:"description,omitempty"` +} + +func (x *GcpComputeDiskRecommendation) Reset() { + *x = GcpComputeDiskRecommendation{} + if protoimpl.UnsafeEnabled { + mi := &file_plugin_proto_server_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GcpComputeDiskRecommendation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GcpComputeDiskRecommendation) ProtoMessage() {} + +func (x *GcpComputeDiskRecommendation) ProtoReflect() protoreflect.Message { + mi := &file_plugin_proto_server_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GcpComputeDiskRecommendation.ProtoReflect.Descriptor instead. +func (*GcpComputeDiskRecommendation) Descriptor() ([]byte, []int) { + return file_plugin_proto_server_proto_rawDescGZIP(), []int{10} +} + +func (x *GcpComputeDiskRecommendation) GetCurrent() *RightsizingGcpComputeDisk { + if x != nil { + return x.Current + } + return nil +} + +func (x *GcpComputeDiskRecommendation) GetRecommended() *RightsizingGcpComputeDisk { + if x != nil { + return x.Recommended + } + return nil +} + +func (x *GcpComputeDiskRecommendation) GetReadIops() *Usage { + if x != nil { + return x.ReadIops + } + return nil +} + +func (x *GcpComputeDiskRecommendation) GetWriteIops() *Usage { + if x != nil { + return x.WriteIops + } + return nil +} + +func (x *GcpComputeDiskRecommendation) GetReadThroughput() *Usage { + if x != nil { + return x.ReadThroughput + } + return nil +} + +func (x *GcpComputeDiskRecommendation) GetWriteThroughput() *Usage { + if x != nil { + return x.WriteThroughput + } + return nil +} + +func (x *GcpComputeDiskRecommendation) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +type GCPComputeOptimizationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Rightsizing *GcpComputeInstanceRightsizingRecommendation `protobuf:"bytes,1,opt,name=rightsizing,proto3" json:"rightsizing,omitempty"` + VolumesRightsizing map[string]*GcpComputeDiskRecommendation `protobuf:"bytes,2,rep,name=volumes_rightsizing,json=volumesRightsizing,proto3" json:"volumes_rightsizing,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *GCPComputeOptimizationResponse) Reset() { + *x = GCPComputeOptimizationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_plugin_proto_server_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GCPComputeOptimizationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GCPComputeOptimizationResponse) ProtoMessage() {} + +func (x *GCPComputeOptimizationResponse) ProtoReflect() protoreflect.Message { + mi := &file_plugin_proto_server_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GCPComputeOptimizationResponse.ProtoReflect.Descriptor instead. +func (*GCPComputeOptimizationResponse) Descriptor() ([]byte, []int) { + return file_plugin_proto_server_proto_rawDescGZIP(), []int{11} +} + +func (x *GCPComputeOptimizationResponse) GetRightsizing() *GcpComputeInstanceRightsizingRecommendation { + if x != nil { + return x.Rightsizing + } + return nil +} + +func (x *GCPComputeOptimizationResponse) GetVolumesRightsizing() map[string]*GcpComputeDiskRecommendation { + if x != nil { + return x.VolumesRightsizing + } + return nil +} + +var File_plugin_proto_server_proto protoreflect.FileDescriptor + +var file_plugin_proto_server_proto_rawDesc = []byte{ + 0x0a, 0x19, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x20, 0x70, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2e, 0x6f, 0x70, + 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x1e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, + 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5b, 0x0a, + 0x12, 0x47, 0x63, 0x70, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x7a, 0x6f, 0x6e, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x61, 0x63, 0x68, 0x69, + 0x6e, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, + 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0xe7, 0x01, 0x0a, 0x0e, 0x47, + 0x63, 0x70, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x44, 0x69, 0x73, 0x6b, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, + 0x04, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x7a, 0x6f, 0x6e, + 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x69, 0x73, + 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x69, + 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x34, 0x0a, 0x07, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x67, + 0x62, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x73, 0x69, 0x7a, 0x65, 0x47, 0x62, 0x12, 0x46, 0x0a, 0x10, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x64, 0x5f, 0x69, 0x6f, 0x70, 0x73, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x64, + 0x49, 0x6f, 0x70, 0x73, 0x22, 0x95, 0x01, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x50, 0x6f, 0x69, + 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x36, + 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x65, + 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x49, 0x0a, 0x06, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x3f, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x6b, 0x75, 0x62, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x50, 0x6f, 0x69, 0x6e, + 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xc9, 0x01, 0x0a, 0x0b, 0x44, 0x69, 0x73, 0x6b, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x54, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x6b, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x1a, 0x64, 0x0a, + 0x0c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x3e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, + 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, + 0x73, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x22, 0xaf, 0x09, 0x0a, 0x1d, 0x47, 0x43, 0x50, 0x43, 0x6f, 0x6d, 0x70, 0x75, + 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3b, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x49, 0x64, 0x12, 0x3d, 0x0a, 0x0b, 0x63, 0x6c, 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x63, 0x6c, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x7b, 0x0a, 0x0e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x53, 0x2e, 0x70, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2e, 0x6f, 0x70, 0x74, + 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x43, 0x50, + 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x50, + 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x34, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, + 0x74, 0x65, 0x73, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x63, 0x70, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x12, 0x46, 0x0a, 0x05, 0x64, 0x69, 0x73, 0x6b, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x30, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, + 0x65, 0x73, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x63, 0x70, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x44, 0x69, 0x73, + 0x6b, 0x52, 0x05, 0x64, 0x69, 0x73, 0x6b, 0x73, 0x12, 0x72, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x66, + 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x50, 0x2e, + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, + 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x43, 0x50, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6d, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, + 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x0b, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x66, 0x0a, 0x07, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4c, 0x2e, + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, + 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x43, 0x50, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6d, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x73, 0x12, 0x76, 0x0a, 0x0d, 0x64, 0x69, 0x73, 0x6b, 0x73, 0x5f, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x51, 0x2e, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2e, 0x6f, + 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x43, 0x50, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x44, 0x69, 0x73, + 0x6b, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, + 0x64, 0x69, 0x73, 0x6b, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x18, 0x0a, 0x07, + 0x6c, 0x6f, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x6c, + 0x6f, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x1a, 0x41, + 0x0a, 0x13, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x1a, 0x5c, 0x0a, 0x10, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x32, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, + 0x64, 0x0a, 0x0c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x3e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x28, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, + 0x74, 0x65, 0x73, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x6e, 0x0a, 0x11, 0x44, 0x69, 0x73, 0x6b, 0x73, 0x4d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x43, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2e, 0x6f, + 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x44, + 0x69, 0x73, 0x6b, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x97, 0x01, 0x0a, 0x05, 0x55, 0x73, 0x61, 0x67, 0x65, 0x12, + 0x2e, 0x0a, 0x03, 0x61, 0x76, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, + 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x03, 0x61, 0x76, 0x67, 0x12, + 0x2e, 0x0a, 0x03, 0x6d, 0x61, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, + 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x03, 0x6d, 0x61, 0x78, 0x12, + 0x2e, 0x0a, 0x03, 0x6d, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, + 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x03, 0x6d, 0x69, 0x6e, 0x22, + 0xd1, 0x02, 0x0a, 0x19, 0x52, 0x69, 0x67, 0x68, 0x74, 0x73, 0x69, 0x7a, 0x69, 0x6e, 0x67, 0x47, + 0x63, 0x70, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x44, 0x69, 0x73, 0x6b, 0x12, 0x12, 0x0a, + 0x04, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x7a, 0x6f, 0x6e, + 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x69, 0x73, + 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x69, + 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x73, + 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x64, 0x69, 0x73, 0x6b, 0x53, + 0x69, 0x7a, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x69, 0x6f, 0x70, 0x73, + 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x72, 0x65, + 0x61, 0x64, 0x49, 0x6f, 0x70, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x77, + 0x72, 0x69, 0x74, 0x65, 0x5f, 0x69, 0x6f, 0x70, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x77, 0x72, 0x69, 0x74, 0x65, 0x49, 0x6f, 0x70, 0x73, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x74, 0x68, + 0x72, 0x6f, 0x75, 0x67, 0x68, 0x70, 0x75, 0x74, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x01, 0x52, 0x13, 0x72, 0x65, 0x61, 0x64, 0x54, 0x68, 0x72, 0x6f, 0x75, 0x67, + 0x68, 0x70, 0x75, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x34, 0x0a, 0x16, 0x77, 0x72, 0x69, + 0x74, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x70, 0x75, 0x74, 0x5f, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x01, 0x52, 0x14, 0x77, 0x72, 0x69, 0x74, 0x65, + 0x54, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x70, 0x75, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, + 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x01, 0x52, 0x04, 0x63, + 0x6f, 0x73, 0x74, 0x22, 0xd8, 0x01, 0x0a, 0x1d, 0x52, 0x69, 0x67, 0x68, 0x74, 0x73, 0x69, 0x7a, + 0x69, 0x6e, 0x67, 0x47, 0x63, 0x70, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x7a, 0x6f, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, + 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, + 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, + 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x61, + 0x63, 0x68, 0x69, 0x6e, 0x65, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x63, + 0x70, 0x75, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x63, 0x70, 0x75, 0x12, 0x1b, 0x0a, + 0x09, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x6d, 0x62, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x08, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x4d, 0x62, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, + 0x73, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x52, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x22, 0x89, + 0x03, 0x0a, 0x2b, 0x47, 0x63, 0x70, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x69, 0x67, 0x68, 0x74, 0x73, 0x69, 0x7a, 0x69, 0x6e, 0x67, + 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x59, + 0x0a, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x3f, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, + 0x65, 0x73, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x52, 0x69, 0x67, 0x68, 0x74, 0x73, 0x69, 0x7a, 0x69, 0x6e, 0x67, 0x47, 0x63, + 0x70, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x52, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x61, 0x0a, 0x0b, 0x72, 0x65, 0x63, + 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, + 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, + 0x73, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x69, 0x67, 0x68, 0x74, 0x73, 0x69, 0x7a, 0x69, 0x6e, 0x67, 0x47, 0x63, 0x70, + 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, + 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x12, 0x39, 0x0a, 0x03, + 0x63, 0x70, 0x75, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x70, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2e, 0x6f, 0x70, 0x74, + 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x61, + 0x67, 0x65, 0x52, 0x03, 0x63, 0x70, 0x75, 0x12, 0x3f, 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, + 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x61, 0x67, 0x65, + 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xaa, 0x04, 0x0a, 0x1c, 0x47, + 0x63, 0x70, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x63, + 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x55, 0x0a, 0x07, 0x63, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2e, + 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x69, 0x67, 0x68, 0x74, 0x73, 0x69, 0x7a, 0x69, 0x6e, 0x67, 0x47, 0x63, 0x70, 0x43, 0x6f, + 0x6d, 0x70, 0x75, 0x74, 0x65, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x74, 0x12, 0x5d, 0x0a, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x65, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x69, 0x67, 0x68, 0x74, + 0x73, 0x69, 0x7a, 0x69, 0x6e, 0x67, 0x47, 0x63, 0x70, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x44, 0x69, 0x73, 0x6b, 0x52, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x65, + 0x64, 0x12, 0x44, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x69, 0x6f, 0x70, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x6b, 0x75, 0x62, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x72, + 0x65, 0x61, 0x64, 0x49, 0x6f, 0x70, 0x73, 0x12, 0x46, 0x0a, 0x0a, 0x77, 0x72, 0x69, 0x74, 0x65, + 0x5f, 0x69, 0x6f, 0x70, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2e, 0x6f, + 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x55, + 0x73, 0x61, 0x67, 0x65, 0x52, 0x09, 0x77, 0x72, 0x69, 0x74, 0x65, 0x49, 0x6f, 0x70, 0x73, 0x12, + 0x50, 0x0a, 0x0f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x70, + 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x61, 0x67, + 0x65, 0x52, 0x0e, 0x72, 0x65, 0x61, 0x64, 0x54, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x70, 0x75, + 0x74, 0x12, 0x52, 0x0a, 0x10, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x6f, 0x75, + 0x67, 0x68, 0x70, 0x75, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2e, 0x6f, + 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x55, + 0x73, 0x61, 0x67, 0x65, 0x52, 0x0f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x54, 0x68, 0x72, 0x6f, 0x75, + 0x67, 0x68, 0x70, 0x75, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa5, 0x03, 0x0a, 0x1e, 0x47, 0x43, 0x50, 0x43, + 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6f, 0x0a, 0x0b, 0x72, 0x69, + 0x67, 0x68, 0x74, 0x73, 0x69, 0x7a, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x4d, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, + 0x65, 0x73, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x63, 0x70, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x69, 0x67, 0x68, 0x74, 0x73, 0x69, 0x7a, 0x69, 0x6e, 0x67, + 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, + 0x72, 0x69, 0x67, 0x68, 0x74, 0x73, 0x69, 0x7a, 0x69, 0x6e, 0x67, 0x12, 0x89, 0x01, 0x0a, 0x13, + 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x5f, 0x72, 0x69, 0x67, 0x68, 0x74, 0x73, 0x69, 0x7a, + 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x58, 0x2e, 0x70, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2e, 0x6f, 0x70, 0x74, + 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x43, 0x50, + 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x56, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x73, 0x52, 0x69, 0x67, 0x68, 0x74, 0x73, 0x69, 0x7a, 0x69, 0x6e, 0x67, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x12, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x52, 0x69, 0x67, 0x68, + 0x74, 0x73, 0x69, 0x7a, 0x69, 0x6e, 0x67, 0x1a, 0x85, 0x01, 0x0a, 0x17, 0x56, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x73, 0x52, 0x69, 0x67, 0x68, 0x74, 0x73, 0x69, 0x7a, 0x69, 0x6e, 0x67, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x54, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x6b, 0x75, 0x62, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x63, 0x70, 0x43, 0x6f, 0x6d, 0x70, 0x75, + 0x74, 0x65, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x32, + 0xac, 0x01, 0x0a, 0x0c, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x9b, 0x01, 0x0a, 0x16, 0x47, 0x43, 0x50, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x4f, + 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x2e, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2e, 0x6f, + 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x43, 0x50, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x40, 0x2e, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2e, + 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x43, 0x50, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x48, + 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x61, 0x79, + 0x74, 0x75, 0x2d, 0x69, 0x6f, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2d, 0x6b, 0x75, 0x62, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x72, + 0x63, 0x2f, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_plugin_proto_server_proto_rawDescOnce sync.Once + file_plugin_proto_server_proto_rawDescData = file_plugin_proto_server_proto_rawDesc +) + +func file_plugin_proto_server_proto_rawDescGZIP() []byte { + file_plugin_proto_server_proto_rawDescOnce.Do(func() { + file_plugin_proto_server_proto_rawDescData = protoimpl.X.CompressGZIP(file_plugin_proto_server_proto_rawDescData) + }) + return file_plugin_proto_server_proto_rawDescData +} + +var file_plugin_proto_server_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_plugin_proto_server_proto_goTypes = []interface{}{ + (*GcpComputeInstance)(nil), // 0: pluginkubernetes.optimization.v1.GcpComputeInstance + (*GcpComputeDisk)(nil), // 1: pluginkubernetes.optimization.v1.GcpComputeDisk + (*DataPoint)(nil), // 2: pluginkubernetes.optimization.v1.DataPoint + (*Metric)(nil), // 3: pluginkubernetes.optimization.v1.Metric + (*DiskMetrics)(nil), // 4: pluginkubernetes.optimization.v1.DiskMetrics + (*GCPComputeOptimizationRequest)(nil), // 5: pluginkubernetes.optimization.v1.GCPComputeOptimizationRequest + (*Usage)(nil), // 6: pluginkubernetes.optimization.v1.Usage + (*RightsizingGcpComputeDisk)(nil), // 7: pluginkubernetes.optimization.v1.RightsizingGcpComputeDisk + (*RightsizingGcpComputeInstance)(nil), // 8: pluginkubernetes.optimization.v1.RightsizingGcpComputeInstance + (*GcpComputeInstanceRightsizingRecommendation)(nil), // 9: pluginkubernetes.optimization.v1.GcpComputeInstanceRightsizingRecommendation + (*GcpComputeDiskRecommendation)(nil), // 10: pluginkubernetes.optimization.v1.GcpComputeDiskRecommendation + (*GCPComputeOptimizationResponse)(nil), // 11: pluginkubernetes.optimization.v1.GCPComputeOptimizationResponse + nil, // 12: pluginkubernetes.optimization.v1.DiskMetrics.MetricsEntry + nil, // 13: pluginkubernetes.optimization.v1.GCPComputeOptimizationRequest.IdentificationEntry + nil, // 14: pluginkubernetes.optimization.v1.GCPComputeOptimizationRequest.PreferencesEntry + nil, // 15: pluginkubernetes.optimization.v1.GCPComputeOptimizationRequest.MetricsEntry + nil, // 16: pluginkubernetes.optimization.v1.GCPComputeOptimizationRequest.DisksMetricsEntry + nil, // 17: pluginkubernetes.optimization.v1.GCPComputeOptimizationResponse.VolumesRightsizingEntry + (*wrappers.Int64Value)(nil), // 18: google.protobuf.Int64Value + (*wrappers.StringValue)(nil), // 19: google.protobuf.StringValue + (*wrappers.DoubleValue)(nil), // 20: google.protobuf.DoubleValue +} +var file_plugin_proto_server_proto_depIdxs = []int32{ + 18, // 0: pluginkubernetes.optimization.v1.GcpComputeDisk.size_gb:type_name -> google.protobuf.Int64Value + 18, // 1: pluginkubernetes.optimization.v1.GcpComputeDisk.provisioned_iops:type_name -> google.protobuf.Int64Value + 18, // 2: pluginkubernetes.optimization.v1.DataPoint.start_time:type_name -> google.protobuf.Int64Value + 18, // 3: pluginkubernetes.optimization.v1.DataPoint.end_time:type_name -> google.protobuf.Int64Value + 2, // 4: pluginkubernetes.optimization.v1.Metric.data:type_name -> pluginkubernetes.optimization.v1.DataPoint + 12, // 5: pluginkubernetes.optimization.v1.DiskMetrics.metrics:type_name -> pluginkubernetes.optimization.v1.DiskMetrics.MetricsEntry + 19, // 6: pluginkubernetes.optimization.v1.GCPComputeOptimizationRequest.request_id:type_name -> google.protobuf.StringValue + 19, // 7: pluginkubernetes.optimization.v1.GCPComputeOptimizationRequest.cli_version:type_name -> google.protobuf.StringValue + 13, // 8: pluginkubernetes.optimization.v1.GCPComputeOptimizationRequest.identification:type_name -> pluginkubernetes.optimization.v1.GCPComputeOptimizationRequest.IdentificationEntry + 0, // 9: pluginkubernetes.optimization.v1.GCPComputeOptimizationRequest.instance:type_name -> pluginkubernetes.optimization.v1.GcpComputeInstance + 1, // 10: pluginkubernetes.optimization.v1.GCPComputeOptimizationRequest.disks:type_name -> pluginkubernetes.optimization.v1.GcpComputeDisk + 14, // 11: pluginkubernetes.optimization.v1.GCPComputeOptimizationRequest.preferences:type_name -> pluginkubernetes.optimization.v1.GCPComputeOptimizationRequest.PreferencesEntry + 15, // 12: pluginkubernetes.optimization.v1.GCPComputeOptimizationRequest.metrics:type_name -> pluginkubernetes.optimization.v1.GCPComputeOptimizationRequest.MetricsEntry + 16, // 13: pluginkubernetes.optimization.v1.GCPComputeOptimizationRequest.disks_metrics:type_name -> pluginkubernetes.optimization.v1.GCPComputeOptimizationRequest.DisksMetricsEntry + 20, // 14: pluginkubernetes.optimization.v1.Usage.avg:type_name -> google.protobuf.DoubleValue + 20, // 15: pluginkubernetes.optimization.v1.Usage.max:type_name -> google.protobuf.DoubleValue + 20, // 16: pluginkubernetes.optimization.v1.Usage.min:type_name -> google.protobuf.DoubleValue + 8, // 17: pluginkubernetes.optimization.v1.GcpComputeInstanceRightsizingRecommendation.current:type_name -> pluginkubernetes.optimization.v1.RightsizingGcpComputeInstance + 8, // 18: pluginkubernetes.optimization.v1.GcpComputeInstanceRightsizingRecommendation.recommended:type_name -> pluginkubernetes.optimization.v1.RightsizingGcpComputeInstance + 6, // 19: pluginkubernetes.optimization.v1.GcpComputeInstanceRightsizingRecommendation.cpu:type_name -> pluginkubernetes.optimization.v1.Usage + 6, // 20: pluginkubernetes.optimization.v1.GcpComputeInstanceRightsizingRecommendation.memory:type_name -> pluginkubernetes.optimization.v1.Usage + 7, // 21: pluginkubernetes.optimization.v1.GcpComputeDiskRecommendation.current:type_name -> pluginkubernetes.optimization.v1.RightsizingGcpComputeDisk + 7, // 22: pluginkubernetes.optimization.v1.GcpComputeDiskRecommendation.recommended:type_name -> pluginkubernetes.optimization.v1.RightsizingGcpComputeDisk + 6, // 23: pluginkubernetes.optimization.v1.GcpComputeDiskRecommendation.read_iops:type_name -> pluginkubernetes.optimization.v1.Usage + 6, // 24: pluginkubernetes.optimization.v1.GcpComputeDiskRecommendation.write_iops:type_name -> pluginkubernetes.optimization.v1.Usage + 6, // 25: pluginkubernetes.optimization.v1.GcpComputeDiskRecommendation.read_throughput:type_name -> pluginkubernetes.optimization.v1.Usage + 6, // 26: pluginkubernetes.optimization.v1.GcpComputeDiskRecommendation.write_throughput:type_name -> pluginkubernetes.optimization.v1.Usage + 9, // 27: pluginkubernetes.optimization.v1.GCPComputeOptimizationResponse.rightsizing:type_name -> pluginkubernetes.optimization.v1.GcpComputeInstanceRightsizingRecommendation + 17, // 28: pluginkubernetes.optimization.v1.GCPComputeOptimizationResponse.volumes_rightsizing:type_name -> pluginkubernetes.optimization.v1.GCPComputeOptimizationResponse.VolumesRightsizingEntry + 3, // 29: pluginkubernetes.optimization.v1.DiskMetrics.MetricsEntry.value:type_name -> pluginkubernetes.optimization.v1.Metric + 19, // 30: pluginkubernetes.optimization.v1.GCPComputeOptimizationRequest.PreferencesEntry.value:type_name -> google.protobuf.StringValue + 3, // 31: pluginkubernetes.optimization.v1.GCPComputeOptimizationRequest.MetricsEntry.value:type_name -> pluginkubernetes.optimization.v1.Metric + 4, // 32: pluginkubernetes.optimization.v1.GCPComputeOptimizationRequest.DisksMetricsEntry.value:type_name -> pluginkubernetes.optimization.v1.DiskMetrics + 10, // 33: pluginkubernetes.optimization.v1.GCPComputeOptimizationResponse.VolumesRightsizingEntry.value:type_name -> pluginkubernetes.optimization.v1.GcpComputeDiskRecommendation + 5, // 34: pluginkubernetes.optimization.v1.Optimization.GCPComputeOptimization:input_type -> pluginkubernetes.optimization.v1.GCPComputeOptimizationRequest + 11, // 35: pluginkubernetes.optimization.v1.Optimization.GCPComputeOptimization:output_type -> pluginkubernetes.optimization.v1.GCPComputeOptimizationResponse + 35, // [35:36] is the sub-list for method output_type + 34, // [34:35] is the sub-list for method input_type + 34, // [34:34] is the sub-list for extension type_name + 34, // [34:34] is the sub-list for extension extendee + 0, // [0:34] is the sub-list for field type_name +} + +func init() { file_plugin_proto_server_proto_init() } +func file_plugin_proto_server_proto_init() { + if File_plugin_proto_server_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_plugin_proto_server_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GcpComputeInstance); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_plugin_proto_server_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GcpComputeDisk); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_plugin_proto_server_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DataPoint); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_plugin_proto_server_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Metric); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_plugin_proto_server_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DiskMetrics); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_plugin_proto_server_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GCPComputeOptimizationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_plugin_proto_server_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Usage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_plugin_proto_server_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RightsizingGcpComputeDisk); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_plugin_proto_server_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RightsizingGcpComputeInstance); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_plugin_proto_server_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GcpComputeInstanceRightsizingRecommendation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_plugin_proto_server_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GcpComputeDiskRecommendation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_plugin_proto_server_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GCPComputeOptimizationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_plugin_proto_server_proto_rawDesc, + NumEnums: 0, + NumMessages: 18, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_plugin_proto_server_proto_goTypes, + DependencyIndexes: file_plugin_proto_server_proto_depIdxs, + MessageInfos: file_plugin_proto_server_proto_msgTypes, + }.Build() + File_plugin_proto_server_proto = out.File + file_plugin_proto_server_proto_rawDesc = nil + file_plugin_proto_server_proto_goTypes = nil + file_plugin_proto_server_proto_depIdxs = nil +} diff --git a/plugin/proto/src/golang/server_grpc.pb.go b/plugin/proto/src/golang/server_grpc.pb.go new file mode 100644 index 0000000..ba5d956 --- /dev/null +++ b/plugin/proto/src/golang/server_grpc.pb.go @@ -0,0 +1,109 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v3.12.4 +// source: plugin/proto/server.proto + +package golang + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + Optimization_GCPComputeOptimization_FullMethodName = "/pluginkubernetes.optimization.v1.Optimization/GCPComputeOptimization" +) + +// OptimizationClient is the client API for Optimization service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type OptimizationClient interface { + GCPComputeOptimization(ctx context.Context, in *GCPComputeOptimizationRequest, opts ...grpc.CallOption) (*GCPComputeOptimizationResponse, error) +} + +type optimizationClient struct { + cc grpc.ClientConnInterface +} + +func NewOptimizationClient(cc grpc.ClientConnInterface) OptimizationClient { + return &optimizationClient{cc} +} + +func (c *optimizationClient) GCPComputeOptimization(ctx context.Context, in *GCPComputeOptimizationRequest, opts ...grpc.CallOption) (*GCPComputeOptimizationResponse, error) { + out := new(GCPComputeOptimizationResponse) + err := c.cc.Invoke(ctx, Optimization_GCPComputeOptimization_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// OptimizationServer is the server API for Optimization service. +// All implementations must embed UnimplementedOptimizationServer +// for forward compatibility +type OptimizationServer interface { + GCPComputeOptimization(context.Context, *GCPComputeOptimizationRequest) (*GCPComputeOptimizationResponse, error) + mustEmbedUnimplementedOptimizationServer() +} + +// UnimplementedOptimizationServer must be embedded to have forward compatible implementations. +type UnimplementedOptimizationServer struct { +} + +func (UnimplementedOptimizationServer) GCPComputeOptimization(context.Context, *GCPComputeOptimizationRequest) (*GCPComputeOptimizationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GCPComputeOptimization not implemented") +} +func (UnimplementedOptimizationServer) mustEmbedUnimplementedOptimizationServer() {} + +// UnsafeOptimizationServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to OptimizationServer will +// result in compilation errors. +type UnsafeOptimizationServer interface { + mustEmbedUnimplementedOptimizationServer() +} + +func RegisterOptimizationServer(s grpc.ServiceRegistrar, srv OptimizationServer) { + s.RegisterService(&Optimization_ServiceDesc, srv) +} + +func _Optimization_GCPComputeOptimization_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GCPComputeOptimizationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OptimizationServer).GCPComputeOptimization(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Optimization_GCPComputeOptimization_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OptimizationServer).GCPComputeOptimization(ctx, req.(*GCPComputeOptimizationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Optimization_ServiceDesc is the grpc.ServiceDesc for Optimization service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Optimization_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "pluginkubernetes.optimization.v1.Optimization", + HandlerType: (*OptimizationServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GCPComputeOptimization", + Handler: _Optimization_GCPComputeOptimization_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "plugin/proto/server.proto", +} diff --git a/scripts/generate_proto.sh b/scripts/generate_proto.sh new file mode 100755 index 0000000..0dc7f02 --- /dev/null +++ b/scripts/generate_proto.sh @@ -0,0 +1,5 @@ +protoc --go_out=plugin/proto/src/golang --go_opt=paths=source_relative \ + --go-grpc_out=plugin/proto/src/golang --go-grpc_opt=paths=source_relative \ + plugin/proto/*.proto +mv plugin/proto/src/golang/plugin/proto/* plugin/proto/src/golang/ +rm -rf plugin/proto/src/golang/plugin \ No newline at end of file