diff --git a/common/v1/common.pb.go b/common/v1/common.pb.go index 486e92c1bb..5804ae0032 100644 --- a/common/v1/common.pb.go +++ b/common/v1/common.pb.go @@ -1488,6 +1488,98 @@ func (x *DoCommandResponse) GetResult() *structpb.Struct { return nil } +// GetStatusRequest represents a generic GetStatus input +type GetStatusRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetStatusRequest) Reset() { + *x = GetStatusRequest{} + mi := &file_common_v1_common_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetStatusRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetStatusRequest) ProtoMessage() {} + +func (x *GetStatusRequest) ProtoReflect() protoreflect.Message { + mi := &file_common_v1_common_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetStatusRequest.ProtoReflect.Descriptor instead. +func (*GetStatusRequest) Descriptor() ([]byte, []int) { + return file_common_v1_common_proto_rawDescGZIP(), []int{22} +} + +func (x *GetStatusRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// GetStatusResponse represents a generic GetStatus output +type GetStatusResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Result *structpb.Struct `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` +} + +func (x *GetStatusResponse) Reset() { + *x = GetStatusResponse{} + mi := &file_common_v1_common_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetStatusResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetStatusResponse) ProtoMessage() {} + +func (x *GetStatusResponse) ProtoReflect() protoreflect.Message { + mi := &file_common_v1_common_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetStatusResponse.ProtoReflect.Descriptor instead. +func (*GetStatusResponse) Descriptor() ([]byte, []int) { + return file_common_v1_common_proto_rawDescGZIP(), []int{23} +} + +func (x *GetStatusResponse) GetResult() *structpb.Struct { + if x != nil { + return x.Result + } + return nil +} + type GetKinematicsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1501,7 +1593,7 @@ type GetKinematicsRequest struct { func (x *GetKinematicsRequest) Reset() { *x = GetKinematicsRequest{} - mi := &file_common_v1_common_proto_msgTypes[22] + mi := &file_common_v1_common_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1513,7 +1605,7 @@ func (x *GetKinematicsRequest) String() string { func (*GetKinematicsRequest) ProtoMessage() {} func (x *GetKinematicsRequest) ProtoReflect() protoreflect.Message { - mi := &file_common_v1_common_proto_msgTypes[22] + mi := &file_common_v1_common_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1526,7 +1618,7 @@ func (x *GetKinematicsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetKinematicsRequest.ProtoReflect.Descriptor instead. func (*GetKinematicsRequest) Descriptor() ([]byte, []int) { - return file_common_v1_common_proto_rawDescGZIP(), []int{22} + return file_common_v1_common_proto_rawDescGZIP(), []int{24} } func (x *GetKinematicsRequest) GetName() string { @@ -1559,7 +1651,7 @@ type GetKinematicsResponse struct { func (x *GetKinematicsResponse) Reset() { *x = GetKinematicsResponse{} - mi := &file_common_v1_common_proto_msgTypes[23] + mi := &file_common_v1_common_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1571,7 +1663,7 @@ func (x *GetKinematicsResponse) String() string { func (*GetKinematicsResponse) ProtoMessage() {} func (x *GetKinematicsResponse) ProtoReflect() protoreflect.Message { - mi := &file_common_v1_common_proto_msgTypes[23] + mi := &file_common_v1_common_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1584,7 +1676,7 @@ func (x *GetKinematicsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetKinematicsResponse.ProtoReflect.Descriptor instead. func (*GetKinematicsResponse) Descriptor() ([]byte, []int) { - return file_common_v1_common_proto_rawDescGZIP(), []int{23} + return file_common_v1_common_proto_rawDescGZIP(), []int{25} } func (x *GetKinematicsResponse) GetFormat() KinematicsFileFormat { @@ -1621,7 +1713,7 @@ type GetGeometriesRequest struct { func (x *GetGeometriesRequest) Reset() { *x = GetGeometriesRequest{} - mi := &file_common_v1_common_proto_msgTypes[24] + mi := &file_common_v1_common_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1633,7 +1725,7 @@ func (x *GetGeometriesRequest) String() string { func (*GetGeometriesRequest) ProtoMessage() {} func (x *GetGeometriesRequest) ProtoReflect() protoreflect.Message { - mi := &file_common_v1_common_proto_msgTypes[24] + mi := &file_common_v1_common_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1646,7 +1738,7 @@ func (x *GetGeometriesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetGeometriesRequest.ProtoReflect.Descriptor instead. func (*GetGeometriesRequest) Descriptor() ([]byte, []int) { - return file_common_v1_common_proto_rawDescGZIP(), []int{24} + return file_common_v1_common_proto_rawDescGZIP(), []int{26} } func (x *GetGeometriesRequest) GetName() string { @@ -1674,7 +1766,7 @@ type GetGeometriesResponse struct { func (x *GetGeometriesResponse) Reset() { *x = GetGeometriesResponse{} - mi := &file_common_v1_common_proto_msgTypes[25] + mi := &file_common_v1_common_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1686,7 +1778,7 @@ func (x *GetGeometriesResponse) String() string { func (*GetGeometriesResponse) ProtoMessage() {} func (x *GetGeometriesResponse) ProtoReflect() protoreflect.Message { - mi := &file_common_v1_common_proto_msgTypes[25] + mi := &file_common_v1_common_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1699,7 +1791,7 @@ func (x *GetGeometriesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetGeometriesResponse.ProtoReflect.Descriptor instead. func (*GetGeometriesResponse) Descriptor() ([]byte, []int) { - return file_common_v1_common_proto_rawDescGZIP(), []int{25} + return file_common_v1_common_proto_rawDescGZIP(), []int{27} } func (x *GetGeometriesResponse) GetGeometries() []*Geometry { @@ -1722,7 +1814,7 @@ type Get3DModelsRequest struct { func (x *Get3DModelsRequest) Reset() { *x = Get3DModelsRequest{} - mi := &file_common_v1_common_proto_msgTypes[26] + mi := &file_common_v1_common_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1734,7 +1826,7 @@ func (x *Get3DModelsRequest) String() string { func (*Get3DModelsRequest) ProtoMessage() {} func (x *Get3DModelsRequest) ProtoReflect() protoreflect.Message { - mi := &file_common_v1_common_proto_msgTypes[26] + mi := &file_common_v1_common_proto_msgTypes[28] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1747,7 +1839,7 @@ func (x *Get3DModelsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use Get3DModelsRequest.ProtoReflect.Descriptor instead. func (*Get3DModelsRequest) Descriptor() ([]byte, []int) { - return file_common_v1_common_proto_rawDescGZIP(), []int{26} + return file_common_v1_common_proto_rawDescGZIP(), []int{28} } func (x *Get3DModelsRequest) GetName() string { @@ -1775,7 +1867,7 @@ type Get3DModelsResponse struct { func (x *Get3DModelsResponse) Reset() { *x = Get3DModelsResponse{} - mi := &file_common_v1_common_proto_msgTypes[27] + mi := &file_common_v1_common_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1787,7 +1879,7 @@ func (x *Get3DModelsResponse) String() string { func (*Get3DModelsResponse) ProtoMessage() {} func (x *Get3DModelsResponse) ProtoReflect() protoreflect.Message { - mi := &file_common_v1_common_proto_msgTypes[27] + mi := &file_common_v1_common_proto_msgTypes[29] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1800,7 +1892,7 @@ func (x *Get3DModelsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use Get3DModelsResponse.ProtoReflect.Descriptor instead. func (*Get3DModelsResponse) Descriptor() ([]byte, []int) { - return file_common_v1_common_proto_rawDescGZIP(), []int{27} + return file_common_v1_common_proto_rawDescGZIP(), []int{29} } func (x *Get3DModelsResponse) GetModels() map[string]*Mesh { @@ -1823,7 +1915,7 @@ type GetReadingsRequest struct { func (x *GetReadingsRequest) Reset() { *x = GetReadingsRequest{} - mi := &file_common_v1_common_proto_msgTypes[28] + mi := &file_common_v1_common_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1835,7 +1927,7 @@ func (x *GetReadingsRequest) String() string { func (*GetReadingsRequest) ProtoMessage() {} func (x *GetReadingsRequest) ProtoReflect() protoreflect.Message { - mi := &file_common_v1_common_proto_msgTypes[28] + mi := &file_common_v1_common_proto_msgTypes[30] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1848,7 +1940,7 @@ func (x *GetReadingsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetReadingsRequest.ProtoReflect.Descriptor instead. func (*GetReadingsRequest) Descriptor() ([]byte, []int) { - return file_common_v1_common_proto_rawDescGZIP(), []int{28} + return file_common_v1_common_proto_rawDescGZIP(), []int{30} } func (x *GetReadingsRequest) GetName() string { @@ -1875,7 +1967,7 @@ type GetReadingsResponse struct { func (x *GetReadingsResponse) Reset() { *x = GetReadingsResponse{} - mi := &file_common_v1_common_proto_msgTypes[29] + mi := &file_common_v1_common_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1887,7 +1979,7 @@ func (x *GetReadingsResponse) String() string { func (*GetReadingsResponse) ProtoMessage() {} func (x *GetReadingsResponse) ProtoReflect() protoreflect.Message { - mi := &file_common_v1_common_proto_msgTypes[29] + mi := &file_common_v1_common_proto_msgTypes[31] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1900,7 +1992,7 @@ func (x *GetReadingsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetReadingsResponse.ProtoReflect.Descriptor instead. func (*GetReadingsResponse) Descriptor() ([]byte, []int) { - return file_common_v1_common_proto_rawDescGZIP(), []int{29} + return file_common_v1_common_proto_rawDescGZIP(), []int{31} } func (x *GetReadingsResponse) GetReadings() map[string]*structpb.Value { @@ -1927,7 +2019,7 @@ type LogEntry struct { func (x *LogEntry) Reset() { *x = LogEntry{} - mi := &file_common_v1_common_proto_msgTypes[30] + mi := &file_common_v1_common_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1939,7 +2031,7 @@ func (x *LogEntry) String() string { func (*LogEntry) ProtoMessage() {} func (x *LogEntry) ProtoReflect() protoreflect.Message { - mi := &file_common_v1_common_proto_msgTypes[30] + mi := &file_common_v1_common_proto_msgTypes[32] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1952,7 +2044,7 @@ func (x *LogEntry) ProtoReflect() protoreflect.Message { // Deprecated: Use LogEntry.ProtoReflect.Descriptor instead. func (*LogEntry) Descriptor() ([]byte, []int) { - return file_common_v1_common_proto_rawDescGZIP(), []int{30} + return file_common_v1_common_proto_rawDescGZIP(), []int{32} } func (x *LogEntry) GetHost() string { @@ -2027,7 +2119,7 @@ type AudioInfo struct { func (x *AudioInfo) Reset() { *x = AudioInfo{} - mi := &file_common_v1_common_proto_msgTypes[31] + mi := &file_common_v1_common_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2039,7 +2131,7 @@ func (x *AudioInfo) String() string { func (*AudioInfo) ProtoMessage() {} func (x *AudioInfo) ProtoReflect() protoreflect.Message { - mi := &file_common_v1_common_proto_msgTypes[31] + mi := &file_common_v1_common_proto_msgTypes[33] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2052,7 +2144,7 @@ func (x *AudioInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use AudioInfo.ProtoReflect.Descriptor instead. func (*AudioInfo) Descriptor() ([]byte, []int) { - return file_common_v1_common_proto_rawDescGZIP(), []int{31} + return file_common_v1_common_proto_rawDescGZIP(), []int{33} } func (x *AudioInfo) GetCodec() string { @@ -2088,7 +2180,7 @@ type GetPropertiesRequest struct { func (x *GetPropertiesRequest) Reset() { *x = GetPropertiesRequest{} - mi := &file_common_v1_common_proto_msgTypes[32] + mi := &file_common_v1_common_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2100,7 +2192,7 @@ func (x *GetPropertiesRequest) String() string { func (*GetPropertiesRequest) ProtoMessage() {} func (x *GetPropertiesRequest) ProtoReflect() protoreflect.Message { - mi := &file_common_v1_common_proto_msgTypes[32] + mi := &file_common_v1_common_proto_msgTypes[34] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2113,7 +2205,7 @@ func (x *GetPropertiesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPropertiesRequest.ProtoReflect.Descriptor instead. func (*GetPropertiesRequest) Descriptor() ([]byte, []int) { - return file_common_v1_common_proto_rawDescGZIP(), []int{32} + return file_common_v1_common_proto_rawDescGZIP(), []int{34} } func (x *GetPropertiesRequest) GetName() string { @@ -2145,7 +2237,7 @@ type GetPropertiesResponse struct { func (x *GetPropertiesResponse) Reset() { *x = GetPropertiesResponse{} - mi := &file_common_v1_common_proto_msgTypes[33] + mi := &file_common_v1_common_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2157,7 +2249,7 @@ func (x *GetPropertiesResponse) String() string { func (*GetPropertiesResponse) ProtoMessage() {} func (x *GetPropertiesResponse) ProtoReflect() protoreflect.Message { - mi := &file_common_v1_common_proto_msgTypes[33] + mi := &file_common_v1_common_proto_msgTypes[35] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2170,7 +2262,7 @@ func (x *GetPropertiesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPropertiesResponse.ProtoReflect.Descriptor instead. func (*GetPropertiesResponse) Descriptor() ([]byte, []int) { - return file_common_v1_common_proto_rawDescGZIP(), []int{33} + return file_common_v1_common_proto_rawDescGZIP(), []int{35} } func (x *GetPropertiesResponse) GetSupportedCodecs() []string { @@ -2385,135 +2477,142 @@ var file_common_v1_common_proto_rawDesc = []byte{ 0x12, 0x2f, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x22, 0x59, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x4b, 0x69, 0x6e, 0x65, 0x6d, 0x61, 0x74, 0x69, - 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, - 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x63, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, - 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, 0xd5, 0x02, 0x0a, - 0x15, 0x47, 0x65, 0x74, 0x4b, 0x69, 0x6e, 0x65, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x69, 0x6e, 0x65, 0x6d, 0x61, 0x74, 0x69, - 0x63, 0x73, 0x46, 0x69, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x06, 0x66, 0x6f, - 0x72, 0x6d, 0x61, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x6b, 0x69, 0x6e, 0x65, 0x6d, 0x61, 0x74, 0x69, - 0x63, 0x73, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x6b, - 0x69, 0x6e, 0x65, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x73, 0x44, 0x61, 0x74, 0x61, 0x12, 0x76, 0x0a, - 0x17, 0x6d, 0x65, 0x73, 0x68, 0x65, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x75, 0x72, 0x64, 0x66, 0x5f, - 0x66, 0x69, 0x6c, 0x65, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, - 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x4b, 0x69, 0x6e, 0x65, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x65, 0x73, 0x42, 0x79, 0x55, 0x72, - 0x64, 0x66, 0x46, 0x69, 0x6c, 0x65, 0x70, 0x61, 0x74, 0x68, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x14, 0x6d, 0x65, 0x73, 0x68, 0x65, 0x73, 0x42, 0x79, 0x55, 0x72, 0x64, 0x66, 0x46, 0x69, 0x6c, - 0x65, 0x70, 0x61, 0x74, 0x68, 0x1a, 0x5d, 0x0a, 0x19, 0x4d, 0x65, 0x73, 0x68, 0x65, 0x73, 0x42, - 0x79, 0x55, 0x72, 0x64, 0x66, 0x46, 0x69, 0x6c, 0x65, 0x70, 0x61, 0x74, 0x68, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x22, 0x59, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, - 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x63, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, - 0x51, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x67, 0x65, 0x6f, 0x6d, - 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, + 0x74, 0x22, 0x26, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x44, 0x0a, 0x11, 0x47, 0x65, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, + 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, + 0x59, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x4b, 0x69, 0x6e, 0x65, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x65, + 0x78, 0x74, 0x72, 0x61, 0x18, 0x63, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, + 0x75, 0x63, 0x74, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, 0xd5, 0x02, 0x0a, 0x15, 0x47, + 0x65, 0x74, 0x4b, 0x69, 0x6e, 0x65, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x69, 0x6e, 0x65, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x73, + 0x46, 0x69, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x6b, 0x69, 0x6e, 0x65, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x73, + 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x6b, 0x69, 0x6e, + 0x65, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x73, 0x44, 0x61, 0x74, 0x61, 0x12, 0x76, 0x0a, 0x17, 0x6d, + 0x65, 0x73, 0x68, 0x65, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x75, 0x72, 0x64, 0x66, 0x5f, 0x66, 0x69, + 0x6c, 0x65, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, - 0x65, 0x73, 0x22, 0x57, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x33, 0x44, 0x4d, 0x6f, 0x64, 0x65, 0x6c, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x05, - 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x63, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, - 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, 0xaf, 0x01, 0x0a, 0x13, - 0x47, 0x65, 0x74, 0x33, 0x44, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x06, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x33, 0x44, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x1a, 0x4f, 0x0a, 0x0b, - 0x4d, 0x6f, 0x64, 0x65, 0x6c, 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, 0x2a, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, - 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, - 0x73, 0x68, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x57, 0x0a, - 0x12, 0x47, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, - 0x18, 0x63, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, - 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, 0xb9, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x52, 0x65, - 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, - 0x0a, 0x08, 0x72, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x31, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x1a, 0x53, 0x0a, - 0x0d, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 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, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x22, 0x97, 0x02, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, - 0x6f, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x2e, 0x0a, 0x04, 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, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x6f, 0x67, - 0x67, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x06, + 0x74, 0x4b, 0x69, 0x6e, 0x65, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x65, 0x73, 0x42, 0x79, 0x55, 0x72, 0x64, 0x66, + 0x46, 0x69, 0x6c, 0x65, 0x70, 0x61, 0x74, 0x68, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x14, 0x6d, + 0x65, 0x73, 0x68, 0x65, 0x73, 0x42, 0x79, 0x55, 0x72, 0x64, 0x66, 0x46, 0x69, 0x6c, 0x65, 0x70, + 0x61, 0x74, 0x68, 0x1a, 0x5d, 0x0a, 0x19, 0x4d, 0x65, 0x73, 0x68, 0x65, 0x73, 0x42, 0x79, 0x55, + 0x72, 0x64, 0x66, 0x46, 0x69, 0x6c, 0x65, 0x70, 0x61, 0x74, 0x68, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x22, 0x59, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, + 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x63, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, 0x51, 0x0a, + 0x15, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x69, 0x61, + 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6f, 0x6d, + 0x65, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, + 0x22, 0x57, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x33, 0x44, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x78, + 0x74, 0x72, 0x61, 0x18, 0x63, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, 0xaf, 0x01, 0x0a, 0x13, 0x47, 0x65, + 0x74, 0x33, 0x44, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x47, 0x0a, 0x06, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x2f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x33, 0x44, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x06, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x1a, 0x4f, 0x0a, 0x0b, 0x4d, 0x6f, + 0x64, 0x65, 0x6c, 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, 0x2a, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x69, 0x61, + 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x68, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x57, 0x0a, 0x12, 0x47, + 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x63, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x06, 0x63, - 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x12, 0x2f, 0x0a, 0x06, 0x66, - 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, - 0x72, 0x75, 0x63, 0x74, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x22, 0x6a, 0x0a, 0x09, - 0x41, 0x75, 0x64, 0x69, 0x6f, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x64, - 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x12, - 0x24, 0x0a, 0x0e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x68, - 0x7a, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x52, - 0x61, 0x74, 0x65, 0x48, 0x7a, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x75, 0x6d, 0x5f, 0x63, 0x68, 0x61, - 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6e, 0x75, 0x6d, - 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x22, 0x59, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, - 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x63, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x65, 0x78, - 0x74, 0x72, 0x61, 0x22, 0x8b, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, - 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, - 0x10, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x63, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, - 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x63, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x73, 0x61, 0x6d, 0x70, - 0x6c, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x68, 0x7a, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x0c, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x61, 0x74, 0x65, 0x48, 0x7a, 0x12, 0x21, - 0x0a, 0x0c, 0x6e, 0x75, 0x6d, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6e, 0x75, 0x6d, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, - 0x73, 0x2a, 0x7f, 0x0a, 0x14, 0x4b, 0x69, 0x6e, 0x65, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x73, 0x46, - 0x69, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x26, 0x0a, 0x22, 0x4b, 0x49, 0x4e, - 0x45, 0x4d, 0x41, 0x54, 0x49, 0x43, 0x53, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x46, 0x4f, 0x52, - 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x1e, 0x0a, 0x1a, 0x4b, 0x49, 0x4e, 0x45, 0x4d, 0x41, 0x54, 0x49, 0x43, 0x53, 0x5f, - 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x53, 0x56, 0x41, 0x10, - 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x4b, 0x49, 0x4e, 0x45, 0x4d, 0x41, 0x54, 0x49, 0x43, 0x53, 0x5f, - 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x52, 0x44, 0x46, - 0x10, 0x02, 0x3a, 0x61, 0x0a, 0x1a, 0x73, 0x61, 0x66, 0x65, 0x74, 0x79, 0x5f, 0x68, 0x65, 0x61, - 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x65, 0x64, - 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0xa4, 0x92, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x73, 0x61, 0x66, 0x65, 0x74, 0x79, - 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x65, 0x64, 0x88, 0x01, 0x01, 0x42, 0x2f, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, - 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x5a, 0x19, 0x67, 0x6f, 0x2e, - 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x65, + 0x78, 0x74, 0x72, 0x61, 0x22, 0xb9, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, + 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x08, + 0x72, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, + 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x1a, 0x53, 0x0a, 0x0d, 0x52, + 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 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, 0x2c, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x22, 0x97, 0x02, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x12, 0x0a, + 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, + 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x2e, 0x0a, 0x04, 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, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x6f, 0x67, 0x67, 0x65, + 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6c, 0x6f, + 0x67, 0x67, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x06, 0x63, 0x61, 0x6c, + 0x6c, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x12, 0x2f, 0x0a, 0x06, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x22, 0x6a, 0x0a, 0x09, 0x41, 0x75, + 0x64, 0x69, 0x6f, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x12, 0x24, 0x0a, + 0x0e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x68, 0x7a, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x61, 0x74, + 0x65, 0x48, 0x7a, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x75, 0x6d, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, + 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6e, 0x75, 0x6d, 0x43, 0x68, + 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x22, 0x59, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, + 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x63, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, + 0x61, 0x22, 0x8b, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x73, + 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, + 0x43, 0x6f, 0x64, 0x65, 0x63, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x68, 0x7a, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, + 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x61, 0x74, 0x65, 0x48, 0x7a, 0x12, 0x21, 0x0a, 0x0c, + 0x6e, 0x75, 0x6d, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0b, 0x6e, 0x75, 0x6d, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x2a, + 0x7f, 0x0a, 0x14, 0x4b, 0x69, 0x6e, 0x65, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x73, 0x46, 0x69, 0x6c, + 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x26, 0x0a, 0x22, 0x4b, 0x49, 0x4e, 0x45, 0x4d, + 0x41, 0x54, 0x49, 0x43, 0x53, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, + 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x1e, 0x0a, 0x1a, 0x4b, 0x49, 0x4e, 0x45, 0x4d, 0x41, 0x54, 0x49, 0x43, 0x53, 0x5f, 0x46, 0x49, + 0x4c, 0x45, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x53, 0x56, 0x41, 0x10, 0x01, 0x12, + 0x1f, 0x0a, 0x1b, 0x4b, 0x49, 0x4e, 0x45, 0x4d, 0x41, 0x54, 0x49, 0x43, 0x53, 0x5f, 0x46, 0x49, + 0x4c, 0x45, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x52, 0x44, 0x46, 0x10, 0x02, + 0x3a, 0x61, 0x0a, 0x1a, 0x73, 0x61, 0x66, 0x65, 0x74, 0x79, 0x5f, 0x68, 0x65, 0x61, 0x72, 0x74, + 0x62, 0x65, 0x61, 0x74, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x12, 0x1e, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa4, + 0x92, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x73, 0x61, 0x66, 0x65, 0x74, 0x79, 0x48, 0x65, + 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x65, 0x64, + 0x88, 0x01, 0x01, 0x42, 0x2f, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x5a, 0x19, 0x67, 0x6f, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2529,7 +2628,7 @@ func file_common_v1_common_proto_rawDescGZIP() []byte { } var file_common_v1_common_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_common_v1_common_proto_msgTypes = make([]protoimpl.MessageInfo, 37) +var file_common_v1_common_proto_msgTypes = make([]protoimpl.MessageInfo, 39) var file_common_v1_common_proto_goTypes = []any{ (KinematicsFileFormat)(0), // 0: viam.common.v1.KinematicsFileFormat (*ResourceName)(nil), // 1: viam.common.v1.ResourceName @@ -2554,25 +2653,27 @@ var file_common_v1_common_proto_goTypes = []any{ (*ResponseMetadata)(nil), // 20: viam.common.v1.ResponseMetadata (*DoCommandRequest)(nil), // 21: viam.common.v1.DoCommandRequest (*DoCommandResponse)(nil), // 22: viam.common.v1.DoCommandResponse - (*GetKinematicsRequest)(nil), // 23: viam.common.v1.GetKinematicsRequest - (*GetKinematicsResponse)(nil), // 24: viam.common.v1.GetKinematicsResponse - (*GetGeometriesRequest)(nil), // 25: viam.common.v1.GetGeometriesRequest - (*GetGeometriesResponse)(nil), // 26: viam.common.v1.GetGeometriesResponse - (*Get3DModelsRequest)(nil), // 27: viam.common.v1.Get3DModelsRequest - (*Get3DModelsResponse)(nil), // 28: viam.common.v1.Get3DModelsResponse - (*GetReadingsRequest)(nil), // 29: viam.common.v1.GetReadingsRequest - (*GetReadingsResponse)(nil), // 30: viam.common.v1.GetReadingsResponse - (*LogEntry)(nil), // 31: viam.common.v1.LogEntry - (*AudioInfo)(nil), // 32: viam.common.v1.AudioInfo - (*GetPropertiesRequest)(nil), // 33: viam.common.v1.GetPropertiesRequest - (*GetPropertiesResponse)(nil), // 34: viam.common.v1.GetPropertiesResponse - nil, // 35: viam.common.v1.GetKinematicsResponse.MeshesByUrdfFilepathEntry - nil, // 36: viam.common.v1.Get3DModelsResponse.ModelsEntry - nil, // 37: viam.common.v1.GetReadingsResponse.ReadingsEntry - (*structpb.Struct)(nil), // 38: google.protobuf.Struct - (*timestamppb.Timestamp)(nil), // 39: google.protobuf.Timestamp - (*structpb.Value)(nil), // 40: google.protobuf.Value - (*descriptorpb.MethodOptions)(nil), // 41: google.protobuf.MethodOptions + (*GetStatusRequest)(nil), // 23: viam.common.v1.GetStatusRequest + (*GetStatusResponse)(nil), // 24: viam.common.v1.GetStatusResponse + (*GetKinematicsRequest)(nil), // 25: viam.common.v1.GetKinematicsRequest + (*GetKinematicsResponse)(nil), // 26: viam.common.v1.GetKinematicsResponse + (*GetGeometriesRequest)(nil), // 27: viam.common.v1.GetGeometriesRequest + (*GetGeometriesResponse)(nil), // 28: viam.common.v1.GetGeometriesResponse + (*Get3DModelsRequest)(nil), // 29: viam.common.v1.Get3DModelsRequest + (*Get3DModelsResponse)(nil), // 30: viam.common.v1.Get3DModelsResponse + (*GetReadingsRequest)(nil), // 31: viam.common.v1.GetReadingsRequest + (*GetReadingsResponse)(nil), // 32: viam.common.v1.GetReadingsResponse + (*LogEntry)(nil), // 33: viam.common.v1.LogEntry + (*AudioInfo)(nil), // 34: viam.common.v1.AudioInfo + (*GetPropertiesRequest)(nil), // 35: viam.common.v1.GetPropertiesRequest + (*GetPropertiesResponse)(nil), // 36: viam.common.v1.GetPropertiesResponse + nil, // 37: viam.common.v1.GetKinematicsResponse.MeshesByUrdfFilepathEntry + nil, // 38: viam.common.v1.Get3DModelsResponse.ModelsEntry + nil, // 39: viam.common.v1.GetReadingsResponse.ReadingsEntry + (*structpb.Struct)(nil), // 40: google.protobuf.Struct + (*timestamppb.Timestamp)(nil), // 41: google.protobuf.Timestamp + (*structpb.Value)(nil), // 42: google.protobuf.Value + (*descriptorpb.MethodOptions)(nil), // 43: google.protobuf.MethodOptions } var file_common_v1_common_proto_depIdxs = []int32{ 2, // 0: viam.common.v1.PoseInFrame.pose:type_name -> viam.common.v1.Pose @@ -2590,34 +2691,35 @@ var file_common_v1_common_proto_depIdxs = []int32{ 12, // 12: viam.common.v1.GeoGeometry.geometries:type_name -> viam.common.v1.Geometry 5, // 13: viam.common.v1.Transform.pose_in_observer_frame:type_name -> viam.common.v1.PoseInFrame 12, // 14: viam.common.v1.Transform.physical_object:type_name -> viam.common.v1.Geometry - 38, // 15: viam.common.v1.Transform.metadata:type_name -> google.protobuf.Struct + 40, // 15: viam.common.v1.Transform.metadata:type_name -> google.protobuf.Struct 13, // 16: viam.common.v1.WorldState.obstacles:type_name -> viam.common.v1.GeometriesInFrame 17, // 17: viam.common.v1.WorldState.transforms:type_name -> viam.common.v1.Transform - 39, // 18: viam.common.v1.ResponseMetadata.captured_at:type_name -> google.protobuf.Timestamp - 38, // 19: viam.common.v1.DoCommandRequest.command:type_name -> google.protobuf.Struct - 38, // 20: viam.common.v1.DoCommandResponse.result:type_name -> google.protobuf.Struct - 38, // 21: viam.common.v1.GetKinematicsRequest.extra:type_name -> google.protobuf.Struct - 0, // 22: viam.common.v1.GetKinematicsResponse.format:type_name -> viam.common.v1.KinematicsFileFormat - 35, // 23: viam.common.v1.GetKinematicsResponse.meshes_by_urdf_filepath:type_name -> viam.common.v1.GetKinematicsResponse.MeshesByUrdfFilepathEntry - 38, // 24: viam.common.v1.GetGeometriesRequest.extra:type_name -> google.protobuf.Struct - 12, // 25: viam.common.v1.GetGeometriesResponse.geometries:type_name -> viam.common.v1.Geometry - 38, // 26: viam.common.v1.Get3DModelsRequest.extra:type_name -> google.protobuf.Struct - 36, // 27: viam.common.v1.Get3DModelsResponse.models:type_name -> viam.common.v1.Get3DModelsResponse.ModelsEntry - 38, // 28: viam.common.v1.GetReadingsRequest.extra:type_name -> google.protobuf.Struct - 37, // 29: viam.common.v1.GetReadingsResponse.readings:type_name -> viam.common.v1.GetReadingsResponse.ReadingsEntry - 39, // 30: viam.common.v1.LogEntry.time:type_name -> google.protobuf.Timestamp - 38, // 31: viam.common.v1.LogEntry.caller:type_name -> google.protobuf.Struct - 38, // 32: viam.common.v1.LogEntry.fields:type_name -> google.protobuf.Struct - 38, // 33: viam.common.v1.GetPropertiesRequest.extra:type_name -> google.protobuf.Struct - 10, // 34: viam.common.v1.GetKinematicsResponse.MeshesByUrdfFilepathEntry.value:type_name -> viam.common.v1.Mesh - 10, // 35: viam.common.v1.Get3DModelsResponse.ModelsEntry.value:type_name -> viam.common.v1.Mesh - 40, // 36: viam.common.v1.GetReadingsResponse.ReadingsEntry.value:type_name -> google.protobuf.Value - 41, // 37: viam.common.v1.safety_heartbeat_monitored:extendee -> google.protobuf.MethodOptions - 38, // [38:38] is the sub-list for method output_type - 38, // [38:38] is the sub-list for method input_type - 38, // [38:38] is the sub-list for extension type_name - 37, // [37:38] is the sub-list for extension extendee - 0, // [0:37] is the sub-list for field type_name + 41, // 18: viam.common.v1.ResponseMetadata.captured_at:type_name -> google.protobuf.Timestamp + 40, // 19: viam.common.v1.DoCommandRequest.command:type_name -> google.protobuf.Struct + 40, // 20: viam.common.v1.DoCommandResponse.result:type_name -> google.protobuf.Struct + 40, // 21: viam.common.v1.GetStatusResponse.result:type_name -> google.protobuf.Struct + 40, // 22: viam.common.v1.GetKinematicsRequest.extra:type_name -> google.protobuf.Struct + 0, // 23: viam.common.v1.GetKinematicsResponse.format:type_name -> viam.common.v1.KinematicsFileFormat + 37, // 24: viam.common.v1.GetKinematicsResponse.meshes_by_urdf_filepath:type_name -> viam.common.v1.GetKinematicsResponse.MeshesByUrdfFilepathEntry + 40, // 25: viam.common.v1.GetGeometriesRequest.extra:type_name -> google.protobuf.Struct + 12, // 26: viam.common.v1.GetGeometriesResponse.geometries:type_name -> viam.common.v1.Geometry + 40, // 27: viam.common.v1.Get3DModelsRequest.extra:type_name -> google.protobuf.Struct + 38, // 28: viam.common.v1.Get3DModelsResponse.models:type_name -> viam.common.v1.Get3DModelsResponse.ModelsEntry + 40, // 29: viam.common.v1.GetReadingsRequest.extra:type_name -> google.protobuf.Struct + 39, // 30: viam.common.v1.GetReadingsResponse.readings:type_name -> viam.common.v1.GetReadingsResponse.ReadingsEntry + 41, // 31: viam.common.v1.LogEntry.time:type_name -> google.protobuf.Timestamp + 40, // 32: viam.common.v1.LogEntry.caller:type_name -> google.protobuf.Struct + 40, // 33: viam.common.v1.LogEntry.fields:type_name -> google.protobuf.Struct + 40, // 34: viam.common.v1.GetPropertiesRequest.extra:type_name -> google.protobuf.Struct + 10, // 35: viam.common.v1.GetKinematicsResponse.MeshesByUrdfFilepathEntry.value:type_name -> viam.common.v1.Mesh + 10, // 36: viam.common.v1.Get3DModelsResponse.ModelsEntry.value:type_name -> viam.common.v1.Mesh + 42, // 37: viam.common.v1.GetReadingsResponse.ReadingsEntry.value:type_name -> google.protobuf.Value + 43, // 38: viam.common.v1.safety_heartbeat_monitored:extendee -> google.protobuf.MethodOptions + 39, // [39:39] is the sub-list for method output_type + 39, // [39:39] is the sub-list for method input_type + 39, // [39:39] is the sub-list for extension type_name + 38, // [38:39] is the sub-list for extension extendee + 0, // [0:38] is the sub-list for field type_name } func init() { file_common_v1_common_proto_init() } @@ -2641,7 +2743,7 @@ func file_common_v1_common_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_common_v1_common_proto_rawDesc, NumEnums: 1, - NumMessages: 37, + NumMessages: 39, NumExtensions: 1, NumServices: 0, }, diff --git a/component/arm/v1/arm.pb.go b/component/arm/v1/arm.pb.go index fbcb3a4892..be81283d09 100644 --- a/component/arm/v1/arm.pb.go +++ b/component/arm/v1/arm.pb.go @@ -1020,8 +1020,8 @@ var file_component_arm_v1_arm_proto_rawDesc = []byte{ 0x72, 0x53, 0x65, 0x63, 0x32, 0x4a, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x76, 0x65, 0x6c, 0x5f, 0x64, 0x65, 0x67, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x63, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x61, 0x63, 0x63, - 0x5f, 0x64, 0x65, 0x67, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x63, 0x32, 0x32, 0xff, - 0x0d, 0x0a, 0x0a, 0x41, 0x72, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa1, 0x01, + 0x5f, 0x64, 0x65, 0x67, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x63, 0x32, 0x32, 0x88, + 0x0f, 0x0a, 0x0a, 0x41, 0x72, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa1, 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x61, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x64, 0x50, @@ -1105,39 +1105,47 @@ var file_component_arm_v1_arm_proto_rawDesc = []byte{ 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x22, 0x2c, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x72, 0x6d, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x64, 0x6f, - 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x92, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, - 0x4b, 0x69, 0x6e, 0x65, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x73, 0x12, 0x24, 0x2e, 0x76, 0x69, 0x61, - 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4b, - 0x69, 0x6e, 0x65, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x25, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4b, 0x69, 0x6e, 0x65, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, - 0x2c, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, - 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x72, 0x6d, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, - 0x65, 0x7d, 0x2f, 0x6b, 0x69, 0x6e, 0x65, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x73, 0x12, 0x92, 0x01, - 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, - 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, - 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x72, 0x6d, - 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, - 0x65, 0x73, 0x12, 0x8b, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x33, 0x44, 0x4d, 0x6f, 0x64, 0x65, - 0x6c, 0x73, 0x12, 0x22, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x33, 0x44, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x33, 0x44, 0x4d, 0x6f, 0x64, - 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x86, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x72, 0x6d, 0x2f, - 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x33, 0x64, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, - 0x42, 0x3d, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, - 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x61, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x5a, 0x20, 0x67, - 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, - 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x72, 0x6d, 0x2f, 0x76, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x92, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4b, 0x69, 0x6e, 0x65, 0x6d, 0x61, 0x74, + 0x69, 0x63, 0x73, 0x12, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4b, 0x69, 0x6e, 0x65, 0x6d, 0x61, 0x74, 0x69, + 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x76, 0x69, 0x61, 0x6d, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4b, 0x69, + 0x6e, 0x65, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x2f, 0x61, 0x72, 0x6d, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6b, 0x69, 0x6e, 0x65, + 0x6d, 0x61, 0x74, 0x69, 0x63, 0x73, 0x12, 0x92, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x47, 0x65, + 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, + 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, + 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, + 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x72, 0x6d, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, + 0x2f, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x8b, 0x01, 0x0a, 0x0b, + 0x47, 0x65, 0x74, 0x33, 0x44, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x12, 0x22, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x33, 0x44, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x23, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x33, 0x44, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x76, + 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x72, 0x6d, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, + 0x33, 0x64, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x42, 0x3d, 0x0a, 0x19, 0x63, 0x6f, 0x6d, + 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, + 0x61, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x5a, 0x20, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, + 0x74, 0x2f, 0x61, 0x72, 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1174,13 +1182,15 @@ var file_component_arm_v1_arm_proto_goTypes = []any{ (*structpb.Struct)(nil), // 17: google.protobuf.Struct (*v1.Pose)(nil), // 18: viam.common.v1.Pose (*v1.DoCommandRequest)(nil), // 19: viam.common.v1.DoCommandRequest - (*v1.GetKinematicsRequest)(nil), // 20: viam.common.v1.GetKinematicsRequest - (*v1.GetGeometriesRequest)(nil), // 21: viam.common.v1.GetGeometriesRequest - (*v1.Get3DModelsRequest)(nil), // 22: viam.common.v1.Get3DModelsRequest - (*v1.DoCommandResponse)(nil), // 23: viam.common.v1.DoCommandResponse - (*v1.GetKinematicsResponse)(nil), // 24: viam.common.v1.GetKinematicsResponse - (*v1.GetGeometriesResponse)(nil), // 25: viam.common.v1.GetGeometriesResponse - (*v1.Get3DModelsResponse)(nil), // 26: viam.common.v1.Get3DModelsResponse + (*v1.GetStatusRequest)(nil), // 20: viam.common.v1.GetStatusRequest + (*v1.GetKinematicsRequest)(nil), // 21: viam.common.v1.GetKinematicsRequest + (*v1.GetGeometriesRequest)(nil), // 22: viam.common.v1.GetGeometriesRequest + (*v1.Get3DModelsRequest)(nil), // 23: viam.common.v1.Get3DModelsRequest + (*v1.DoCommandResponse)(nil), // 24: viam.common.v1.DoCommandResponse + (*v1.GetStatusResponse)(nil), // 25: viam.common.v1.GetStatusResponse + (*v1.GetKinematicsResponse)(nil), // 26: viam.common.v1.GetKinematicsResponse + (*v1.GetGeometriesResponse)(nil), // 27: viam.common.v1.GetGeometriesResponse + (*v1.Get3DModelsResponse)(nil), // 28: viam.common.v1.Get3DModelsResponse } var file_component_arm_v1_arm_proto_depIdxs = []int32{ 17, // 0: viam.component.arm.v1.GetEndPositionRequest.extra:type_name -> google.protobuf.Struct @@ -1205,22 +1215,24 @@ var file_component_arm_v1_arm_proto_depIdxs = []int32{ 11, // 19: viam.component.arm.v1.ArmService.Stop:input_type -> viam.component.arm.v1.StopRequest 14, // 20: viam.component.arm.v1.ArmService.IsMoving:input_type -> viam.component.arm.v1.IsMovingRequest 19, // 21: viam.component.arm.v1.ArmService.DoCommand:input_type -> viam.common.v1.DoCommandRequest - 20, // 22: viam.component.arm.v1.ArmService.GetKinematics:input_type -> viam.common.v1.GetKinematicsRequest - 21, // 23: viam.component.arm.v1.ArmService.GetGeometries:input_type -> viam.common.v1.GetGeometriesRequest - 22, // 24: viam.component.arm.v1.ArmService.Get3DModels:input_type -> viam.common.v1.Get3DModelsRequest - 1, // 25: viam.component.arm.v1.ArmService.GetEndPosition:output_type -> viam.component.arm.v1.GetEndPositionResponse - 6, // 26: viam.component.arm.v1.ArmService.MoveToPosition:output_type -> viam.component.arm.v1.MoveToPositionResponse - 4, // 27: viam.component.arm.v1.ArmService.GetJointPositions:output_type -> viam.component.arm.v1.GetJointPositionsResponse - 8, // 28: viam.component.arm.v1.ArmService.MoveToJointPositions:output_type -> viam.component.arm.v1.MoveToJointPositionsResponse - 10, // 29: viam.component.arm.v1.ArmService.MoveThroughJointPositions:output_type -> viam.component.arm.v1.MoveThroughJointPositionsResponse - 12, // 30: viam.component.arm.v1.ArmService.Stop:output_type -> viam.component.arm.v1.StopResponse - 15, // 31: viam.component.arm.v1.ArmService.IsMoving:output_type -> viam.component.arm.v1.IsMovingResponse - 23, // 32: viam.component.arm.v1.ArmService.DoCommand:output_type -> viam.common.v1.DoCommandResponse - 24, // 33: viam.component.arm.v1.ArmService.GetKinematics:output_type -> viam.common.v1.GetKinematicsResponse - 25, // 34: viam.component.arm.v1.ArmService.GetGeometries:output_type -> viam.common.v1.GetGeometriesResponse - 26, // 35: viam.component.arm.v1.ArmService.Get3DModels:output_type -> viam.common.v1.Get3DModelsResponse - 25, // [25:36] is the sub-list for method output_type - 14, // [14:25] is the sub-list for method input_type + 20, // 22: viam.component.arm.v1.ArmService.GetStatus:input_type -> viam.common.v1.GetStatusRequest + 21, // 23: viam.component.arm.v1.ArmService.GetKinematics:input_type -> viam.common.v1.GetKinematicsRequest + 22, // 24: viam.component.arm.v1.ArmService.GetGeometries:input_type -> viam.common.v1.GetGeometriesRequest + 23, // 25: viam.component.arm.v1.ArmService.Get3DModels:input_type -> viam.common.v1.Get3DModelsRequest + 1, // 26: viam.component.arm.v1.ArmService.GetEndPosition:output_type -> viam.component.arm.v1.GetEndPositionResponse + 6, // 27: viam.component.arm.v1.ArmService.MoveToPosition:output_type -> viam.component.arm.v1.MoveToPositionResponse + 4, // 28: viam.component.arm.v1.ArmService.GetJointPositions:output_type -> viam.component.arm.v1.GetJointPositionsResponse + 8, // 29: viam.component.arm.v1.ArmService.MoveToJointPositions:output_type -> viam.component.arm.v1.MoveToJointPositionsResponse + 10, // 30: viam.component.arm.v1.ArmService.MoveThroughJointPositions:output_type -> viam.component.arm.v1.MoveThroughJointPositionsResponse + 12, // 31: viam.component.arm.v1.ArmService.Stop:output_type -> viam.component.arm.v1.StopResponse + 15, // 32: viam.component.arm.v1.ArmService.IsMoving:output_type -> viam.component.arm.v1.IsMovingResponse + 24, // 33: viam.component.arm.v1.ArmService.DoCommand:output_type -> viam.common.v1.DoCommandResponse + 25, // 34: viam.component.arm.v1.ArmService.GetStatus:output_type -> viam.common.v1.GetStatusResponse + 26, // 35: viam.component.arm.v1.ArmService.GetKinematics:output_type -> viam.common.v1.GetKinematicsResponse + 27, // 36: viam.component.arm.v1.ArmService.GetGeometries:output_type -> viam.common.v1.GetGeometriesResponse + 28, // 37: viam.component.arm.v1.ArmService.Get3DModels:output_type -> viam.common.v1.Get3DModelsResponse + 26, // [26:38] is the sub-list for method output_type + 14, // [14:26] is the sub-list for method input_type 14, // [14:14] is the sub-list for extension type_name 14, // [14:14] is the sub-list for extension extendee 0, // [0:14] is the sub-list for field type_name diff --git a/component/arm/v1/arm.pb.gw.go b/component/arm/v1/arm.pb.gw.go index f971684bfb..3cfc745212 100644 --- a/component/arm/v1/arm.pb.gw.go +++ b/component/arm/v1/arm.pb.gw.go @@ -574,6 +574,58 @@ func local_request_ArmService_DoCommand_0(ctx context.Context, marshaler runtime } +func request_ArmService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, client ArmServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_ArmService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, server ArmServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetStatus(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_ArmService_GetKinematics_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) @@ -990,6 +1042,31 @@ func RegisterArmServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, }) + mux.Handle("GET", pattern_ArmService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.arm.v1.ArmService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/component/arm/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ArmService_GetStatus_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_ArmService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_ArmService_GetKinematics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1282,6 +1359,28 @@ func RegisterArmServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, }) + mux.Handle("GET", pattern_ArmService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.arm.v1.ArmService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/component/arm/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ArmService_GetStatus_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_ArmService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_ArmService_GetKinematics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1368,6 +1467,8 @@ var ( pattern_ArmService_DoCommand_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "arm", "name", "do_command"}, "")) + pattern_ArmService_GetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "arm", "name", "get_status"}, "")) + pattern_ArmService_GetKinematics_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "arm", "name", "kinematics"}, "")) pattern_ArmService_GetGeometries_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "arm", "name", "geometries"}, "")) @@ -1392,6 +1493,8 @@ var ( forward_ArmService_DoCommand_0 = runtime.ForwardResponseMessage + forward_ArmService_GetStatus_0 = runtime.ForwardResponseMessage + forward_ArmService_GetKinematics_0 = runtime.ForwardResponseMessage forward_ArmService_GetGeometries_0 = runtime.ForwardResponseMessage diff --git a/component/arm/v1/arm_grpc.pb.go b/component/arm/v1/arm_grpc.pb.go index c6b5bfbadf..d4ad6abf00 100644 --- a/component/arm/v1/arm_grpc.pb.go +++ b/component/arm/v1/arm_grpc.pb.go @@ -43,6 +43,8 @@ type ArmServiceClient interface { IsMoving(ctx context.Context, in *IsMovingRequest, opts ...grpc.CallOption) (*IsMovingResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(ctx context.Context, in *v1.DoCommandRequest, opts ...grpc.CallOption) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) // GetKinematics returns the kinematics file for the component GetKinematics(ctx context.Context, in *v1.GetKinematicsRequest, opts ...grpc.CallOption) (*v1.GetKinematicsResponse, error) // GetGeometries returns the geometries of the component in their current configuration @@ -131,6 +133,15 @@ func (c *armServiceClient) DoCommand(ctx context.Context, in *v1.DoCommandReques return out, nil } +func (c *armServiceClient) GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) { + out := new(v1.GetStatusResponse) + err := c.cc.Invoke(ctx, "/viam.component.arm.v1.ArmService/GetStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *armServiceClient) GetKinematics(ctx context.Context, in *v1.GetKinematicsRequest, opts ...grpc.CallOption) (*v1.GetKinematicsResponse, error) { out := new(v1.GetKinematicsResponse) err := c.cc.Invoke(ctx, "/viam.component.arm.v1.ArmService/GetKinematics", in, out, opts...) @@ -182,6 +193,8 @@ type ArmServiceServer interface { IsMoving(context.Context, *IsMovingRequest) (*IsMovingResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) // GetKinematics returns the kinematics file for the component GetKinematics(context.Context, *v1.GetKinematicsRequest) (*v1.GetKinematicsResponse, error) // GetGeometries returns the geometries of the component in their current configuration @@ -219,6 +232,9 @@ func (UnimplementedArmServiceServer) IsMoving(context.Context, *IsMovingRequest) func (UnimplementedArmServiceServer) DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DoCommand not implemented") } +func (UnimplementedArmServiceServer) GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented") +} func (UnimplementedArmServiceServer) GetKinematics(context.Context, *v1.GetKinematicsRequest) (*v1.GetKinematicsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetKinematics not implemented") } @@ -385,6 +401,24 @@ func _ArmService_DoCommand_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } +func _ArmService_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArmServiceServer).GetStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.arm.v1.ArmService/GetStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArmServiceServer).GetStatus(ctx, req.(*v1.GetStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _ArmService_GetKinematics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(v1.GetKinematicsRequest) if err := dec(in); err != nil { @@ -478,6 +512,10 @@ var ArmService_ServiceDesc = grpc.ServiceDesc{ MethodName: "DoCommand", Handler: _ArmService_DoCommand_Handler, }, + { + MethodName: "GetStatus", + Handler: _ArmService_GetStatus_Handler, + }, { MethodName: "GetKinematics", Handler: _ArmService_GetKinematics_Handler, diff --git a/component/audioin/v1/audioin.pb.go b/component/audioin/v1/audioin.pb.go index 6d79e77798..758aa700db 100644 --- a/component/audioin/v1/audioin.pb.go +++ b/component/audioin/v1/audioin.pb.go @@ -297,7 +297,7 @@ var file_component_audioin_v1_audioin_proto_rawDesc = []byte{ 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, - 0x32, 0xee, 0x04, 0x0a, 0x0e, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x49, 0x6e, 0x53, 0x65, 0x72, 0x76, + 0x32, 0xf9, 0x05, 0x0a, 0x0e, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x49, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x9e, 0x01, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x12, 0x2a, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, @@ -326,21 +326,30 @@ var file_component_audioin_v1_audioin_proto_rawDesc = []byte{ 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x22, 0x2e, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x69, 0x6e, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x64, 0x6f, - 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x96, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, - 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x76, 0x69, 0x61, - 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, - 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x25, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x12, - 0x30, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, - 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x69, 0x6e, 0x2f, - 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, - 0x73, 0x42, 0x45, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, - 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x69, 0x6e, 0x2e, - 0x76, 0x31, 0x5a, 0x24, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x75, - 0x64, 0x69, 0x6f, 0x69, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x88, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x30, 0x12, 0x2e, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x69, + 0x6e, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x96, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x12, 0x30, 0x2f, 0x76, 0x69, 0x61, + 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x2f, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x69, 0x6e, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, + 0x7d, 0x2f, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x42, 0x45, 0x0a, 0x1d, + 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x5a, 0x24, 0x67, + 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x69, 0x6e, + 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -364,10 +373,12 @@ var file_component_audioin_v1_audioin_proto_goTypes = []any{ (*v1.AudioInfo)(nil), // 4: viam.common.v1.AudioInfo (*v1.GetPropertiesRequest)(nil), // 5: viam.common.v1.GetPropertiesRequest (*v1.DoCommandRequest)(nil), // 6: viam.common.v1.DoCommandRequest - (*v1.GetGeometriesRequest)(nil), // 7: viam.common.v1.GetGeometriesRequest - (*v1.GetPropertiesResponse)(nil), // 8: viam.common.v1.GetPropertiesResponse - (*v1.DoCommandResponse)(nil), // 9: viam.common.v1.DoCommandResponse - (*v1.GetGeometriesResponse)(nil), // 10: viam.common.v1.GetGeometriesResponse + (*v1.GetStatusRequest)(nil), // 7: viam.common.v1.GetStatusRequest + (*v1.GetGeometriesRequest)(nil), // 8: viam.common.v1.GetGeometriesRequest + (*v1.GetPropertiesResponse)(nil), // 9: viam.common.v1.GetPropertiesResponse + (*v1.DoCommandResponse)(nil), // 10: viam.common.v1.DoCommandResponse + (*v1.GetStatusResponse)(nil), // 11: viam.common.v1.GetStatusResponse + (*v1.GetGeometriesResponse)(nil), // 12: viam.common.v1.GetGeometriesResponse } var file_component_audioin_v1_audioin_proto_depIdxs = []int32{ 3, // 0: viam.component.audioin.v1.GetAudioRequest.extra:type_name -> google.protobuf.Struct @@ -376,13 +387,15 @@ var file_component_audioin_v1_audioin_proto_depIdxs = []int32{ 0, // 3: viam.component.audioin.v1.AudioInService.GetAudio:input_type -> viam.component.audioin.v1.GetAudioRequest 5, // 4: viam.component.audioin.v1.AudioInService.GetProperties:input_type -> viam.common.v1.GetPropertiesRequest 6, // 5: viam.component.audioin.v1.AudioInService.DoCommand:input_type -> viam.common.v1.DoCommandRequest - 7, // 6: viam.component.audioin.v1.AudioInService.GetGeometries:input_type -> viam.common.v1.GetGeometriesRequest - 1, // 7: viam.component.audioin.v1.AudioInService.GetAudio:output_type -> viam.component.audioin.v1.GetAudioResponse - 8, // 8: viam.component.audioin.v1.AudioInService.GetProperties:output_type -> viam.common.v1.GetPropertiesResponse - 9, // 9: viam.component.audioin.v1.AudioInService.DoCommand:output_type -> viam.common.v1.DoCommandResponse - 10, // 10: viam.component.audioin.v1.AudioInService.GetGeometries:output_type -> viam.common.v1.GetGeometriesResponse - 7, // [7:11] is the sub-list for method output_type - 3, // [3:7] is the sub-list for method input_type + 7, // 6: viam.component.audioin.v1.AudioInService.GetStatus:input_type -> viam.common.v1.GetStatusRequest + 8, // 7: viam.component.audioin.v1.AudioInService.GetGeometries:input_type -> viam.common.v1.GetGeometriesRequest + 1, // 8: viam.component.audioin.v1.AudioInService.GetAudio:output_type -> viam.component.audioin.v1.GetAudioResponse + 9, // 9: viam.component.audioin.v1.AudioInService.GetProperties:output_type -> viam.common.v1.GetPropertiesResponse + 10, // 10: viam.component.audioin.v1.AudioInService.DoCommand:output_type -> viam.common.v1.DoCommandResponse + 11, // 11: viam.component.audioin.v1.AudioInService.GetStatus:output_type -> viam.common.v1.GetStatusResponse + 12, // 12: viam.component.audioin.v1.AudioInService.GetGeometries:output_type -> viam.common.v1.GetGeometriesResponse + 8, // [8:13] is the sub-list for method output_type + 3, // [3:8] is the sub-list for method input_type 3, // [3:3] is the sub-list for extension type_name 3, // [3:3] is the sub-list for extension extendee 0, // [0:3] is the sub-list for field type_name diff --git a/component/audioin/v1/audioin.pb.gw.go b/component/audioin/v1/audioin.pb.gw.go index 82d7d038f1..cd07e99d50 100644 --- a/component/audioin/v1/audioin.pb.gw.go +++ b/component/audioin/v1/audioin.pb.gw.go @@ -217,6 +217,58 @@ func local_request_AudioInService_DoCommand_0(ctx context.Context, marshaler run } +func request_AudioInService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, client AudioInServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_AudioInService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, server AudioInServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetStatus(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_AudioInService_GetGeometries_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) @@ -350,6 +402,31 @@ func RegisterAudioInServiceHandlerServer(ctx context.Context, mux *runtime.Serve }) + mux.Handle("GET", pattern_AudioInService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.audioin.v1.AudioInService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/service/audioin/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_AudioInService_GetStatus_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AudioInService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_AudioInService_GetGeometries_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -482,6 +559,28 @@ func RegisterAudioInServiceHandlerClient(ctx context.Context, mux *runtime.Serve }) + mux.Handle("GET", pattern_AudioInService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.audioin.v1.AudioInService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/service/audioin/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AudioInService_GetStatus_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AudioInService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_AudioInService_GetGeometries_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -514,6 +613,8 @@ var ( pattern_AudioInService_DoCommand_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "audioin", "name", "do_command"}, "")) + pattern_AudioInService_GetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "audioin", "name", "get_status"}, "")) + pattern_AudioInService_GetGeometries_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "audioin", "name", "geometries"}, "")) ) @@ -524,5 +625,7 @@ var ( forward_AudioInService_DoCommand_0 = runtime.ForwardResponseMessage + forward_AudioInService_GetStatus_0 = runtime.ForwardResponseMessage + forward_AudioInService_GetGeometries_0 = runtime.ForwardResponseMessage ) diff --git a/component/audioin/v1/audioin_grpc.pb.go b/component/audioin/v1/audioin_grpc.pb.go index 32a80e3cea..5526e7ac8d 100644 --- a/component/audioin/v1/audioin_grpc.pb.go +++ b/component/audioin/v1/audioin_grpc.pb.go @@ -29,6 +29,8 @@ type AudioInServiceClient interface { GetProperties(ctx context.Context, in *v1.GetPropertiesRequest, opts ...grpc.CallOption) (*v1.GetPropertiesResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(ctx context.Context, in *v1.DoCommandRequest, opts ...grpc.CallOption) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) // GetGeometries returns the geometries of the component in their current configuration GetGeometries(ctx context.Context, in *v1.GetGeometriesRequest, opts ...grpc.CallOption) (*v1.GetGeometriesResponse, error) } @@ -91,6 +93,15 @@ func (c *audioInServiceClient) DoCommand(ctx context.Context, in *v1.DoCommandRe return out, nil } +func (c *audioInServiceClient) GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) { + out := new(v1.GetStatusResponse) + err := c.cc.Invoke(ctx, "/viam.component.audioin.v1.AudioInService/GetStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *audioInServiceClient) GetGeometries(ctx context.Context, in *v1.GetGeometriesRequest, opts ...grpc.CallOption) (*v1.GetGeometriesResponse, error) { out := new(v1.GetGeometriesResponse) err := c.cc.Invoke(ctx, "/viam.component.audioin.v1.AudioInService/GetGeometries", in, out, opts...) @@ -110,6 +121,8 @@ type AudioInServiceServer interface { GetProperties(context.Context, *v1.GetPropertiesRequest) (*v1.GetPropertiesResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) // GetGeometries returns the geometries of the component in their current configuration GetGeometries(context.Context, *v1.GetGeometriesRequest) (*v1.GetGeometriesResponse, error) mustEmbedUnimplementedAudioInServiceServer() @@ -128,6 +141,9 @@ func (UnimplementedAudioInServiceServer) GetProperties(context.Context, *v1.GetP func (UnimplementedAudioInServiceServer) DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DoCommand not implemented") } +func (UnimplementedAudioInServiceServer) GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented") +} func (UnimplementedAudioInServiceServer) GetGeometries(context.Context, *v1.GetGeometriesRequest) (*v1.GetGeometriesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetGeometries not implemented") } @@ -201,6 +217,24 @@ func _AudioInService_DoCommand_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _AudioInService_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AudioInServiceServer).GetStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.audioin.v1.AudioInService/GetStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AudioInServiceServer).GetStatus(ctx, req.(*v1.GetStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _AudioInService_GetGeometries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(v1.GetGeometriesRequest) if err := dec(in); err != nil { @@ -234,6 +268,10 @@ var AudioInService_ServiceDesc = grpc.ServiceDesc{ MethodName: "DoCommand", Handler: _AudioInService_DoCommand_Handler, }, + { + MethodName: "GetStatus", + Handler: _AudioInService_GetStatus_Handler, + }, { MethodName: "GetGeometries", Handler: _AudioInService_GetGeometries_Handler, diff --git a/component/audioout/v1/audioout.pb.go b/component/audioout/v1/audioout.pb.go index 8972b81c05..95b475a6ae 100644 --- a/component/audioout/v1/audioout.pb.go +++ b/component/audioout/v1/audioout.pb.go @@ -153,7 +153,7 @@ var file_component_audioout_v1_audioout_proto_rawDesc = []byte{ 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, 0x0e, 0x0a, 0x0c, 0x50, 0x6c, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x32, 0xe2, 0x04, 0x0a, 0x0f, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x4f, 0x75, 0x74, 0x53, + 0x73, 0x65, 0x32, 0xee, 0x05, 0x0a, 0x0f, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x4f, 0x75, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x8e, 0x01, 0x0a, 0x04, 0x50, 0x6c, 0x61, 0x79, 0x12, 0x27, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x6f, 0x75, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x61, @@ -181,22 +181,31 @@ var file_component_audioout_v1_audioout_proto_rawDesc = []byte{ 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x22, 0x2f, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x6f, 0x75, 0x74, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, - 0x65, 0x7d, 0x2f, 0x64, 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x97, 0x01, - 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, - 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, - 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x33, 0x12, 0x31, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x75, 0x64, - 0x69, 0x6f, 0x6f, 0x75, 0x74, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x6f, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x42, 0x47, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x76, - 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x61, 0x75, - 0x64, 0x69, 0x6f, 0x6f, 0x75, 0x74, 0x2e, 0x76, 0x31, 0x5a, 0x25, 0x67, 0x6f, 0x2e, 0x76, 0x69, - 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, - 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x6f, 0x75, 0x74, 0x2f, 0x76, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x7d, 0x2f, 0x64, 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x89, 0x01, + 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, + 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, + 0x75, 0x64, 0x69, 0x6f, 0x6f, 0x75, 0x74, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, + 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x97, 0x01, 0x0a, 0x0d, 0x47, 0x65, + 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x25, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, + 0x12, 0x31, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x6f, 0x75, + 0x74, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x65, 0x73, 0x42, 0x47, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x6f, + 0x75, 0x74, 0x2e, 0x76, 0x31, 0x5a, 0x25, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x2f, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x6f, 0x75, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -219,27 +228,31 @@ var file_component_audioout_v1_audioout_proto_goTypes = []any{ (*structpb.Struct)(nil), // 3: google.protobuf.Struct (*v1.GetPropertiesRequest)(nil), // 4: viam.common.v1.GetPropertiesRequest (*v1.DoCommandRequest)(nil), // 5: viam.common.v1.DoCommandRequest - (*v1.GetGeometriesRequest)(nil), // 6: viam.common.v1.GetGeometriesRequest - (*v1.GetPropertiesResponse)(nil), // 7: viam.common.v1.GetPropertiesResponse - (*v1.DoCommandResponse)(nil), // 8: viam.common.v1.DoCommandResponse - (*v1.GetGeometriesResponse)(nil), // 9: viam.common.v1.GetGeometriesResponse + (*v1.GetStatusRequest)(nil), // 6: viam.common.v1.GetStatusRequest + (*v1.GetGeometriesRequest)(nil), // 7: viam.common.v1.GetGeometriesRequest + (*v1.GetPropertiesResponse)(nil), // 8: viam.common.v1.GetPropertiesResponse + (*v1.DoCommandResponse)(nil), // 9: viam.common.v1.DoCommandResponse + (*v1.GetStatusResponse)(nil), // 10: viam.common.v1.GetStatusResponse + (*v1.GetGeometriesResponse)(nil), // 11: viam.common.v1.GetGeometriesResponse } var file_component_audioout_v1_audioout_proto_depIdxs = []int32{ - 2, // 0: viam.component.audioout.v1.PlayRequest.audio_info:type_name -> viam.common.v1.AudioInfo - 3, // 1: viam.component.audioout.v1.PlayRequest.extra:type_name -> google.protobuf.Struct - 0, // 2: viam.component.audioout.v1.AudioOutService.Play:input_type -> viam.component.audioout.v1.PlayRequest - 4, // 3: viam.component.audioout.v1.AudioOutService.GetProperties:input_type -> viam.common.v1.GetPropertiesRequest - 5, // 4: viam.component.audioout.v1.AudioOutService.DoCommand:input_type -> viam.common.v1.DoCommandRequest - 6, // 5: viam.component.audioout.v1.AudioOutService.GetGeometries:input_type -> viam.common.v1.GetGeometriesRequest - 1, // 6: viam.component.audioout.v1.AudioOutService.Play:output_type -> viam.component.audioout.v1.PlayResponse - 7, // 7: viam.component.audioout.v1.AudioOutService.GetProperties:output_type -> viam.common.v1.GetPropertiesResponse - 8, // 8: viam.component.audioout.v1.AudioOutService.DoCommand:output_type -> viam.common.v1.DoCommandResponse - 9, // 9: viam.component.audioout.v1.AudioOutService.GetGeometries:output_type -> viam.common.v1.GetGeometriesResponse - 6, // [6:10] is the sub-list for method output_type - 2, // [2:6] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 2, // 0: viam.component.audioout.v1.PlayRequest.audio_info:type_name -> viam.common.v1.AudioInfo + 3, // 1: viam.component.audioout.v1.PlayRequest.extra:type_name -> google.protobuf.Struct + 0, // 2: viam.component.audioout.v1.AudioOutService.Play:input_type -> viam.component.audioout.v1.PlayRequest + 4, // 3: viam.component.audioout.v1.AudioOutService.GetProperties:input_type -> viam.common.v1.GetPropertiesRequest + 5, // 4: viam.component.audioout.v1.AudioOutService.DoCommand:input_type -> viam.common.v1.DoCommandRequest + 6, // 5: viam.component.audioout.v1.AudioOutService.GetStatus:input_type -> viam.common.v1.GetStatusRequest + 7, // 6: viam.component.audioout.v1.AudioOutService.GetGeometries:input_type -> viam.common.v1.GetGeometriesRequest + 1, // 7: viam.component.audioout.v1.AudioOutService.Play:output_type -> viam.component.audioout.v1.PlayResponse + 8, // 8: viam.component.audioout.v1.AudioOutService.GetProperties:output_type -> viam.common.v1.GetPropertiesResponse + 9, // 9: viam.component.audioout.v1.AudioOutService.DoCommand:output_type -> viam.common.v1.DoCommandResponse + 10, // 10: viam.component.audioout.v1.AudioOutService.GetStatus:output_type -> viam.common.v1.GetStatusResponse + 11, // 11: viam.component.audioout.v1.AudioOutService.GetGeometries:output_type -> viam.common.v1.GetGeometriesResponse + 7, // [7:12] is the sub-list for method output_type + 2, // [2:7] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_component_audioout_v1_audioout_proto_init() } diff --git a/component/audioout/v1/audioout.pb.gw.go b/component/audioout/v1/audioout.pb.gw.go index 84ca294623..4d7eeef600 100644 --- a/component/audioout/v1/audioout.pb.gw.go +++ b/component/audioout/v1/audioout.pb.gw.go @@ -242,6 +242,58 @@ func local_request_AudioOutService_DoCommand_0(ctx context.Context, marshaler ru } +func request_AudioOutService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, client AudioOutServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_AudioOutService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, server AudioOutServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetStatus(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_AudioOutService_GetGeometries_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) @@ -393,6 +445,31 @@ func RegisterAudioOutServiceHandlerServer(ctx context.Context, mux *runtime.Serv }) + mux.Handle("GET", pattern_AudioOutService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.audioout.v1.AudioOutService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/service/audioout/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_AudioOutService_GetStatus_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AudioOutService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_AudioOutService_GetGeometries_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -525,6 +602,28 @@ func RegisterAudioOutServiceHandlerClient(ctx context.Context, mux *runtime.Serv }) + mux.Handle("GET", pattern_AudioOutService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.audioout.v1.AudioOutService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/service/audioout/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AudioOutService_GetStatus_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AudioOutService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_AudioOutService_GetGeometries_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -557,6 +656,8 @@ var ( pattern_AudioOutService_DoCommand_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "audioout", "name", "do_command"}, "")) + pattern_AudioOutService_GetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "audioout", "name", "get_status"}, "")) + pattern_AudioOutService_GetGeometries_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "audioout", "name", "geometries"}, "")) ) @@ -567,5 +668,7 @@ var ( forward_AudioOutService_DoCommand_0 = runtime.ForwardResponseMessage + forward_AudioOutService_GetStatus_0 = runtime.ForwardResponseMessage + forward_AudioOutService_GetGeometries_0 = runtime.ForwardResponseMessage ) diff --git a/component/audioout/v1/audioout_grpc.pb.go b/component/audioout/v1/audioout_grpc.pb.go index f73843969b..82a33cbc68 100644 --- a/component/audioout/v1/audioout_grpc.pb.go +++ b/component/audioout/v1/audioout_grpc.pb.go @@ -29,6 +29,8 @@ type AudioOutServiceClient interface { GetProperties(ctx context.Context, in *v1.GetPropertiesRequest, opts ...grpc.CallOption) (*v1.GetPropertiesResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(ctx context.Context, in *v1.DoCommandRequest, opts ...grpc.CallOption) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) // GetGeometries returns the geometries of the component in their current configuration GetGeometries(ctx context.Context, in *v1.GetGeometriesRequest, opts ...grpc.CallOption) (*v1.GetGeometriesResponse, error) } @@ -68,6 +70,15 @@ func (c *audioOutServiceClient) DoCommand(ctx context.Context, in *v1.DoCommandR return out, nil } +func (c *audioOutServiceClient) GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) { + out := new(v1.GetStatusResponse) + err := c.cc.Invoke(ctx, "/viam.component.audioout.v1.AudioOutService/GetStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *audioOutServiceClient) GetGeometries(ctx context.Context, in *v1.GetGeometriesRequest, opts ...grpc.CallOption) (*v1.GetGeometriesResponse, error) { out := new(v1.GetGeometriesResponse) err := c.cc.Invoke(ctx, "/viam.component.audioout.v1.AudioOutService/GetGeometries", in, out, opts...) @@ -87,6 +98,8 @@ type AudioOutServiceServer interface { GetProperties(context.Context, *v1.GetPropertiesRequest) (*v1.GetPropertiesResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) // GetGeometries returns the geometries of the component in their current configuration GetGeometries(context.Context, *v1.GetGeometriesRequest) (*v1.GetGeometriesResponse, error) mustEmbedUnimplementedAudioOutServiceServer() @@ -105,6 +118,9 @@ func (UnimplementedAudioOutServiceServer) GetProperties(context.Context, *v1.Get func (UnimplementedAudioOutServiceServer) DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DoCommand not implemented") } +func (UnimplementedAudioOutServiceServer) GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented") +} func (UnimplementedAudioOutServiceServer) GetGeometries(context.Context, *v1.GetGeometriesRequest) (*v1.GetGeometriesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetGeometries not implemented") } @@ -175,6 +191,24 @@ func _AudioOutService_DoCommand_Handler(srv interface{}, ctx context.Context, de return interceptor(ctx, in, info, handler) } +func _AudioOutService_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AudioOutServiceServer).GetStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.audioout.v1.AudioOutService/GetStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AudioOutServiceServer).GetStatus(ctx, req.(*v1.GetStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _AudioOutService_GetGeometries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(v1.GetGeometriesRequest) if err := dec(in); err != nil { @@ -212,6 +246,10 @@ var AudioOutService_ServiceDesc = grpc.ServiceDesc{ MethodName: "DoCommand", Handler: _AudioOutService_DoCommand_Handler, }, + { + MethodName: "GetStatus", + Handler: _AudioOutService_GetStatus_Handler, + }, { MethodName: "GetGeometries", Handler: _AudioOutService_GetGeometries_Handler, diff --git a/component/base/v1/base.pb.go b/component/base/v1/base.pb.go index 96afd86a0b..aa2789553d 100644 --- a/component/base/v1/base.pb.go +++ b/component/base/v1/base.pb.go @@ -842,7 +842,7 @@ var file_component_base_v1_base_proto_rawDesc = []byte{ 0x6c, 0x5f, 0x63, 0x69, 0x72, 0x63, 0x75, 0x6d, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x18, 0x77, 0x68, 0x65, 0x65, 0x6c, 0x43, 0x69, 0x72, 0x63, 0x75, 0x6d, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, - 0x4d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x32, 0xe1, 0x0a, 0x0a, 0x0b, 0x42, 0x61, 0x73, 0x65, 0x53, + 0x4d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x32, 0xeb, 0x0b, 0x0a, 0x0b, 0x42, 0x61, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa7, 0x01, 0x0a, 0x0c, 0x4d, 0x6f, 0x76, 0x65, 0x53, 0x74, 0x72, 0x61, 0x69, 0x67, 0x68, 0x74, 0x12, 0x2b, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, @@ -908,32 +908,40 @@ var file_component_base_v1_base_proto_rawDesc = []byte{ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x22, 0x2d, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x7b, 0x6e, 0x61, - 0x6d, 0x65, 0x7d, 0x2f, 0x64, 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x93, - 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, - 0x12, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, + 0x6d, 0x65, 0x7d, 0x2f, 0x64, 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x87, + 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x2e, 0x76, + 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, + 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x2f, 0x76, 0x69, 0x61, 0x6d, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, + 0x74, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, + 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x93, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, + 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x76, 0x69, 0x61, + 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, + 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x25, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, - 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0x82, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, + 0x2d, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, + 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x7b, 0x6e, 0x61, + 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0xa3, + 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, + 0x12, 0x2c, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, + 0x74, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, + 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, + 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, + 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, + 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x62, 0x61, - 0x73, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, - 0x72, 0x69, 0x65, 0x73, 0x12, 0xa3, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, - 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x2c, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, - 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, - 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x2f, 0x76, 0x69, - 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, - 0x65, 0x6e, 0x74, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, - 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x42, 0x3f, 0x0a, 0x1a, 0x63, 0x6f, - 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, - 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x5a, 0x21, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, - 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, - 0x65, 0x6e, 0x74, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x73, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, + 0x74, 0x69, 0x65, 0x73, 0x42, 0x3f, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, + 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x76, 0x31, 0x5a, 0x21, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x62, 0x61, + 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -967,9 +975,11 @@ var file_component_base_v1_base_proto_goTypes = []any{ (*structpb.Struct)(nil), // 14: google.protobuf.Struct (*v1.Vector3)(nil), // 15: viam.common.v1.Vector3 (*v1.DoCommandRequest)(nil), // 16: viam.common.v1.DoCommandRequest - (*v1.GetGeometriesRequest)(nil), // 17: viam.common.v1.GetGeometriesRequest - (*v1.DoCommandResponse)(nil), // 18: viam.common.v1.DoCommandResponse - (*v1.GetGeometriesResponse)(nil), // 19: viam.common.v1.GetGeometriesResponse + (*v1.GetStatusRequest)(nil), // 17: viam.common.v1.GetStatusRequest + (*v1.GetGeometriesRequest)(nil), // 18: viam.common.v1.GetGeometriesRequest + (*v1.DoCommandResponse)(nil), // 19: viam.common.v1.DoCommandResponse + (*v1.GetStatusResponse)(nil), // 20: viam.common.v1.GetStatusResponse + (*v1.GetGeometriesResponse)(nil), // 21: viam.common.v1.GetGeometriesResponse } var file_component_base_v1_base_proto_depIdxs = []int32{ 14, // 0: viam.component.base.v1.MoveStraightRequest.extra:type_name -> google.protobuf.Struct @@ -989,19 +999,21 @@ var file_component_base_v1_base_proto_depIdxs = []int32{ 4, // 14: viam.component.base.v1.BaseService.Stop:input_type -> viam.component.base.v1.StopRequest 10, // 15: viam.component.base.v1.BaseService.IsMoving:input_type -> viam.component.base.v1.IsMovingRequest 16, // 16: viam.component.base.v1.BaseService.DoCommand:input_type -> viam.common.v1.DoCommandRequest - 17, // 17: viam.component.base.v1.BaseService.GetGeometries:input_type -> viam.common.v1.GetGeometriesRequest - 12, // 18: viam.component.base.v1.BaseService.GetProperties:input_type -> viam.component.base.v1.GetPropertiesRequest - 1, // 19: viam.component.base.v1.BaseService.MoveStraight:output_type -> viam.component.base.v1.MoveStraightResponse - 3, // 20: viam.component.base.v1.BaseService.Spin:output_type -> viam.component.base.v1.SpinResponse - 7, // 21: viam.component.base.v1.BaseService.SetPower:output_type -> viam.component.base.v1.SetPowerResponse - 9, // 22: viam.component.base.v1.BaseService.SetVelocity:output_type -> viam.component.base.v1.SetVelocityResponse - 5, // 23: viam.component.base.v1.BaseService.Stop:output_type -> viam.component.base.v1.StopResponse - 11, // 24: viam.component.base.v1.BaseService.IsMoving:output_type -> viam.component.base.v1.IsMovingResponse - 18, // 25: viam.component.base.v1.BaseService.DoCommand:output_type -> viam.common.v1.DoCommandResponse - 19, // 26: viam.component.base.v1.BaseService.GetGeometries:output_type -> viam.common.v1.GetGeometriesResponse - 13, // 27: viam.component.base.v1.BaseService.GetProperties:output_type -> viam.component.base.v1.GetPropertiesResponse - 19, // [19:28] is the sub-list for method output_type - 10, // [10:19] is the sub-list for method input_type + 17, // 17: viam.component.base.v1.BaseService.GetStatus:input_type -> viam.common.v1.GetStatusRequest + 18, // 18: viam.component.base.v1.BaseService.GetGeometries:input_type -> viam.common.v1.GetGeometriesRequest + 12, // 19: viam.component.base.v1.BaseService.GetProperties:input_type -> viam.component.base.v1.GetPropertiesRequest + 1, // 20: viam.component.base.v1.BaseService.MoveStraight:output_type -> viam.component.base.v1.MoveStraightResponse + 3, // 21: viam.component.base.v1.BaseService.Spin:output_type -> viam.component.base.v1.SpinResponse + 7, // 22: viam.component.base.v1.BaseService.SetPower:output_type -> viam.component.base.v1.SetPowerResponse + 9, // 23: viam.component.base.v1.BaseService.SetVelocity:output_type -> viam.component.base.v1.SetVelocityResponse + 5, // 24: viam.component.base.v1.BaseService.Stop:output_type -> viam.component.base.v1.StopResponse + 11, // 25: viam.component.base.v1.BaseService.IsMoving:output_type -> viam.component.base.v1.IsMovingResponse + 19, // 26: viam.component.base.v1.BaseService.DoCommand:output_type -> viam.common.v1.DoCommandResponse + 20, // 27: viam.component.base.v1.BaseService.GetStatus:output_type -> viam.common.v1.GetStatusResponse + 21, // 28: viam.component.base.v1.BaseService.GetGeometries:output_type -> viam.common.v1.GetGeometriesResponse + 13, // 29: viam.component.base.v1.BaseService.GetProperties:output_type -> viam.component.base.v1.GetPropertiesResponse + 20, // [20:30] is the sub-list for method output_type + 10, // [10:20] is the sub-list for method input_type 10, // [10:10] is the sub-list for extension type_name 10, // [10:10] is the sub-list for extension extendee 0, // [0:10] is the sub-list for field type_name diff --git a/component/base/v1/base.pb.gw.go b/component/base/v1/base.pb.gw.go index 6ca08087f7..26fc673587 100644 --- a/component/base/v1/base.pb.gw.go +++ b/component/base/v1/base.pb.gw.go @@ -504,6 +504,58 @@ func local_request_BaseService_DoCommand_0(ctx context.Context, marshaler runtim } +func request_BaseService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, client BaseServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_BaseService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, server BaseServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetStatus(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_BaseService_GetGeometries_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) @@ -825,6 +877,31 @@ func RegisterBaseServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux }) + mux.Handle("GET", pattern_BaseService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.base.v1.BaseService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/component/base/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_BaseService_GetStatus_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_BaseService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_BaseService_GetGeometries_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1070,6 +1147,28 @@ func RegisterBaseServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux }) + mux.Handle("GET", pattern_BaseService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.base.v1.BaseService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/component/base/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_BaseService_GetStatus_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_BaseService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_BaseService_GetGeometries_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1132,6 +1231,8 @@ var ( pattern_BaseService_DoCommand_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "base", "name", "do_command"}, "")) + pattern_BaseService_GetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "base", "name", "get_status"}, "")) + pattern_BaseService_GetGeometries_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "base", "name", "geometries"}, "")) pattern_BaseService_GetProperties_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "base", "name", "properties"}, "")) @@ -1152,6 +1253,8 @@ var ( forward_BaseService_DoCommand_0 = runtime.ForwardResponseMessage + forward_BaseService_GetStatus_0 = runtime.ForwardResponseMessage + forward_BaseService_GetGeometries_0 = runtime.ForwardResponseMessage forward_BaseService_GetProperties_0 = runtime.ForwardResponseMessage diff --git a/component/base/v1/base_grpc.pb.go b/component/base/v1/base_grpc.pb.go index 7ec515903c..81a36f5b88 100644 --- a/component/base/v1/base_grpc.pb.go +++ b/component/base/v1/base_grpc.pb.go @@ -42,6 +42,8 @@ type BaseServiceClient interface { IsMoving(ctx context.Context, in *IsMovingRequest, opts ...grpc.CallOption) (*IsMovingResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(ctx context.Context, in *v1.DoCommandRequest, opts ...grpc.CallOption) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) // GetGeometries returns the geometries of the component in their current configuration GetGeometries(ctx context.Context, in *v1.GetGeometriesRequest, opts ...grpc.CallOption) (*v1.GetGeometriesResponse, error) // GetProperties returns the properties of a base in its current configuration @@ -119,6 +121,15 @@ func (c *baseServiceClient) DoCommand(ctx context.Context, in *v1.DoCommandReque return out, nil } +func (c *baseServiceClient) GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) { + out := new(v1.GetStatusResponse) + err := c.cc.Invoke(ctx, "/viam.component.base.v1.BaseService/GetStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *baseServiceClient) GetGeometries(ctx context.Context, in *v1.GetGeometriesRequest, opts ...grpc.CallOption) (*v1.GetGeometriesResponse, error) { out := new(v1.GetGeometriesResponse) err := c.cc.Invoke(ctx, "/viam.component.base.v1.BaseService/GetGeometries", in, out, opts...) @@ -160,6 +171,8 @@ type BaseServiceServer interface { IsMoving(context.Context, *IsMovingRequest) (*IsMovingResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) // GetGeometries returns the geometries of the component in their current configuration GetGeometries(context.Context, *v1.GetGeometriesRequest) (*v1.GetGeometriesResponse, error) // GetProperties returns the properties of a base in its current configuration @@ -192,6 +205,9 @@ func (UnimplementedBaseServiceServer) IsMoving(context.Context, *IsMovingRequest func (UnimplementedBaseServiceServer) DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DoCommand not implemented") } +func (UnimplementedBaseServiceServer) GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented") +} func (UnimplementedBaseServiceServer) GetGeometries(context.Context, *v1.GetGeometriesRequest) (*v1.GetGeometriesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetGeometries not implemented") } @@ -337,6 +353,24 @@ func _BaseService_DoCommand_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } +func _BaseService_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BaseServiceServer).GetStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.base.v1.BaseService/GetStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BaseServiceServer).GetStatus(ctx, req.(*v1.GetStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _BaseService_GetGeometries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(v1.GetGeometriesRequest) if err := dec(in); err != nil { @@ -408,6 +442,10 @@ var BaseService_ServiceDesc = grpc.ServiceDesc{ MethodName: "DoCommand", Handler: _BaseService_DoCommand_Handler, }, + { + MethodName: "GetStatus", + Handler: _BaseService_GetStatus_Handler, + }, { MethodName: "GetGeometries", Handler: _BaseService_GetGeometries_Handler, diff --git a/component/board/v1/board.pb.go b/component/board/v1/board.pb.go index 06666b1eb2..4762e90f32 100644 --- a/component/board/v1/board.pb.go +++ b/component/board/v1/board.pb.go @@ -1514,7 +1514,7 @@ var file_component_board_v1_board_proto_rawDesc = []byte{ 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x4f, 0x57, 0x45, 0x52, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x50, 0x4f, 0x57, 0x45, 0x52, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x4f, 0x46, 0x46, 0x4c, 0x49, - 0x4e, 0x45, 0x5f, 0x44, 0x45, 0x45, 0x50, 0x10, 0x02, 0x32, 0xf0, 0x10, 0x0a, 0x0c, 0x42, 0x6f, + 0x4e, 0x45, 0x5f, 0x44, 0x45, 0x45, 0x50, 0x10, 0x02, 0x32, 0xfb, 0x11, 0x0a, 0x0c, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x8e, 0x01, 0x0a, 0x07, 0x53, 0x65, 0x74, 0x47, 0x50, 0x49, 0x4f, 0x12, 0x27, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, @@ -1580,81 +1580,90 @@ var file_component_board_v1_board_proto_rawDesc = []byte{ 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x22, 0x2e, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x64, - 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0xd2, 0x01, 0x0a, 0x10, 0x52, 0x65, - 0x61, 0x64, 0x41, 0x6e, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x30, - 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, - 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x41, 0x6e, 0x61, - 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x31, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, - 0x74, 0x2e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x41, - 0x6e, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x59, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x53, 0x12, 0x51, 0x2f, 0x76, 0x69, - 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, - 0x65, 0x6e, 0x74, 0x2f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x7b, 0x62, 0x6f, 0x61, 0x72, 0x64, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x61, 0x6e, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x72, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x2f, 0x7b, 0x61, 0x6e, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x72, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x72, 0x65, 0x61, 0x64, 0x12, 0xa2, - 0x01, 0x0a, 0x0b, 0x57, 0x72, 0x69, 0x74, 0x65, 0x41, 0x6e, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x2b, - 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, - 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x41, 0x6e, - 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x76, 0x69, + 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x88, 0x01, 0x0a, 0x09, 0x47, 0x65, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x76, 0x69, 0x61, 0x6d, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x30, 0x12, 0x2e, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x62, 0x6f, 0x61, + 0x72, 0x64, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0xd2, 0x01, 0x0a, 0x10, 0x52, 0x65, 0x61, 0x64, 0x41, 0x6e, 0x61, + 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x30, 0x2e, 0x76, 0x69, 0x61, 0x6d, + 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x6f, 0x61, 0x72, 0x64, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x41, 0x6e, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x6f, 0x61, - 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x41, 0x6e, 0x61, 0x6c, 0x6f, - 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x32, 0x1a, 0x30, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, - 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, - 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x61, 0x6e, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x77, 0x72, - 0x69, 0x74, 0x65, 0x12, 0xf3, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x44, 0x69, 0x67, 0x69, 0x74, - 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x72, 0x75, 0x70, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x12, 0x38, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, - 0x74, 0x2e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x69, - 0x67, 0x69, 0x74, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x72, 0x75, 0x70, 0x74, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x76, 0x69, 0x61, - 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x6f, 0x61, 0x72, - 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x69, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x49, - 0x6e, 0x74, 0x65, 0x72, 0x72, 0x75, 0x70, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x62, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x5c, 0x12, 0x5a, 0x2f, - 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, - 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x7b, 0x62, 0x6f, 0x61, - 0x72, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x64, 0x69, 0x67, 0x69, 0x74, 0x61, 0x6c, - 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x72, 0x75, 0x70, 0x74, 0x2f, 0x7b, 0x64, 0x69, 0x67, 0x69, - 0x74, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x72, 0x75, 0x70, 0x74, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x7d, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0xa3, 0x01, 0x0a, 0x0b, 0x53, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x54, 0x69, 0x63, 0x6b, 0x73, 0x12, 0x2b, 0x2e, 0x76, 0x69, 0x61, 0x6d, + 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x41, 0x6e, 0x61, 0x6c, 0x6f, 0x67, + 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x59, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x53, 0x12, 0x51, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x62, + 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x7b, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x7d, 0x2f, 0x61, 0x6e, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2f, + 0x7b, 0x61, 0x6e, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x72, 0x65, 0x61, 0x64, 0x12, 0xa2, 0x01, 0x0a, 0x0b, 0x57, 0x72, + 0x69, 0x74, 0x65, 0x41, 0x6e, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x2b, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x6f, 0x61, 0x72, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x69, 0x63, 0x6b, 0x73, 0x52, + 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x41, 0x6e, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x69, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x76, + 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x41, 0x6e, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x1a, 0x30, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, - 0x7d, 0x2f, 0x74, 0x69, 0x63, 0x6b, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x30, 0x01, 0x12, - 0xa3, 0x01, 0x0a, 0x0c, 0x53, 0x65, 0x74, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x65, - 0x12, 0x2c, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, - 0x74, 0x2e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x6f, - 0x77, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, - 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, - 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x6f, 0x77, 0x65, - 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x1a, 0x2e, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x62, 0x6f, - 0x61, 0x72, 0x64, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x70, 0x6f, 0x77, 0x65, 0x72, - 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x94, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, - 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, - 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x12, 0x2e, 0x2f, 0x76, - 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, - 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, - 0x7d, 0x2f, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x42, 0x41, 0x0a, 0x1b, - 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, - 0x6e, 0x74, 0x2e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x5a, 0x22, 0x67, 0x6f, 0x2e, - 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, - 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x7d, 0x2f, 0x61, 0x6e, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0xf3, + 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x44, 0x69, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x72, 0x75, 0x70, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x38, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x6f, 0x61, + 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x69, 0x67, 0x69, 0x74, 0x61, 0x6c, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x72, 0x75, 0x70, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x44, 0x69, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x72, + 0x75, 0x70, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x62, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x5c, 0x12, 0x5a, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x2f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x7b, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x7d, 0x2f, 0x64, 0x69, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x72, 0x75, 0x70, 0x74, 0x2f, 0x7b, 0x64, 0x69, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x5f, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x72, 0x75, 0x70, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x12, 0xa3, 0x01, 0x0a, 0x0b, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, + 0x69, 0x63, 0x6b, 0x73, 0x12, 0x2b, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, + 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x69, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2c, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x2e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x54, 0x69, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, + 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x74, 0x69, 0x63, + 0x6b, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x30, 0x01, 0x12, 0xa3, 0x01, 0x0a, 0x0c, 0x53, + 0x65, 0x74, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x2c, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x6f, 0x61, + 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x4d, 0x6f, + 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x76, 0x69, 0x61, 0x6d, + 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x6f, 0x61, 0x72, 0x64, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, + 0x1a, 0x2e, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x7b, + 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x6d, 0x6f, 0x64, 0x65, + 0x12, 0x94, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x65, 0x73, 0x12, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x12, 0x2e, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, + 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x6f, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x42, 0x41, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x76, + 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x6f, + 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x5a, 0x22, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, + 0x74, 0x2f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -1701,9 +1710,11 @@ var file_component_board_v1_board_proto_goTypes = []any{ (*structpb.Struct)(nil), // 26: google.protobuf.Struct (*durationpb.Duration)(nil), // 27: google.protobuf.Duration (*v1.DoCommandRequest)(nil), // 28: viam.common.v1.DoCommandRequest - (*v1.GetGeometriesRequest)(nil), // 29: viam.common.v1.GetGeometriesRequest - (*v1.DoCommandResponse)(nil), // 30: viam.common.v1.DoCommandResponse - (*v1.GetGeometriesResponse)(nil), // 31: viam.common.v1.GetGeometriesResponse + (*v1.GetStatusRequest)(nil), // 29: viam.common.v1.GetStatusRequest + (*v1.GetGeometriesRequest)(nil), // 30: viam.common.v1.GetGeometriesRequest + (*v1.DoCommandResponse)(nil), // 31: viam.common.v1.DoCommandResponse + (*v1.GetStatusResponse)(nil), // 32: viam.common.v1.GetStatusResponse + (*v1.GetGeometriesResponse)(nil), // 33: viam.common.v1.GetGeometriesResponse } var file_component_board_v1_board_proto_depIdxs = []int32{ 24, // 0: viam.component.board.v1.Status.analogs:type_name -> viam.component.board.v1.Status.AnalogsEntry @@ -1728,27 +1739,29 @@ var file_component_board_v1_board_proto_depIdxs = []int32{ 10, // 19: viam.component.board.v1.BoardService.PWMFrequency:input_type -> viam.component.board.v1.PWMFrequencyRequest 12, // 20: viam.component.board.v1.BoardService.SetPWMFrequency:input_type -> viam.component.board.v1.SetPWMFrequencyRequest 28, // 21: viam.component.board.v1.BoardService.DoCommand:input_type -> viam.common.v1.DoCommandRequest - 14, // 22: viam.component.board.v1.BoardService.ReadAnalogReader:input_type -> viam.component.board.v1.ReadAnalogReaderRequest - 16, // 23: viam.component.board.v1.BoardService.WriteAnalog:input_type -> viam.component.board.v1.WriteAnalogRequest - 18, // 24: viam.component.board.v1.BoardService.GetDigitalInterruptValue:input_type -> viam.component.board.v1.GetDigitalInterruptValueRequest - 20, // 25: viam.component.board.v1.BoardService.StreamTicks:input_type -> viam.component.board.v1.StreamTicksRequest - 22, // 26: viam.component.board.v1.BoardService.SetPowerMode:input_type -> viam.component.board.v1.SetPowerModeRequest - 29, // 27: viam.component.board.v1.BoardService.GetGeometries:input_type -> viam.common.v1.GetGeometriesRequest - 3, // 28: viam.component.board.v1.BoardService.SetGPIO:output_type -> viam.component.board.v1.SetGPIOResponse - 5, // 29: viam.component.board.v1.BoardService.GetGPIO:output_type -> viam.component.board.v1.GetGPIOResponse - 7, // 30: viam.component.board.v1.BoardService.PWM:output_type -> viam.component.board.v1.PWMResponse - 9, // 31: viam.component.board.v1.BoardService.SetPWM:output_type -> viam.component.board.v1.SetPWMResponse - 11, // 32: viam.component.board.v1.BoardService.PWMFrequency:output_type -> viam.component.board.v1.PWMFrequencyResponse - 13, // 33: viam.component.board.v1.BoardService.SetPWMFrequency:output_type -> viam.component.board.v1.SetPWMFrequencyResponse - 30, // 34: viam.component.board.v1.BoardService.DoCommand:output_type -> viam.common.v1.DoCommandResponse - 15, // 35: viam.component.board.v1.BoardService.ReadAnalogReader:output_type -> viam.component.board.v1.ReadAnalogReaderResponse - 17, // 36: viam.component.board.v1.BoardService.WriteAnalog:output_type -> viam.component.board.v1.WriteAnalogResponse - 19, // 37: viam.component.board.v1.BoardService.GetDigitalInterruptValue:output_type -> viam.component.board.v1.GetDigitalInterruptValueResponse - 21, // 38: viam.component.board.v1.BoardService.StreamTicks:output_type -> viam.component.board.v1.StreamTicksResponse - 23, // 39: viam.component.board.v1.BoardService.SetPowerMode:output_type -> viam.component.board.v1.SetPowerModeResponse - 31, // 40: viam.component.board.v1.BoardService.GetGeometries:output_type -> viam.common.v1.GetGeometriesResponse - 28, // [28:41] is the sub-list for method output_type - 15, // [15:28] is the sub-list for method input_type + 29, // 22: viam.component.board.v1.BoardService.GetStatus:input_type -> viam.common.v1.GetStatusRequest + 14, // 23: viam.component.board.v1.BoardService.ReadAnalogReader:input_type -> viam.component.board.v1.ReadAnalogReaderRequest + 16, // 24: viam.component.board.v1.BoardService.WriteAnalog:input_type -> viam.component.board.v1.WriteAnalogRequest + 18, // 25: viam.component.board.v1.BoardService.GetDigitalInterruptValue:input_type -> viam.component.board.v1.GetDigitalInterruptValueRequest + 20, // 26: viam.component.board.v1.BoardService.StreamTicks:input_type -> viam.component.board.v1.StreamTicksRequest + 22, // 27: viam.component.board.v1.BoardService.SetPowerMode:input_type -> viam.component.board.v1.SetPowerModeRequest + 30, // 28: viam.component.board.v1.BoardService.GetGeometries:input_type -> viam.common.v1.GetGeometriesRequest + 3, // 29: viam.component.board.v1.BoardService.SetGPIO:output_type -> viam.component.board.v1.SetGPIOResponse + 5, // 30: viam.component.board.v1.BoardService.GetGPIO:output_type -> viam.component.board.v1.GetGPIOResponse + 7, // 31: viam.component.board.v1.BoardService.PWM:output_type -> viam.component.board.v1.PWMResponse + 9, // 32: viam.component.board.v1.BoardService.SetPWM:output_type -> viam.component.board.v1.SetPWMResponse + 11, // 33: viam.component.board.v1.BoardService.PWMFrequency:output_type -> viam.component.board.v1.PWMFrequencyResponse + 13, // 34: viam.component.board.v1.BoardService.SetPWMFrequency:output_type -> viam.component.board.v1.SetPWMFrequencyResponse + 31, // 35: viam.component.board.v1.BoardService.DoCommand:output_type -> viam.common.v1.DoCommandResponse + 32, // 36: viam.component.board.v1.BoardService.GetStatus:output_type -> viam.common.v1.GetStatusResponse + 15, // 37: viam.component.board.v1.BoardService.ReadAnalogReader:output_type -> viam.component.board.v1.ReadAnalogReaderResponse + 17, // 38: viam.component.board.v1.BoardService.WriteAnalog:output_type -> viam.component.board.v1.WriteAnalogResponse + 19, // 39: viam.component.board.v1.BoardService.GetDigitalInterruptValue:output_type -> viam.component.board.v1.GetDigitalInterruptValueResponse + 21, // 40: viam.component.board.v1.BoardService.StreamTicks:output_type -> viam.component.board.v1.StreamTicksResponse + 23, // 41: viam.component.board.v1.BoardService.SetPowerMode:output_type -> viam.component.board.v1.SetPowerModeResponse + 33, // 42: viam.component.board.v1.BoardService.GetGeometries:output_type -> viam.common.v1.GetGeometriesResponse + 29, // [29:43] is the sub-list for method output_type + 15, // [15:29] is the sub-list for method input_type 15, // [15:15] is the sub-list for extension type_name 15, // [15:15] is the sub-list for extension extendee 0, // [0:15] is the sub-list for field type_name diff --git a/component/board/v1/board.pb.gw.go b/component/board/v1/board.pb.gw.go index bd967b38c3..2047e9440e 100644 --- a/component/board/v1/board.pb.gw.go +++ b/component/board/v1/board.pb.gw.go @@ -522,6 +522,58 @@ func local_request_BoardService_DoCommand_0(ctx context.Context, marshaler runti } +func request_BoardService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, client BoardServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_BoardService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, server BoardServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetStatus(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_BoardService_ReadAnalogReader_0 = &utilities.DoubleArray{Encoding: map[string]int{"board_name": 0, "analog_reader_name": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} ) @@ -1138,6 +1190,31 @@ func RegisterBoardServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu }) + mux.Handle("GET", pattern_BoardService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.board.v1.BoardService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/component/board/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_BoardService_GetStatus_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_BoardService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_BoardService_ReadAnalogReader_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1465,6 +1542,28 @@ func RegisterBoardServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu }) + mux.Handle("GET", pattern_BoardService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.board.v1.BoardService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/component/board/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_BoardService_GetStatus_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_BoardService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_BoardService_ReadAnalogReader_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1615,6 +1714,8 @@ var ( pattern_BoardService_DoCommand_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "board", "name", "do_command"}, "")) + pattern_BoardService_GetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "board", "name", "get_status"}, "")) + pattern_BoardService_ReadAnalogReader_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7, 2, 8}, []string{"viam", "api", "v1", "component", "board", "board_name", "analog_reader", "analog_reader_name", "read"}, "")) pattern_BoardService_WriteAnalog_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "board", "name", "analog_write"}, "")) @@ -1643,6 +1744,8 @@ var ( forward_BoardService_DoCommand_0 = runtime.ForwardResponseMessage + forward_BoardService_GetStatus_0 = runtime.ForwardResponseMessage + forward_BoardService_ReadAnalogReader_0 = runtime.ForwardResponseMessage forward_BoardService_WriteAnalog_0 = runtime.ForwardResponseMessage diff --git a/component/board/v1/board_grpc.pb.go b/component/board/v1/board_grpc.pb.go index ab44ede0f9..355fa12926 100644 --- a/component/board/v1/board_grpc.pb.go +++ b/component/board/v1/board_grpc.pb.go @@ -36,6 +36,8 @@ type BoardServiceClient interface { SetPWMFrequency(ctx context.Context, in *SetPWMFrequencyRequest, opts ...grpc.CallOption) (*SetPWMFrequencyResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(ctx context.Context, in *v1.DoCommandRequest, opts ...grpc.CallOption) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) // ReadAnalogReader reads off the current value of an analog reader of a board of the underlying robot. ReadAnalogReader(ctx context.Context, in *ReadAnalogReaderRequest, opts ...grpc.CallOption) (*ReadAnalogReaderResponse, error) // WriteAnalog writes the value to the analog writer of the board. @@ -121,6 +123,15 @@ func (c *boardServiceClient) DoCommand(ctx context.Context, in *v1.DoCommandRequ return out, nil } +func (c *boardServiceClient) GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) { + out := new(v1.GetStatusResponse) + err := c.cc.Invoke(ctx, "/viam.component.board.v1.BoardService/GetStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *boardServiceClient) ReadAnalogReader(ctx context.Context, in *ReadAnalogReaderRequest, opts ...grpc.CallOption) (*ReadAnalogReaderResponse, error) { out := new(ReadAnalogReaderResponse) err := c.cc.Invoke(ctx, "/viam.component.board.v1.BoardService/ReadAnalogReader", in, out, opts...) @@ -215,6 +226,8 @@ type BoardServiceServer interface { SetPWMFrequency(context.Context, *SetPWMFrequencyRequest) (*SetPWMFrequencyResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) // ReadAnalogReader reads off the current value of an analog reader of a board of the underlying robot. ReadAnalogReader(context.Context, *ReadAnalogReaderRequest) (*ReadAnalogReaderResponse, error) // WriteAnalog writes the value to the analog writer of the board. @@ -255,6 +268,9 @@ func (UnimplementedBoardServiceServer) SetPWMFrequency(context.Context, *SetPWMF func (UnimplementedBoardServiceServer) DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DoCommand not implemented") } +func (UnimplementedBoardServiceServer) GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented") +} func (UnimplementedBoardServiceServer) ReadAnalogReader(context.Context, *ReadAnalogReaderRequest) (*ReadAnalogReaderResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ReadAnalogReader not implemented") } @@ -412,6 +428,24 @@ func _BoardService_DoCommand_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } +func _BoardService_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BoardServiceServer).GetStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.board.v1.BoardService/GetStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BoardServiceServer).GetStatus(ctx, req.(*v1.GetStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _BoardService_ReadAnalogReader_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ReadAnalogReaderRequest) if err := dec(in); err != nil { @@ -558,6 +592,10 @@ var BoardService_ServiceDesc = grpc.ServiceDesc{ MethodName: "DoCommand", Handler: _BoardService_DoCommand_Handler, }, + { + MethodName: "GetStatus", + Handler: _BoardService_GetStatus_Handler, + }, { MethodName: "ReadAnalogReader", Handler: _BoardService_ReadAnalogReader_Handler, diff --git a/component/button/v1/button.pb.go b/component/button/v1/button.pb.go index 88db09ce55..7efebbbf96 100644 --- a/component/button/v1/button.pb.go +++ b/component/button/v1/button.pb.go @@ -130,7 +130,7 @@ var file_component_button_v1_button_proto_rawDesc = []byte{ 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, 0x0e, 0x0a, 0x0c, 0x50, 0x75, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x32, 0xaa, 0x02, 0x0a, 0x0d, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, + 0x73, 0x65, 0x32, 0xb6, 0x03, 0x0a, 0x0d, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x8c, 0x01, 0x0a, 0x04, 0x50, 0x75, 0x73, 0x68, 0x12, 0x25, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x52, 0x65, 0x71, @@ -148,12 +148,21 @@ var file_component_button_v1_button_proto_rawDesc = []byte{ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x22, 0x2f, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x2f, 0x7b, 0x6e, - 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x64, 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x42, - 0x43, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, - 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x5a, - 0x23, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x62, 0x75, 0x74, 0x74, 0x6f, - 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x64, 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, + 0x89, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x2e, + 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x21, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x76, 0x69, 0x61, + 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x2f, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, + 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x43, 0x0a, 0x1c, 0x63, + 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, + 0x74, 0x2e, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x5a, 0x23, 0x67, 0x6f, 0x2e, + 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, + 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x2f, 0x76, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -174,16 +183,20 @@ var file_component_button_v1_button_proto_goTypes = []any{ (*PushResponse)(nil), // 1: viam.component.button.v1.PushResponse (*structpb.Struct)(nil), // 2: google.protobuf.Struct (*v1.DoCommandRequest)(nil), // 3: viam.common.v1.DoCommandRequest - (*v1.DoCommandResponse)(nil), // 4: viam.common.v1.DoCommandResponse + (*v1.GetStatusRequest)(nil), // 4: viam.common.v1.GetStatusRequest + (*v1.DoCommandResponse)(nil), // 5: viam.common.v1.DoCommandResponse + (*v1.GetStatusResponse)(nil), // 6: viam.common.v1.GetStatusResponse } var file_component_button_v1_button_proto_depIdxs = []int32{ 2, // 0: viam.component.button.v1.PushRequest.extra:type_name -> google.protobuf.Struct 0, // 1: viam.component.button.v1.ButtonService.Push:input_type -> viam.component.button.v1.PushRequest 3, // 2: viam.component.button.v1.ButtonService.DoCommand:input_type -> viam.common.v1.DoCommandRequest - 1, // 3: viam.component.button.v1.ButtonService.Push:output_type -> viam.component.button.v1.PushResponse - 4, // 4: viam.component.button.v1.ButtonService.DoCommand:output_type -> viam.common.v1.DoCommandResponse - 3, // [3:5] is the sub-list for method output_type - 1, // [1:3] is the sub-list for method input_type + 4, // 3: viam.component.button.v1.ButtonService.GetStatus:input_type -> viam.common.v1.GetStatusRequest + 1, // 4: viam.component.button.v1.ButtonService.Push:output_type -> viam.component.button.v1.PushResponse + 5, // 5: viam.component.button.v1.ButtonService.DoCommand:output_type -> viam.common.v1.DoCommandResponse + 6, // 6: viam.component.button.v1.ButtonService.GetStatus:output_type -> viam.common.v1.GetStatusResponse + 4, // [4:7] is the sub-list for method output_type + 1, // [1:4] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name 1, // [1:1] is the sub-list for extension extendee 0, // [0:1] is the sub-list for field type_name diff --git a/component/button/v1/button.pb.gw.go b/component/button/v1/button.pb.gw.go index 88e5ec8a62..cb64901e91 100644 --- a/component/button/v1/button.pb.gw.go +++ b/component/button/v1/button.pb.gw.go @@ -172,6 +172,58 @@ func local_request_ButtonService_DoCommand_0(ctx context.Context, marshaler runt } +func request_ButtonService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, client ButtonServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_ButtonService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, server ButtonServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetStatus(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterButtonServiceHandlerServer registers the http handlers for service ButtonService to "mux". // UnaryRPC :call ButtonServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -228,6 +280,31 @@ func RegisterButtonServiceHandlerServer(ctx context.Context, mux *runtime.ServeM }) + mux.Handle("GET", pattern_ButtonService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.button.v1.ButtonService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/component/button/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ButtonService_GetStatus_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_ButtonService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -313,6 +390,28 @@ func RegisterButtonServiceHandlerClient(ctx context.Context, mux *runtime.ServeM }) + mux.Handle("GET", pattern_ButtonService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.button.v1.ButtonService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/component/button/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ButtonService_GetStatus_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_ButtonService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -320,10 +419,14 @@ var ( pattern_ButtonService_Push_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "button", "name", "push"}, "")) pattern_ButtonService_DoCommand_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "button", "name", "do_command"}, "")) + + pattern_ButtonService_GetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "button", "name", "get_status"}, "")) ) var ( forward_ButtonService_Push_0 = runtime.ForwardResponseMessage forward_ButtonService_DoCommand_0 = runtime.ForwardResponseMessage + + forward_ButtonService_GetStatus_0 = runtime.ForwardResponseMessage ) diff --git a/component/button/v1/button_grpc.pb.go b/component/button/v1/button_grpc.pb.go index a89dde3b5a..21bfa2f47f 100644 --- a/component/button/v1/button_grpc.pb.go +++ b/component/button/v1/button_grpc.pb.go @@ -27,6 +27,8 @@ type ButtonServiceClient interface { Push(ctx context.Context, in *PushRequest, opts ...grpc.CallOption) (*PushResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(ctx context.Context, in *v1.DoCommandRequest, opts ...grpc.CallOption) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) } type buttonServiceClient struct { @@ -55,6 +57,15 @@ func (c *buttonServiceClient) DoCommand(ctx context.Context, in *v1.DoCommandReq return out, nil } +func (c *buttonServiceClient) GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) { + out := new(v1.GetStatusResponse) + err := c.cc.Invoke(ctx, "/viam.component.button.v1.ButtonService/GetStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // ButtonServiceServer is the server API for ButtonService service. // All implementations must embed UnimplementedButtonServiceServer // for forward compatibility @@ -63,6 +74,8 @@ type ButtonServiceServer interface { Push(context.Context, *PushRequest) (*PushResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) mustEmbedUnimplementedButtonServiceServer() } @@ -76,6 +89,9 @@ func (UnimplementedButtonServiceServer) Push(context.Context, *PushRequest) (*Pu func (UnimplementedButtonServiceServer) DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DoCommand not implemented") } +func (UnimplementedButtonServiceServer) GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented") +} func (UnimplementedButtonServiceServer) mustEmbedUnimplementedButtonServiceServer() {} // UnsafeButtonServiceServer may be embedded to opt out of forward compatibility for this service. @@ -125,6 +141,24 @@ func _ButtonService_DoCommand_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _ButtonService_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ButtonServiceServer).GetStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.button.v1.ButtonService/GetStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ButtonServiceServer).GetStatus(ctx, req.(*v1.GetStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + // ButtonService_ServiceDesc is the grpc.ServiceDesc for ButtonService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -140,6 +174,10 @@ var ButtonService_ServiceDesc = grpc.ServiceDesc{ MethodName: "DoCommand", Handler: _ButtonService_DoCommand_Handler, }, + { + MethodName: "GetStatus", + Handler: _ButtonService_GetStatus_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "component/button/v1/button.proto", diff --git a/component/camera/v1/camera.pb.go b/component/camera/v1/camera.pb.go index f099742673..286fb744af 100644 --- a/component/camera/v1/camera.pb.go +++ b/component/camera/v1/camera.pb.go @@ -1287,7 +1287,7 @@ var file_component_camera_v1_camera_proto_rawDesc = []byte{ 0x4d, 0x41, 0x54, 0x5f, 0x52, 0x41, 0x57, 0x5f, 0x44, 0x45, 0x50, 0x54, 0x48, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x4a, 0x50, 0x45, 0x47, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x50, 0x4e, 0x47, 0x10, 0x04, - 0x32, 0xcf, 0x08, 0x0a, 0x0d, 0x43, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x32, 0xdb, 0x09, 0x0a, 0x0d, 0x43, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x95, 0x01, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x29, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6d, @@ -1346,21 +1346,30 @@ var file_component_camera_v1_camera_proto_rawDesc = []byte{ 0x65, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x22, 0x2f, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, - 0x64, 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x95, 0x01, 0x0a, 0x0d, 0x47, - 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x76, - 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x31, 0x12, 0x2f, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, + 0x64, 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x89, 0x01, 0x0a, 0x09, 0x47, + 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x76, 0x69, 0x61, + 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x63, 0x61, + 0x6d, 0x65, 0x72, 0x61, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x74, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x95, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x47, 0x65, + 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, + 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, + 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, + 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x2f, 0x7b, 0x6e, 0x61, + 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x42, 0x43, + 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x2e, 0x76, 0x31, 0x5a, 0x23, + 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, - 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, - 0x65, 0x73, 0x42, 0x43, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, - 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x2e, - 0x76, 0x31, 0x5a, 0x23, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x63, 0x61, - 0x6d, 0x65, 0x72, 0x61, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1401,10 +1410,12 @@ var file_component_camera_v1_camera_proto_goTypes = []any{ (*v1.Vector3)(nil), // 20: viam.common.v1.Vector3 (*v1.Orientation)(nil), // 21: viam.common.v1.Orientation (*v1.DoCommandRequest)(nil), // 22: viam.common.v1.DoCommandRequest - (*v1.GetGeometriesRequest)(nil), // 23: viam.common.v1.GetGeometriesRequest - (*httpbody.HttpBody)(nil), // 24: google.api.HttpBody - (*v1.DoCommandResponse)(nil), // 25: viam.common.v1.DoCommandResponse - (*v1.GetGeometriesResponse)(nil), // 26: viam.common.v1.GetGeometriesResponse + (*v1.GetStatusRequest)(nil), // 23: viam.common.v1.GetStatusRequest + (*v1.GetGeometriesRequest)(nil), // 24: viam.common.v1.GetGeometriesRequest + (*httpbody.HttpBody)(nil), // 25: google.api.HttpBody + (*v1.DoCommandResponse)(nil), // 26: viam.common.v1.DoCommandResponse + (*v1.GetStatusResponse)(nil), // 27: viam.common.v1.GetStatusResponse + (*v1.GetGeometriesResponse)(nil), // 28: viam.common.v1.GetGeometriesResponse } var file_component_camera_v1_camera_proto_depIdxs = []int32{ 17, // 0: viam.component.camera.v1.GetImageRequest.extra:type_name -> google.protobuf.Struct @@ -1428,16 +1439,18 @@ var file_component_camera_v1_camera_proto_depIdxs = []int32{ 7, // 18: viam.component.camera.v1.CameraService.GetPointCloud:input_type -> viam.component.camera.v1.GetPointCloudRequest 9, // 19: viam.component.camera.v1.CameraService.GetProperties:input_type -> viam.component.camera.v1.GetPropertiesRequest 22, // 20: viam.component.camera.v1.CameraService.DoCommand:input_type -> viam.common.v1.DoCommandRequest - 23, // 21: viam.component.camera.v1.CameraService.GetGeometries:input_type -> viam.common.v1.GetGeometriesRequest - 2, // 22: viam.component.camera.v1.CameraService.GetImage:output_type -> viam.component.camera.v1.GetImageResponse - 4, // 23: viam.component.camera.v1.CameraService.GetImages:output_type -> viam.component.camera.v1.GetImagesResponse - 24, // 24: viam.component.camera.v1.CameraService.RenderFrame:output_type -> google.api.HttpBody - 8, // 25: viam.component.camera.v1.CameraService.GetPointCloud:output_type -> viam.component.camera.v1.GetPointCloudResponse - 10, // 26: viam.component.camera.v1.CameraService.GetProperties:output_type -> viam.component.camera.v1.GetPropertiesResponse - 25, // 27: viam.component.camera.v1.CameraService.DoCommand:output_type -> viam.common.v1.DoCommandResponse - 26, // 28: viam.component.camera.v1.CameraService.GetGeometries:output_type -> viam.common.v1.GetGeometriesResponse - 22, // [22:29] is the sub-list for method output_type - 15, // [15:22] is the sub-list for method input_type + 23, // 21: viam.component.camera.v1.CameraService.GetStatus:input_type -> viam.common.v1.GetStatusRequest + 24, // 22: viam.component.camera.v1.CameraService.GetGeometries:input_type -> viam.common.v1.GetGeometriesRequest + 2, // 23: viam.component.camera.v1.CameraService.GetImage:output_type -> viam.component.camera.v1.GetImageResponse + 4, // 24: viam.component.camera.v1.CameraService.GetImages:output_type -> viam.component.camera.v1.GetImagesResponse + 25, // 25: viam.component.camera.v1.CameraService.RenderFrame:output_type -> google.api.HttpBody + 8, // 26: viam.component.camera.v1.CameraService.GetPointCloud:output_type -> viam.component.camera.v1.GetPointCloudResponse + 10, // 27: viam.component.camera.v1.CameraService.GetProperties:output_type -> viam.component.camera.v1.GetPropertiesResponse + 26, // 28: viam.component.camera.v1.CameraService.DoCommand:output_type -> viam.common.v1.DoCommandResponse + 27, // 29: viam.component.camera.v1.CameraService.GetStatus:output_type -> viam.common.v1.GetStatusResponse + 28, // 30: viam.component.camera.v1.CameraService.GetGeometries:output_type -> viam.common.v1.GetGeometriesResponse + 23, // [23:31] is the sub-list for method output_type + 15, // [15:23] is the sub-list for method input_type 15, // [15:15] is the sub-list for extension type_name 15, // [15:15] is the sub-list for extension extendee 0, // [0:15] is the sub-list for field type_name diff --git a/component/camera/v1/camera.pb.gw.go b/component/camera/v1/camera.pb.gw.go index a60984d6e4..eb7f9b691d 100644 --- a/component/camera/v1/camera.pb.gw.go +++ b/component/camera/v1/camera.pb.gw.go @@ -434,6 +434,58 @@ func local_request_CameraService_DoCommand_0(ctx context.Context, marshaler runt } +func request_CameraService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, client CameraServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1_0.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_CameraService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, server CameraServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1_0.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetStatus(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_CameraService_GetGeometries_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) @@ -660,6 +712,31 @@ func RegisterCameraServiceHandlerServer(ctx context.Context, mux *runtime.ServeM }) + mux.Handle("GET", pattern_CameraService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.camera.v1.CameraService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/component/camera/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_CameraService_GetStatus_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_CameraService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_CameraService_GetGeometries_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -858,6 +935,28 @@ func RegisterCameraServiceHandlerClient(ctx context.Context, mux *runtime.ServeM }) + mux.Handle("GET", pattern_CameraService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.camera.v1.CameraService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/component/camera/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_CameraService_GetStatus_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_CameraService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_CameraService_GetGeometries_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -896,6 +995,8 @@ var ( pattern_CameraService_DoCommand_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "camera", "name", "do_command"}, "")) + pattern_CameraService_GetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "camera", "name", "get_status"}, "")) + pattern_CameraService_GetGeometries_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "camera", "name", "geometries"}, "")) ) @@ -912,5 +1013,7 @@ var ( forward_CameraService_DoCommand_0 = runtime.ForwardResponseMessage + forward_CameraService_GetStatus_0 = runtime.ForwardResponseMessage + forward_CameraService_GetGeometries_0 = runtime.ForwardResponseMessage ) diff --git a/component/camera/v1/camera_grpc.pb.go b/component/camera/v1/camera_grpc.pb.go index 91f0064d3f..f7e4485a18 100644 --- a/component/camera/v1/camera_grpc.pb.go +++ b/component/camera/v1/camera_grpc.pb.go @@ -38,6 +38,8 @@ type CameraServiceClient interface { GetProperties(ctx context.Context, in *GetPropertiesRequest, opts ...grpc.CallOption) (*GetPropertiesResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(ctx context.Context, in *v1.DoCommandRequest, opts ...grpc.CallOption) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) // GetGeometries returns the geometries of the component in their current configuration GetGeometries(ctx context.Context, in *v1.GetGeometriesRequest, opts ...grpc.CallOption) (*v1.GetGeometriesResponse, error) } @@ -104,6 +106,15 @@ func (c *cameraServiceClient) DoCommand(ctx context.Context, in *v1.DoCommandReq return out, nil } +func (c *cameraServiceClient) GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) { + out := new(v1.GetStatusResponse) + err := c.cc.Invoke(ctx, "/viam.component.camera.v1.CameraService/GetStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *cameraServiceClient) GetGeometries(ctx context.Context, in *v1.GetGeometriesRequest, opts ...grpc.CallOption) (*v1.GetGeometriesResponse, error) { out := new(v1.GetGeometriesResponse) err := c.cc.Invoke(ctx, "/viam.component.camera.v1.CameraService/GetGeometries", in, out, opts...) @@ -131,6 +142,8 @@ type CameraServiceServer interface { GetProperties(context.Context, *GetPropertiesRequest) (*GetPropertiesResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) // GetGeometries returns the geometries of the component in their current configuration GetGeometries(context.Context, *v1.GetGeometriesRequest) (*v1.GetGeometriesResponse, error) mustEmbedUnimplementedCameraServiceServer() @@ -158,6 +171,9 @@ func (UnimplementedCameraServiceServer) GetProperties(context.Context, *GetPrope func (UnimplementedCameraServiceServer) DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DoCommand not implemented") } +func (UnimplementedCameraServiceServer) GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented") +} func (UnimplementedCameraServiceServer) GetGeometries(context.Context, *v1.GetGeometriesRequest) (*v1.GetGeometriesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetGeometries not implemented") } @@ -282,6 +298,24 @@ func _CameraService_DoCommand_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _CameraService_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CameraServiceServer).GetStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.camera.v1.CameraService/GetStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CameraServiceServer).GetStatus(ctx, req.(*v1.GetStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _CameraService_GetGeometries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(v1.GetGeometriesRequest) if err := dec(in); err != nil { @@ -331,6 +365,10 @@ var CameraService_ServiceDesc = grpc.ServiceDesc{ MethodName: "DoCommand", Handler: _CameraService_DoCommand_Handler, }, + { + MethodName: "GetStatus", + Handler: _CameraService_GetStatus_Handler, + }, { MethodName: "GetGeometries", Handler: _CameraService_GetGeometries_Handler, diff --git a/component/encoder/v1/encoder.pb.go b/component/encoder/v1/encoder.pb.go index 1ddaad402b..312094c20a 100644 --- a/component/encoder/v1/encoder.pb.go +++ b/component/encoder/v1/encoder.pb.go @@ -456,7 +456,7 @@ var file_component_encoder_v1_encoder_proto_rawDesc = []byte{ 0x50, 0x45, 0x5f, 0x54, 0x49, 0x43, 0x4b, 0x53, 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x4e, 0x47, 0x4c, 0x45, 0x5f, 0x44, 0x45, 0x47, 0x52, 0x45, 0x45, 0x53, 0x10, - 0x02, 0x32, 0xc7, 0x06, 0x0a, 0x0e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, + 0x02, 0x32, 0xd4, 0x07, 0x0a, 0x0e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa8, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, @@ -499,21 +499,30 @@ var file_component_encoder_v1_encoder_proto_rawDesc = []byte{ 0x22, 0x30, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x64, 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, - 0x6e, 0x64, 0x12, 0x96, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, - 0x72, 0x69, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x76, 0x69, 0x61, - 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, - 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x12, 0x30, 0x2f, 0x76, 0x69, 0x61, 0x6d, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, - 0x74, 0x2f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, - 0x2f, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x42, 0x45, 0x0a, 0x1d, 0x63, - 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, - 0x74, 0x2e, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x5a, 0x24, 0x67, 0x6f, - 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, - 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2f, - 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x64, 0x12, 0x8a, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x20, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x12, 0x30, 0x2f, + 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, + 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2f, 0x7b, 0x6e, + 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x96, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, + 0x73, 0x12, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x12, 0x30, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x65, + 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, + 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x42, 0x45, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, + 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x65, + 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x5a, 0x24, 0x67, 0x6f, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -540,9 +549,11 @@ var file_component_encoder_v1_encoder_proto_goTypes = []any{ (*GetPropertiesResponse)(nil), // 6: viam.component.encoder.v1.GetPropertiesResponse (*structpb.Struct)(nil), // 7: google.protobuf.Struct (*v1.DoCommandRequest)(nil), // 8: viam.common.v1.DoCommandRequest - (*v1.GetGeometriesRequest)(nil), // 9: viam.common.v1.GetGeometriesRequest - (*v1.DoCommandResponse)(nil), // 10: viam.common.v1.DoCommandResponse - (*v1.GetGeometriesResponse)(nil), // 11: viam.common.v1.GetGeometriesResponse + (*v1.GetStatusRequest)(nil), // 9: viam.common.v1.GetStatusRequest + (*v1.GetGeometriesRequest)(nil), // 10: viam.common.v1.GetGeometriesRequest + (*v1.DoCommandResponse)(nil), // 11: viam.common.v1.DoCommandResponse + (*v1.GetStatusResponse)(nil), // 12: viam.common.v1.GetStatusResponse + (*v1.GetGeometriesResponse)(nil), // 13: viam.common.v1.GetGeometriesResponse } var file_component_encoder_v1_encoder_proto_depIdxs = []int32{ 0, // 0: viam.component.encoder.v1.GetPositionRequest.position_type:type_name -> viam.component.encoder.v1.PositionType @@ -554,14 +565,16 @@ var file_component_encoder_v1_encoder_proto_depIdxs = []int32{ 3, // 6: viam.component.encoder.v1.EncoderService.ResetPosition:input_type -> viam.component.encoder.v1.ResetPositionRequest 5, // 7: viam.component.encoder.v1.EncoderService.GetProperties:input_type -> viam.component.encoder.v1.GetPropertiesRequest 8, // 8: viam.component.encoder.v1.EncoderService.DoCommand:input_type -> viam.common.v1.DoCommandRequest - 9, // 9: viam.component.encoder.v1.EncoderService.GetGeometries:input_type -> viam.common.v1.GetGeometriesRequest - 2, // 10: viam.component.encoder.v1.EncoderService.GetPosition:output_type -> viam.component.encoder.v1.GetPositionResponse - 4, // 11: viam.component.encoder.v1.EncoderService.ResetPosition:output_type -> viam.component.encoder.v1.ResetPositionResponse - 6, // 12: viam.component.encoder.v1.EncoderService.GetProperties:output_type -> viam.component.encoder.v1.GetPropertiesResponse - 10, // 13: viam.component.encoder.v1.EncoderService.DoCommand:output_type -> viam.common.v1.DoCommandResponse - 11, // 14: viam.component.encoder.v1.EncoderService.GetGeometries:output_type -> viam.common.v1.GetGeometriesResponse - 10, // [10:15] is the sub-list for method output_type - 5, // [5:10] is the sub-list for method input_type + 9, // 9: viam.component.encoder.v1.EncoderService.GetStatus:input_type -> viam.common.v1.GetStatusRequest + 10, // 10: viam.component.encoder.v1.EncoderService.GetGeometries:input_type -> viam.common.v1.GetGeometriesRequest + 2, // 11: viam.component.encoder.v1.EncoderService.GetPosition:output_type -> viam.component.encoder.v1.GetPositionResponse + 4, // 12: viam.component.encoder.v1.EncoderService.ResetPosition:output_type -> viam.component.encoder.v1.ResetPositionResponse + 6, // 13: viam.component.encoder.v1.EncoderService.GetProperties:output_type -> viam.component.encoder.v1.GetPropertiesResponse + 11, // 14: viam.component.encoder.v1.EncoderService.DoCommand:output_type -> viam.common.v1.DoCommandResponse + 12, // 15: viam.component.encoder.v1.EncoderService.GetStatus:output_type -> viam.common.v1.GetStatusResponse + 13, // 16: viam.component.encoder.v1.EncoderService.GetGeometries:output_type -> viam.common.v1.GetGeometriesResponse + 11, // [11:17] is the sub-list for method output_type + 5, // [5:11] is the sub-list for method input_type 5, // [5:5] is the sub-list for extension type_name 5, // [5:5] is the sub-list for extension extendee 0, // [0:5] is the sub-list for field type_name diff --git a/component/encoder/v1/encoder.pb.gw.go b/component/encoder/v1/encoder.pb.gw.go index afe5b419cb..24f2c4548e 100644 --- a/component/encoder/v1/encoder.pb.gw.go +++ b/component/encoder/v1/encoder.pb.gw.go @@ -312,6 +312,58 @@ func local_request_EncoderService_DoCommand_0(ctx context.Context, marshaler run } +func request_EncoderService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, client EncoderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_EncoderService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, server EncoderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetStatus(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_EncoderService_GetGeometries_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) @@ -488,6 +540,31 @@ func RegisterEncoderServiceHandlerServer(ctx context.Context, mux *runtime.Serve }) + mux.Handle("GET", pattern_EncoderService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.encoder.v1.EncoderService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/component/encoder/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_EncoderService_GetStatus_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_EncoderService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_EncoderService_GetGeometries_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -642,6 +719,28 @@ func RegisterEncoderServiceHandlerClient(ctx context.Context, mux *runtime.Serve }) + mux.Handle("GET", pattern_EncoderService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.encoder.v1.EncoderService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/component/encoder/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_EncoderService_GetStatus_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_EncoderService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_EncoderService_GetGeometries_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -676,6 +775,8 @@ var ( pattern_EncoderService_DoCommand_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "encoder", "name", "do_command"}, "")) + pattern_EncoderService_GetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "encoder", "name", "get_status"}, "")) + pattern_EncoderService_GetGeometries_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "encoder", "name", "geometries"}, "")) ) @@ -688,5 +789,7 @@ var ( forward_EncoderService_DoCommand_0 = runtime.ForwardResponseMessage + forward_EncoderService_GetStatus_0 = runtime.ForwardResponseMessage + forward_EncoderService_GetGeometries_0 = runtime.ForwardResponseMessage ) diff --git a/component/encoder/v1/encoder_grpc.pb.go b/component/encoder/v1/encoder_grpc.pb.go index cc3fa1005d..84e074a0d6 100644 --- a/component/encoder/v1/encoder_grpc.pb.go +++ b/component/encoder/v1/encoder_grpc.pb.go @@ -31,6 +31,8 @@ type EncoderServiceClient interface { // supported by a given robot. GetProperties(ctx context.Context, in *GetPropertiesRequest, opts ...grpc.CallOption) (*GetPropertiesResponse, error) DoCommand(ctx context.Context, in *v1.DoCommandRequest, opts ...grpc.CallOption) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) // GetGeometries returns the geometries of the component in their current configuration GetGeometries(ctx context.Context, in *v1.GetGeometriesRequest, opts ...grpc.CallOption) (*v1.GetGeometriesResponse, error) } @@ -79,6 +81,15 @@ func (c *encoderServiceClient) DoCommand(ctx context.Context, in *v1.DoCommandRe return out, nil } +func (c *encoderServiceClient) GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) { + out := new(v1.GetStatusResponse) + err := c.cc.Invoke(ctx, "/viam.component.encoder.v1.EncoderService/GetStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *encoderServiceClient) GetGeometries(ctx context.Context, in *v1.GetGeometriesRequest, opts ...grpc.CallOption) (*v1.GetGeometriesResponse, error) { out := new(v1.GetGeometriesResponse) err := c.cc.Invoke(ctx, "/viam.component.encoder.v1.EncoderService/GetGeometries", in, out, opts...) @@ -100,6 +111,8 @@ type EncoderServiceServer interface { // supported by a given robot. GetProperties(context.Context, *GetPropertiesRequest) (*GetPropertiesResponse, error) DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) // GetGeometries returns the geometries of the component in their current configuration GetGeometries(context.Context, *v1.GetGeometriesRequest) (*v1.GetGeometriesResponse, error) mustEmbedUnimplementedEncoderServiceServer() @@ -121,6 +134,9 @@ func (UnimplementedEncoderServiceServer) GetProperties(context.Context, *GetProp func (UnimplementedEncoderServiceServer) DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DoCommand not implemented") } +func (UnimplementedEncoderServiceServer) GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented") +} func (UnimplementedEncoderServiceServer) GetGeometries(context.Context, *v1.GetGeometriesRequest) (*v1.GetGeometriesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetGeometries not implemented") } @@ -209,6 +225,24 @@ func _EncoderService_DoCommand_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _EncoderService_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EncoderServiceServer).GetStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.encoder.v1.EncoderService/GetStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EncoderServiceServer).GetStatus(ctx, req.(*v1.GetStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _EncoderService_GetGeometries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(v1.GetGeometriesRequest) if err := dec(in); err != nil { @@ -250,6 +284,10 @@ var EncoderService_ServiceDesc = grpc.ServiceDesc{ MethodName: "DoCommand", Handler: _EncoderService_DoCommand_Handler, }, + { + MethodName: "GetStatus", + Handler: _EncoderService_GetStatus_Handler, + }, { MethodName: "GetGeometries", Handler: _EncoderService_GetGeometries_Handler, diff --git a/component/gantry/v1/gantry.pb.go b/component/gantry/v1/gantry.pb.go index 2d5125da2c..389d65df6e 100644 --- a/component/gantry/v1/gantry.pb.go +++ b/component/gantry/v1/gantry.pb.go @@ -739,7 +739,7 @@ var file_component_gantry_v1_gantry_proto_rawDesc = []byte{ 0x2f, 0x0a, 0x10, 0x49, 0x73, 0x4d, 0x6f, 0x76, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x6d, 0x6f, 0x76, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x4d, 0x6f, 0x76, 0x69, 0x6e, 0x67, - 0x32, 0xf2, 0x0a, 0x0a, 0x0d, 0x47, 0x61, 0x6e, 0x74, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x32, 0xfe, 0x0b, 0x0a, 0x0d, 0x47, 0x61, 0x6e, 0x74, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa1, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x67, 0x61, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, @@ -807,31 +807,39 @@ var file_component_gantry_v1_gantry_proto_rawDesc = []byte{ 0xe4, 0x93, 0x02, 0x31, 0x22, 0x2f, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x67, 0x61, 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x64, 0x6f, 0x5f, 0x63, 0x6f, - 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x95, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4b, 0x69, 0x6e, - 0x65, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x73, 0x12, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4b, 0x69, 0x6e, 0x65, - 0x6d, 0x61, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, - 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x4b, 0x69, 0x6e, 0x65, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x76, - 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, - 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x67, 0x61, 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, - 0x65, 0x7d, 0x2f, 0x6b, 0x69, 0x6e, 0x65, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x73, 0x12, 0x95, 0x01, - 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, - 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, - 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x67, 0x61, 0x6e, - 0x74, 0x72, 0x79, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x6f, 0x6d, 0x65, - 0x74, 0x72, 0x69, 0x65, 0x73, 0x42, 0x43, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, - 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x67, 0x61, 0x6e, 0x74, - 0x72, 0x79, 0x2e, 0x76, 0x31, 0x5a, 0x23, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, - 0x2f, 0x67, 0x61, 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x89, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x20, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, + 0x12, 0x2f, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x67, 0x61, 0x6e, 0x74, 0x72, 0x79, 0x2f, + 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x95, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4b, 0x69, 0x6e, 0x65, 0x6d, 0x61, 0x74, + 0x69, 0x63, 0x73, 0x12, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4b, 0x69, 0x6e, 0x65, 0x6d, 0x61, 0x74, 0x69, + 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x76, 0x69, 0x61, 0x6d, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4b, 0x69, + 0x6e, 0x65, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x2f, 0x67, 0x61, 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6b, + 0x69, 0x6e, 0x65, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x73, 0x12, 0x95, 0x01, 0x0a, 0x0d, 0x47, 0x65, + 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x25, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, + 0x12, 0x2f, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x67, 0x61, 0x6e, 0x74, 0x72, 0x79, 0x2f, + 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, + 0x73, 0x42, 0x43, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, + 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x67, 0x61, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x76, + 0x31, 0x5a, 0x23, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x67, 0x61, 0x6e, + 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -863,11 +871,13 @@ var file_component_gantry_v1_gantry_proto_goTypes = []any{ (*IsMovingResponse)(nil), // 12: viam.component.gantry.v1.IsMovingResponse (*structpb.Struct)(nil), // 13: google.protobuf.Struct (*v1.DoCommandRequest)(nil), // 14: viam.common.v1.DoCommandRequest - (*v1.GetKinematicsRequest)(nil), // 15: viam.common.v1.GetKinematicsRequest - (*v1.GetGeometriesRequest)(nil), // 16: viam.common.v1.GetGeometriesRequest - (*v1.DoCommandResponse)(nil), // 17: viam.common.v1.DoCommandResponse - (*v1.GetKinematicsResponse)(nil), // 18: viam.common.v1.GetKinematicsResponse - (*v1.GetGeometriesResponse)(nil), // 19: viam.common.v1.GetGeometriesResponse + (*v1.GetStatusRequest)(nil), // 15: viam.common.v1.GetStatusRequest + (*v1.GetKinematicsRequest)(nil), // 16: viam.common.v1.GetKinematicsRequest + (*v1.GetGeometriesRequest)(nil), // 17: viam.common.v1.GetGeometriesRequest + (*v1.DoCommandResponse)(nil), // 18: viam.common.v1.DoCommandResponse + (*v1.GetStatusResponse)(nil), // 19: viam.common.v1.GetStatusResponse + (*v1.GetKinematicsResponse)(nil), // 20: viam.common.v1.GetKinematicsResponse + (*v1.GetGeometriesResponse)(nil), // 21: viam.common.v1.GetGeometriesResponse } var file_component_gantry_v1_gantry_proto_depIdxs = []int32{ 13, // 0: viam.component.gantry.v1.GetPositionRequest.extra:type_name -> google.protobuf.Struct @@ -882,19 +892,21 @@ var file_component_gantry_v1_gantry_proto_depIdxs = []int32{ 8, // 9: viam.component.gantry.v1.GantryService.Stop:input_type -> viam.component.gantry.v1.StopRequest 11, // 10: viam.component.gantry.v1.GantryService.IsMoving:input_type -> viam.component.gantry.v1.IsMovingRequest 14, // 11: viam.component.gantry.v1.GantryService.DoCommand:input_type -> viam.common.v1.DoCommandRequest - 15, // 12: viam.component.gantry.v1.GantryService.GetKinematics:input_type -> viam.common.v1.GetKinematicsRequest - 16, // 13: viam.component.gantry.v1.GantryService.GetGeometries:input_type -> viam.common.v1.GetGeometriesRequest - 1, // 14: viam.component.gantry.v1.GantryService.GetPosition:output_type -> viam.component.gantry.v1.GetPositionResponse - 3, // 15: viam.component.gantry.v1.GantryService.MoveToPosition:output_type -> viam.component.gantry.v1.MoveToPositionResponse - 5, // 16: viam.component.gantry.v1.GantryService.Home:output_type -> viam.component.gantry.v1.HomeResponse - 7, // 17: viam.component.gantry.v1.GantryService.GetLengths:output_type -> viam.component.gantry.v1.GetLengthsResponse - 9, // 18: viam.component.gantry.v1.GantryService.Stop:output_type -> viam.component.gantry.v1.StopResponse - 12, // 19: viam.component.gantry.v1.GantryService.IsMoving:output_type -> viam.component.gantry.v1.IsMovingResponse - 17, // 20: viam.component.gantry.v1.GantryService.DoCommand:output_type -> viam.common.v1.DoCommandResponse - 18, // 21: viam.component.gantry.v1.GantryService.GetKinematics:output_type -> viam.common.v1.GetKinematicsResponse - 19, // 22: viam.component.gantry.v1.GantryService.GetGeometries:output_type -> viam.common.v1.GetGeometriesResponse - 14, // [14:23] is the sub-list for method output_type - 5, // [5:14] is the sub-list for method input_type + 15, // 12: viam.component.gantry.v1.GantryService.GetStatus:input_type -> viam.common.v1.GetStatusRequest + 16, // 13: viam.component.gantry.v1.GantryService.GetKinematics:input_type -> viam.common.v1.GetKinematicsRequest + 17, // 14: viam.component.gantry.v1.GantryService.GetGeometries:input_type -> viam.common.v1.GetGeometriesRequest + 1, // 15: viam.component.gantry.v1.GantryService.GetPosition:output_type -> viam.component.gantry.v1.GetPositionResponse + 3, // 16: viam.component.gantry.v1.GantryService.MoveToPosition:output_type -> viam.component.gantry.v1.MoveToPositionResponse + 5, // 17: viam.component.gantry.v1.GantryService.Home:output_type -> viam.component.gantry.v1.HomeResponse + 7, // 18: viam.component.gantry.v1.GantryService.GetLengths:output_type -> viam.component.gantry.v1.GetLengthsResponse + 9, // 19: viam.component.gantry.v1.GantryService.Stop:output_type -> viam.component.gantry.v1.StopResponse + 12, // 20: viam.component.gantry.v1.GantryService.IsMoving:output_type -> viam.component.gantry.v1.IsMovingResponse + 18, // 21: viam.component.gantry.v1.GantryService.DoCommand:output_type -> viam.common.v1.DoCommandResponse + 19, // 22: viam.component.gantry.v1.GantryService.GetStatus:output_type -> viam.common.v1.GetStatusResponse + 20, // 23: viam.component.gantry.v1.GantryService.GetKinematics:output_type -> viam.common.v1.GetKinematicsResponse + 21, // 24: viam.component.gantry.v1.GantryService.GetGeometries:output_type -> viam.common.v1.GetGeometriesResponse + 15, // [15:25] is the sub-list for method output_type + 5, // [5:15] is the sub-list for method input_type 5, // [5:5] is the sub-list for extension type_name 5, // [5:5] is the sub-list for extension extendee 0, // [0:5] is the sub-list for field type_name diff --git a/component/gantry/v1/gantry.pb.gw.go b/component/gantry/v1/gantry.pb.gw.go index 3d18ee6f96..e38f5389f5 100644 --- a/component/gantry/v1/gantry.pb.gw.go +++ b/component/gantry/v1/gantry.pb.gw.go @@ -504,6 +504,58 @@ func local_request_GantryService_DoCommand_0(ctx context.Context, marshaler runt } +func request_GantryService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, client GantryServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_GantryService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, server GantryServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetStatus(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_GantryService_GetKinematics_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) @@ -825,6 +877,31 @@ func RegisterGantryServiceHandlerServer(ctx context.Context, mux *runtime.ServeM }) + mux.Handle("GET", pattern_GantryService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.gantry.v1.GantryService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/component/gantry/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_GantryService_GetStatus_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_GantryService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_GantryService_GetKinematics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1070,6 +1147,28 @@ func RegisterGantryServiceHandlerClient(ctx context.Context, mux *runtime.ServeM }) + mux.Handle("GET", pattern_GantryService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.gantry.v1.GantryService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/component/gantry/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_GantryService_GetStatus_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_GantryService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_GantryService_GetKinematics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1132,6 +1231,8 @@ var ( pattern_GantryService_DoCommand_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "gantry", "name", "do_command"}, "")) + pattern_GantryService_GetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "gantry", "name", "get_status"}, "")) + pattern_GantryService_GetKinematics_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "gantry", "name", "kinematics"}, "")) pattern_GantryService_GetGeometries_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "gantry", "name", "geometries"}, "")) @@ -1152,6 +1253,8 @@ var ( forward_GantryService_DoCommand_0 = runtime.ForwardResponseMessage + forward_GantryService_GetStatus_0 = runtime.ForwardResponseMessage + forward_GantryService_GetKinematics_0 = runtime.ForwardResponseMessage forward_GantryService_GetGeometries_0 = runtime.ForwardResponseMessage diff --git a/component/gantry/v1/gantry_grpc.pb.go b/component/gantry/v1/gantry_grpc.pb.go index 002f504373..9e31558948 100644 --- a/component/gantry/v1/gantry_grpc.pb.go +++ b/component/gantry/v1/gantry_grpc.pb.go @@ -37,6 +37,8 @@ type GantryServiceClient interface { IsMoving(ctx context.Context, in *IsMovingRequest, opts ...grpc.CallOption) (*IsMovingResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(ctx context.Context, in *v1.DoCommandRequest, opts ...grpc.CallOption) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) GetKinematics(ctx context.Context, in *v1.GetKinematicsRequest, opts ...grpc.CallOption) (*v1.GetKinematicsResponse, error) // GetGeometries returns the geometries of the component in their current configuration GetGeometries(ctx context.Context, in *v1.GetGeometriesRequest, opts ...grpc.CallOption) (*v1.GetGeometriesResponse, error) @@ -113,6 +115,15 @@ func (c *gantryServiceClient) DoCommand(ctx context.Context, in *v1.DoCommandReq return out, nil } +func (c *gantryServiceClient) GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) { + out := new(v1.GetStatusResponse) + err := c.cc.Invoke(ctx, "/viam.component.gantry.v1.GantryService/GetStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *gantryServiceClient) GetKinematics(ctx context.Context, in *v1.GetKinematicsRequest, opts ...grpc.CallOption) (*v1.GetKinematicsResponse, error) { out := new(v1.GetKinematicsResponse) err := c.cc.Invoke(ctx, "/viam.component.gantry.v1.GantryService/GetKinematics", in, out, opts...) @@ -149,6 +160,8 @@ type GantryServiceServer interface { IsMoving(context.Context, *IsMovingRequest) (*IsMovingResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) GetKinematics(context.Context, *v1.GetKinematicsRequest) (*v1.GetKinematicsResponse, error) // GetGeometries returns the geometries of the component in their current configuration GetGeometries(context.Context, *v1.GetGeometriesRequest) (*v1.GetGeometriesResponse, error) @@ -180,6 +193,9 @@ func (UnimplementedGantryServiceServer) IsMoving(context.Context, *IsMovingReque func (UnimplementedGantryServiceServer) DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DoCommand not implemented") } +func (UnimplementedGantryServiceServer) GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented") +} func (UnimplementedGantryServiceServer) GetKinematics(context.Context, *v1.GetKinematicsRequest) (*v1.GetKinematicsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetKinematics not implemented") } @@ -325,6 +341,24 @@ func _GantryService_DoCommand_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _GantryService_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GantryServiceServer).GetStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.gantry.v1.GantryService/GetStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GantryServiceServer).GetStatus(ctx, req.(*v1.GetStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _GantryService_GetKinematics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(v1.GetKinematicsRequest) if err := dec(in); err != nil { @@ -396,6 +430,10 @@ var GantryService_ServiceDesc = grpc.ServiceDesc{ MethodName: "DoCommand", Handler: _GantryService_DoCommand_Handler, }, + { + MethodName: "GetStatus", + Handler: _GantryService_GetStatus_Handler, + }, { MethodName: "GetKinematics", Handler: _GantryService_GetKinematics_Handler, diff --git a/component/generic/v1/generic.pb.go b/component/generic/v1/generic.pb.go index 7bb2ee8af7..382ac428a8 100644 --- a/component/generic/v1/generic.pb.go +++ b/component/generic/v1/generic.pb.go @@ -31,7 +31,7 @@ var file_component_generic_v1_generic_proto_rawDesc = []byte{ 0x16, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xb6, 0x02, 0x0a, 0x0e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xc3, 0x03, 0x0a, 0x0e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x8a, 0x01, 0x0a, 0x09, 0x44, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x20, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, @@ -41,36 +41,49 @@ var file_component_generic_v1_generic_proto_rawDesc = []byte{ 0x93, 0x02, 0x32, 0x22, 0x30, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x64, 0x6f, 0x5f, 0x63, 0x6f, - 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x96, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, - 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, - 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x12, 0x30, 0x2f, 0x76, - 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, - 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x2f, 0x7b, 0x6e, 0x61, - 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x42, 0x45, - 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, - 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x2e, 0x76, 0x31, 0x5a, - 0x24, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x69, 0x63, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x8a, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x20, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, + 0x12, 0x30, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, + 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x96, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x76, 0x69, 0x61, + 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, + 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x12, 0x30, 0x2f, 0x76, 0x69, 0x61, 0x6d, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, + 0x74, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, + 0x2f, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x42, 0x45, 0x0a, 0x1d, 0x63, + 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, + 0x74, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x2e, 0x76, 0x31, 0x5a, 0x24, 0x67, 0x6f, + 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, + 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x2f, + 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var file_component_generic_v1_generic_proto_goTypes = []any{ (*v1.DoCommandRequest)(nil), // 0: viam.common.v1.DoCommandRequest - (*v1.GetGeometriesRequest)(nil), // 1: viam.common.v1.GetGeometriesRequest - (*v1.DoCommandResponse)(nil), // 2: viam.common.v1.DoCommandResponse - (*v1.GetGeometriesResponse)(nil), // 3: viam.common.v1.GetGeometriesResponse + (*v1.GetStatusRequest)(nil), // 1: viam.common.v1.GetStatusRequest + (*v1.GetGeometriesRequest)(nil), // 2: viam.common.v1.GetGeometriesRequest + (*v1.DoCommandResponse)(nil), // 3: viam.common.v1.DoCommandResponse + (*v1.GetStatusResponse)(nil), // 4: viam.common.v1.GetStatusResponse + (*v1.GetGeometriesResponse)(nil), // 5: viam.common.v1.GetGeometriesResponse } var file_component_generic_v1_generic_proto_depIdxs = []int32{ 0, // 0: viam.component.generic.v1.GenericService.DoCommand:input_type -> viam.common.v1.DoCommandRequest - 1, // 1: viam.component.generic.v1.GenericService.GetGeometries:input_type -> viam.common.v1.GetGeometriesRequest - 2, // 2: viam.component.generic.v1.GenericService.DoCommand:output_type -> viam.common.v1.DoCommandResponse - 3, // 3: viam.component.generic.v1.GenericService.GetGeometries:output_type -> viam.common.v1.GetGeometriesResponse - 2, // [2:4] is the sub-list for method output_type - 0, // [0:2] is the sub-list for method input_type + 1, // 1: viam.component.generic.v1.GenericService.GetStatus:input_type -> viam.common.v1.GetStatusRequest + 2, // 2: viam.component.generic.v1.GenericService.GetGeometries:input_type -> viam.common.v1.GetGeometriesRequest + 3, // 3: viam.component.generic.v1.GenericService.DoCommand:output_type -> viam.common.v1.DoCommandResponse + 4, // 4: viam.component.generic.v1.GenericService.GetStatus:output_type -> viam.common.v1.GetStatusResponse + 5, // 5: viam.component.generic.v1.GenericService.GetGeometries:output_type -> viam.common.v1.GetGeometriesResponse + 3, // [3:6] is the sub-list for method output_type + 0, // [0:3] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name diff --git a/component/generic/v1/generic.pb.gw.go b/component/generic/v1/generic.pb.gw.go index 023d343858..c78619a116 100644 --- a/component/generic/v1/generic.pb.gw.go +++ b/component/generic/v1/generic.pb.gw.go @@ -102,6 +102,58 @@ func local_request_GenericService_DoCommand_0(ctx context.Context, marshaler run } +func request_GenericService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, client GenericServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_GenericService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, server GenericServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetStatus(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_GenericService_GetGeometries_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) @@ -203,6 +255,31 @@ func RegisterGenericServiceHandlerServer(ctx context.Context, mux *runtime.Serve }) + mux.Handle("GET", pattern_GenericService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.generic.v1.GenericService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/component/generic/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_GenericService_GetStatus_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_GenericService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_GenericService_GetGeometries_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -291,6 +368,28 @@ func RegisterGenericServiceHandlerClient(ctx context.Context, mux *runtime.Serve }) + mux.Handle("GET", pattern_GenericService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.generic.v1.GenericService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/component/generic/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_GenericService_GetStatus_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_GenericService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_GenericService_GetGeometries_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -319,11 +418,15 @@ func RegisterGenericServiceHandlerClient(ctx context.Context, mux *runtime.Serve var ( pattern_GenericService_DoCommand_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "generic", "name", "do_command"}, "")) + pattern_GenericService_GetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "generic", "name", "get_status"}, "")) + pattern_GenericService_GetGeometries_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "generic", "name", "geometries"}, "")) ) var ( forward_GenericService_DoCommand_0 = runtime.ForwardResponseMessage + forward_GenericService_GetStatus_0 = runtime.ForwardResponseMessage + forward_GenericService_GetGeometries_0 = runtime.ForwardResponseMessage ) diff --git a/component/generic/v1/generic_grpc.pb.go b/component/generic/v1/generic_grpc.pb.go index 6af5cfc79e..dc781d57e6 100644 --- a/component/generic/v1/generic_grpc.pb.go +++ b/component/generic/v1/generic_grpc.pb.go @@ -25,6 +25,8 @@ const _ = grpc.SupportPackageIsVersion7 type GenericServiceClient interface { // DoCommand sends/receives arbitrary commands DoCommand(ctx context.Context, in *v1.DoCommandRequest, opts ...grpc.CallOption) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) // GetGeometries returns the geometries of the component in their current configuration GetGeometries(ctx context.Context, in *v1.GetGeometriesRequest, opts ...grpc.CallOption) (*v1.GetGeometriesResponse, error) } @@ -46,6 +48,15 @@ func (c *genericServiceClient) DoCommand(ctx context.Context, in *v1.DoCommandRe return out, nil } +func (c *genericServiceClient) GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) { + out := new(v1.GetStatusResponse) + err := c.cc.Invoke(ctx, "/viam.component.generic.v1.GenericService/GetStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *genericServiceClient) GetGeometries(ctx context.Context, in *v1.GetGeometriesRequest, opts ...grpc.CallOption) (*v1.GetGeometriesResponse, error) { out := new(v1.GetGeometriesResponse) err := c.cc.Invoke(ctx, "/viam.component.generic.v1.GenericService/GetGeometries", in, out, opts...) @@ -61,6 +72,8 @@ func (c *genericServiceClient) GetGeometries(ctx context.Context, in *v1.GetGeom type GenericServiceServer interface { // DoCommand sends/receives arbitrary commands DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) // GetGeometries returns the geometries of the component in their current configuration GetGeometries(context.Context, *v1.GetGeometriesRequest) (*v1.GetGeometriesResponse, error) mustEmbedUnimplementedGenericServiceServer() @@ -73,6 +86,9 @@ type UnimplementedGenericServiceServer struct { func (UnimplementedGenericServiceServer) DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DoCommand not implemented") } +func (UnimplementedGenericServiceServer) GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented") +} func (UnimplementedGenericServiceServer) GetGeometries(context.Context, *v1.GetGeometriesRequest) (*v1.GetGeometriesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetGeometries not implemented") } @@ -107,6 +123,24 @@ func _GenericService_DoCommand_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _GenericService_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GenericServiceServer).GetStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.generic.v1.GenericService/GetStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GenericServiceServer).GetStatus(ctx, req.(*v1.GetStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _GenericService_GetGeometries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(v1.GetGeometriesRequest) if err := dec(in); err != nil { @@ -136,6 +170,10 @@ var GenericService_ServiceDesc = grpc.ServiceDesc{ MethodName: "DoCommand", Handler: _GenericService_DoCommand_Handler, }, + { + MethodName: "GetStatus", + Handler: _GenericService_GetStatus_Handler, + }, { MethodName: "GetGeometries", Handler: _GenericService_GetGeometries_Handler, diff --git a/component/gripper/v1/gripper.pb.go b/component/gripper/v1/gripper.pb.go index 6dea209cf1..148712a622 100644 --- a/component/gripper/v1/gripper.pb.go +++ b/component/gripper/v1/gripper.pb.go @@ -558,7 +558,7 @@ var file_component_gripper_v1_gripper_proto_rawDesc = []byte{ 0x67, 0x53, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x2b, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x63, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, - 0x74, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x32, 0xe8, 0x09, 0x0a, 0x0e, 0x47, 0x72, 0x69, 0x70, + 0x74, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x32, 0xf5, 0x0a, 0x0a, 0x0e, 0x47, 0x72, 0x69, 0x70, 0x70, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x8f, 0x01, 0x0a, 0x04, 0x4f, 0x70, 0x65, 0x6e, 0x12, 0x26, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x67, 0x72, 0x69, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, @@ -618,31 +618,39 @@ var file_component_gripper_v1_gripper_proto_rawDesc = []byte{ 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x67, 0x72, 0x69, 0x70, 0x70, 0x65, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x64, 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, - 0x12, 0x96, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, - 0x65, 0x73, 0x12, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x12, 0x30, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, - 0x67, 0x72, 0x69, 0x70, 0x70, 0x65, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, - 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x96, 0x01, 0x0a, 0x0d, 0x47, 0x65, - 0x74, 0x4b, 0x69, 0x6e, 0x65, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x73, 0x12, 0x24, 0x2e, 0x76, 0x69, - 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x4b, 0x69, 0x6e, 0x65, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x25, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4b, 0x69, 0x6e, 0x65, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, - 0x12, 0x30, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, - 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x67, 0x72, 0x69, 0x70, 0x70, 0x65, 0x72, - 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6b, 0x69, 0x6e, 0x65, 0x6d, 0x61, 0x74, 0x69, - 0x63, 0x73, 0x42, 0x45, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, - 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x67, 0x72, 0x69, 0x70, 0x70, 0x65, 0x72, - 0x2e, 0x76, 0x31, 0x5a, 0x24, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x67, - 0x72, 0x69, 0x70, 0x70, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x12, 0x8a, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, + 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x21, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x12, 0x30, 0x2f, 0x76, 0x69, + 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, + 0x65, 0x6e, 0x74, 0x2f, 0x67, 0x72, 0x69, 0x70, 0x70, 0x65, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, + 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x96, 0x01, + 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, + 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x32, 0x12, 0x30, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x67, 0x72, 0x69, + 0x70, 0x70, 0x65, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x6f, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x96, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4b, 0x69, + 0x6e, 0x65, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x73, 0x12, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4b, 0x69, 0x6e, + 0x65, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, + 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x4b, 0x69, 0x6e, 0x65, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x12, 0x30, 0x2f, + 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, + 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x67, 0x72, 0x69, 0x70, 0x70, 0x65, 0x72, 0x2f, 0x7b, 0x6e, + 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6b, 0x69, 0x6e, 0x65, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x73, 0x42, + 0x45, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, + 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x67, 0x72, 0x69, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x76, 0x31, + 0x5a, 0x24, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x67, 0x72, 0x69, 0x70, + 0x70, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -671,11 +679,13 @@ var file_component_gripper_v1_gripper_proto_goTypes = []any{ (*IsHoldingSomethingResponse)(nil), // 9: viam.component.gripper.v1.IsHoldingSomethingResponse (*structpb.Struct)(nil), // 10: google.protobuf.Struct (*v1.DoCommandRequest)(nil), // 11: viam.common.v1.DoCommandRequest - (*v1.GetGeometriesRequest)(nil), // 12: viam.common.v1.GetGeometriesRequest - (*v1.GetKinematicsRequest)(nil), // 13: viam.common.v1.GetKinematicsRequest - (*v1.DoCommandResponse)(nil), // 14: viam.common.v1.DoCommandResponse - (*v1.GetGeometriesResponse)(nil), // 15: viam.common.v1.GetGeometriesResponse - (*v1.GetKinematicsResponse)(nil), // 16: viam.common.v1.GetKinematicsResponse + (*v1.GetStatusRequest)(nil), // 12: viam.common.v1.GetStatusRequest + (*v1.GetGeometriesRequest)(nil), // 13: viam.common.v1.GetGeometriesRequest + (*v1.GetKinematicsRequest)(nil), // 14: viam.common.v1.GetKinematicsRequest + (*v1.DoCommandResponse)(nil), // 15: viam.common.v1.DoCommandResponse + (*v1.GetStatusResponse)(nil), // 16: viam.common.v1.GetStatusResponse + (*v1.GetGeometriesResponse)(nil), // 17: viam.common.v1.GetGeometriesResponse + (*v1.GetKinematicsResponse)(nil), // 18: viam.common.v1.GetKinematicsResponse } var file_component_gripper_v1_gripper_proto_depIdxs = []int32{ 10, // 0: viam.component.gripper.v1.OpenRequest.extra:type_name -> google.protobuf.Struct @@ -690,18 +700,20 @@ var file_component_gripper_v1_gripper_proto_depIdxs = []int32{ 6, // 9: viam.component.gripper.v1.GripperService.IsMoving:input_type -> viam.component.gripper.v1.IsMovingRequest 8, // 10: viam.component.gripper.v1.GripperService.IsHoldingSomething:input_type -> viam.component.gripper.v1.IsHoldingSomethingRequest 11, // 11: viam.component.gripper.v1.GripperService.DoCommand:input_type -> viam.common.v1.DoCommandRequest - 12, // 12: viam.component.gripper.v1.GripperService.GetGeometries:input_type -> viam.common.v1.GetGeometriesRequest - 13, // 13: viam.component.gripper.v1.GripperService.GetKinematics:input_type -> viam.common.v1.GetKinematicsRequest - 1, // 14: viam.component.gripper.v1.GripperService.Open:output_type -> viam.component.gripper.v1.OpenResponse - 3, // 15: viam.component.gripper.v1.GripperService.Grab:output_type -> viam.component.gripper.v1.GrabResponse - 5, // 16: viam.component.gripper.v1.GripperService.Stop:output_type -> viam.component.gripper.v1.StopResponse - 7, // 17: viam.component.gripper.v1.GripperService.IsMoving:output_type -> viam.component.gripper.v1.IsMovingResponse - 9, // 18: viam.component.gripper.v1.GripperService.IsHoldingSomething:output_type -> viam.component.gripper.v1.IsHoldingSomethingResponse - 14, // 19: viam.component.gripper.v1.GripperService.DoCommand:output_type -> viam.common.v1.DoCommandResponse - 15, // 20: viam.component.gripper.v1.GripperService.GetGeometries:output_type -> viam.common.v1.GetGeometriesResponse - 16, // 21: viam.component.gripper.v1.GripperService.GetKinematics:output_type -> viam.common.v1.GetKinematicsResponse - 14, // [14:22] is the sub-list for method output_type - 6, // [6:14] is the sub-list for method input_type + 12, // 12: viam.component.gripper.v1.GripperService.GetStatus:input_type -> viam.common.v1.GetStatusRequest + 13, // 13: viam.component.gripper.v1.GripperService.GetGeometries:input_type -> viam.common.v1.GetGeometriesRequest + 14, // 14: viam.component.gripper.v1.GripperService.GetKinematics:input_type -> viam.common.v1.GetKinematicsRequest + 1, // 15: viam.component.gripper.v1.GripperService.Open:output_type -> viam.component.gripper.v1.OpenResponse + 3, // 16: viam.component.gripper.v1.GripperService.Grab:output_type -> viam.component.gripper.v1.GrabResponse + 5, // 17: viam.component.gripper.v1.GripperService.Stop:output_type -> viam.component.gripper.v1.StopResponse + 7, // 18: viam.component.gripper.v1.GripperService.IsMoving:output_type -> viam.component.gripper.v1.IsMovingResponse + 9, // 19: viam.component.gripper.v1.GripperService.IsHoldingSomething:output_type -> viam.component.gripper.v1.IsHoldingSomethingResponse + 15, // 20: viam.component.gripper.v1.GripperService.DoCommand:output_type -> viam.common.v1.DoCommandResponse + 16, // 21: viam.component.gripper.v1.GripperService.GetStatus:output_type -> viam.common.v1.GetStatusResponse + 17, // 22: viam.component.gripper.v1.GripperService.GetGeometries:output_type -> viam.common.v1.GetGeometriesResponse + 18, // 23: viam.component.gripper.v1.GripperService.GetKinematics:output_type -> viam.common.v1.GetKinematicsResponse + 15, // [15:24] is the sub-list for method output_type + 6, // [6:15] is the sub-list for method input_type 6, // [6:6] is the sub-list for extension type_name 6, // [6:6] is the sub-list for extension extendee 0, // [0:6] is the sub-list for field type_name diff --git a/component/gripper/v1/gripper.pb.gw.go b/component/gripper/v1/gripper.pb.gw.go index d7038d1cb8..3f224f16bd 100644 --- a/component/gripper/v1/gripper.pb.gw.go +++ b/component/gripper/v1/gripper.pb.gw.go @@ -434,6 +434,58 @@ func local_request_GripperService_DoCommand_0(ctx context.Context, marshaler run } +func request_GripperService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, client GripperServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_GripperService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, server GripperServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetStatus(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_GripperService_GetGeometries_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) @@ -730,6 +782,31 @@ func RegisterGripperServiceHandlerServer(ctx context.Context, mux *runtime.Serve }) + mux.Handle("GET", pattern_GripperService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.gripper.v1.GripperService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/component/gripper/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_GripperService_GetStatus_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_GripperService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_GripperService_GetGeometries_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -953,6 +1030,28 @@ func RegisterGripperServiceHandlerClient(ctx context.Context, mux *runtime.Serve }) + mux.Handle("GET", pattern_GripperService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.gripper.v1.GripperService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/component/gripper/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_GripperService_GetStatus_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_GripperService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_GripperService_GetGeometries_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1013,6 +1112,8 @@ var ( pattern_GripperService_DoCommand_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "gripper", "name", "do_command"}, "")) + pattern_GripperService_GetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "gripper", "name", "get_status"}, "")) + pattern_GripperService_GetGeometries_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "gripper", "name", "geometries"}, "")) pattern_GripperService_GetKinematics_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "gripper", "name", "kinematics"}, "")) @@ -1031,6 +1132,8 @@ var ( forward_GripperService_DoCommand_0 = runtime.ForwardResponseMessage + forward_GripperService_GetStatus_0 = runtime.ForwardResponseMessage + forward_GripperService_GetGeometries_0 = runtime.ForwardResponseMessage forward_GripperService_GetKinematics_0 = runtime.ForwardResponseMessage diff --git a/component/gripper/v1/gripper_grpc.pb.go b/component/gripper/v1/gripper_grpc.pb.go index cd2e6fc2d0..74e977cfae 100644 --- a/component/gripper/v1/gripper_grpc.pb.go +++ b/component/gripper/v1/gripper_grpc.pb.go @@ -35,6 +35,8 @@ type GripperServiceClient interface { IsHoldingSomething(ctx context.Context, in *IsHoldingSomethingRequest, opts ...grpc.CallOption) (*IsHoldingSomethingResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(ctx context.Context, in *v1.DoCommandRequest, opts ...grpc.CallOption) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) // GetGeometries returns the geometries of the component in their current configuration GetGeometries(ctx context.Context, in *v1.GetGeometriesRequest, opts ...grpc.CallOption) (*v1.GetGeometriesResponse, error) // GetKinematics returns the kinematics file for the component @@ -103,6 +105,15 @@ func (c *gripperServiceClient) DoCommand(ctx context.Context, in *v1.DoCommandRe return out, nil } +func (c *gripperServiceClient) GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) { + out := new(v1.GetStatusResponse) + err := c.cc.Invoke(ctx, "/viam.component.gripper.v1.GripperService/GetStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *gripperServiceClient) GetGeometries(ctx context.Context, in *v1.GetGeometriesRequest, opts ...grpc.CallOption) (*v1.GetGeometriesResponse, error) { out := new(v1.GetGeometriesResponse) err := c.cc.Invoke(ctx, "/viam.component.gripper.v1.GripperService/GetGeometries", in, out, opts...) @@ -137,6 +148,8 @@ type GripperServiceServer interface { IsHoldingSomething(context.Context, *IsHoldingSomethingRequest) (*IsHoldingSomethingResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) // GetGeometries returns the geometries of the component in their current configuration GetGeometries(context.Context, *v1.GetGeometriesRequest) (*v1.GetGeometriesResponse, error) // GetKinematics returns the kinematics file for the component @@ -166,6 +179,9 @@ func (UnimplementedGripperServiceServer) IsHoldingSomething(context.Context, *Is func (UnimplementedGripperServiceServer) DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DoCommand not implemented") } +func (UnimplementedGripperServiceServer) GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented") +} func (UnimplementedGripperServiceServer) GetGeometries(context.Context, *v1.GetGeometriesRequest) (*v1.GetGeometriesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetGeometries not implemented") } @@ -293,6 +309,24 @@ func _GripperService_DoCommand_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _GripperService_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GripperServiceServer).GetStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.gripper.v1.GripperService/GetStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GripperServiceServer).GetStatus(ctx, req.(*v1.GetStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _GripperService_GetGeometries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(v1.GetGeometriesRequest) if err := dec(in); err != nil { @@ -360,6 +394,10 @@ var GripperService_ServiceDesc = grpc.ServiceDesc{ MethodName: "DoCommand", Handler: _GripperService_DoCommand_Handler, }, + { + MethodName: "GetStatus", + Handler: _GripperService_GetStatus_Handler, + }, { MethodName: "GetGeometries", Handler: _GripperService_GetGeometries_Handler, diff --git a/component/inputcontroller/v1/input_controller.pb.go b/component/inputcontroller/v1/input_controller.pb.go index 00a026438c..af38c85f69 100644 --- a/component/inputcontroller/v1/input_controller.pb.go +++ b/component/inputcontroller/v1/input_controller.pb.go @@ -706,7 +706,7 @@ var file_component_inputcontroller_v1_input_controller_proto_rawDesc = []byte{ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, - 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x32, 0xa7, 0x08, 0x0a, 0x16, 0x49, 0x6e, 0x70, 0x75, 0x74, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x32, 0xb2, 0x09, 0x0a, 0x16, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xb8, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x73, 0x12, 0x35, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, @@ -763,22 +763,31 @@ var file_component_inputcontroller_v1_input_controller_proto_rawDesc = []byte{ 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x22, 0x2e, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x64, - 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x94, 0x01, 0x0a, 0x0d, 0x47, 0x65, - 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x76, 0x69, - 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x25, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, - 0x12, 0x2e, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, - 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x2f, 0x7b, - 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, - 0x42, 0x55, 0x0a, 0x25, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, - 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x5a, 0x2c, 0x67, 0x6f, 0x2e, 0x76, 0x69, - 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, - 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x88, 0x01, 0x0a, 0x09, 0x47, 0x65, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x76, 0x69, 0x61, 0x6d, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x30, 0x12, 0x2e, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x69, 0x6e, 0x70, + 0x75, 0x74, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x94, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x76, + 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x12, 0x2e, 0x2f, 0x76, 0x69, + 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, + 0x65, 0x6e, 0x74, 0x2f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, + 0x2f, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x42, 0x55, 0x0a, 0x25, 0x63, + 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, + 0x74, 0x2e, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, + 0x72, 0x2e, 0x76, 0x31, 0x5a, 0x2c, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, + 0x69, 0x6e, 0x70, 0x75, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, + 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -809,9 +818,11 @@ var file_component_inputcontroller_v1_input_controller_proto_goTypes = []any{ (*structpb.Struct)(nil), // 11: google.protobuf.Struct (*timestamppb.Timestamp)(nil), // 12: google.protobuf.Timestamp (*v1.DoCommandRequest)(nil), // 13: viam.common.v1.DoCommandRequest - (*v1.GetGeometriesRequest)(nil), // 14: viam.common.v1.GetGeometriesRequest - (*v1.DoCommandResponse)(nil), // 15: viam.common.v1.DoCommandResponse - (*v1.GetGeometriesResponse)(nil), // 16: viam.common.v1.GetGeometriesResponse + (*v1.GetStatusRequest)(nil), // 14: viam.common.v1.GetStatusRequest + (*v1.GetGeometriesRequest)(nil), // 15: viam.common.v1.GetGeometriesRequest + (*v1.DoCommandResponse)(nil), // 16: viam.common.v1.DoCommandResponse + (*v1.GetStatusResponse)(nil), // 17: viam.common.v1.GetStatusResponse + (*v1.GetGeometriesResponse)(nil), // 18: viam.common.v1.GetGeometriesResponse } var file_component_inputcontroller_v1_input_controller_proto_depIdxs = []int32{ 11, // 0: viam.component.inputcontroller.v1.GetControlsRequest.extra:type_name -> google.protobuf.Struct @@ -829,15 +840,17 @@ var file_component_inputcontroller_v1_input_controller_proto_depIdxs = []int32{ 7, // 12: viam.component.inputcontroller.v1.InputControllerService.StreamEvents:input_type -> viam.component.inputcontroller.v1.StreamEventsRequest 4, // 13: viam.component.inputcontroller.v1.InputControllerService.TriggerEvent:input_type -> viam.component.inputcontroller.v1.TriggerEventRequest 13, // 14: viam.component.inputcontroller.v1.InputControllerService.DoCommand:input_type -> viam.common.v1.DoCommandRequest - 14, // 15: viam.component.inputcontroller.v1.InputControllerService.GetGeometries:input_type -> viam.common.v1.GetGeometriesRequest - 1, // 16: viam.component.inputcontroller.v1.InputControllerService.GetControls:output_type -> viam.component.inputcontroller.v1.GetControlsResponse - 3, // 17: viam.component.inputcontroller.v1.InputControllerService.GetEvents:output_type -> viam.component.inputcontroller.v1.GetEventsResponse - 8, // 18: viam.component.inputcontroller.v1.InputControllerService.StreamEvents:output_type -> viam.component.inputcontroller.v1.StreamEventsResponse - 5, // 19: viam.component.inputcontroller.v1.InputControllerService.TriggerEvent:output_type -> viam.component.inputcontroller.v1.TriggerEventResponse - 15, // 20: viam.component.inputcontroller.v1.InputControllerService.DoCommand:output_type -> viam.common.v1.DoCommandResponse - 16, // 21: viam.component.inputcontroller.v1.InputControllerService.GetGeometries:output_type -> viam.common.v1.GetGeometriesResponse - 16, // [16:22] is the sub-list for method output_type - 10, // [10:16] is the sub-list for method input_type + 14, // 15: viam.component.inputcontroller.v1.InputControllerService.GetStatus:input_type -> viam.common.v1.GetStatusRequest + 15, // 16: viam.component.inputcontroller.v1.InputControllerService.GetGeometries:input_type -> viam.common.v1.GetGeometriesRequest + 1, // 17: viam.component.inputcontroller.v1.InputControllerService.GetControls:output_type -> viam.component.inputcontroller.v1.GetControlsResponse + 3, // 18: viam.component.inputcontroller.v1.InputControllerService.GetEvents:output_type -> viam.component.inputcontroller.v1.GetEventsResponse + 8, // 19: viam.component.inputcontroller.v1.InputControllerService.StreamEvents:output_type -> viam.component.inputcontroller.v1.StreamEventsResponse + 5, // 20: viam.component.inputcontroller.v1.InputControllerService.TriggerEvent:output_type -> viam.component.inputcontroller.v1.TriggerEventResponse + 16, // 21: viam.component.inputcontroller.v1.InputControllerService.DoCommand:output_type -> viam.common.v1.DoCommandResponse + 17, // 22: viam.component.inputcontroller.v1.InputControllerService.GetStatus:output_type -> viam.common.v1.GetStatusResponse + 18, // 23: viam.component.inputcontroller.v1.InputControllerService.GetGeometries:output_type -> viam.common.v1.GetGeometriesResponse + 17, // [17:24] is the sub-list for method output_type + 10, // [10:17] is the sub-list for method input_type 10, // [10:10] is the sub-list for extension type_name 10, // [10:10] is the sub-list for extension extendee 0, // [0:10] is the sub-list for field type_name diff --git a/component/inputcontroller/v1/input_controller.pb.gw.go b/component/inputcontroller/v1/input_controller.pb.gw.go index d73bfa80a8..667da06da8 100644 --- a/component/inputcontroller/v1/input_controller.pb.gw.go +++ b/component/inputcontroller/v1/input_controller.pb.gw.go @@ -357,6 +357,58 @@ func local_request_InputControllerService_DoCommand_0(ctx context.Context, marsh } +func request_InputControllerService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, client InputControllerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_InputControllerService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, server InputControllerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetStatus(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_InputControllerService_GetGeometries_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) @@ -540,6 +592,31 @@ func RegisterInputControllerServiceHandlerServer(ctx context.Context, mux *runti }) + mux.Handle("GET", pattern_InputControllerService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.inputcontroller.v1.InputControllerService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/component/input/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_InputControllerService_GetStatus_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_InputControllerService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_InputControllerService_GetGeometries_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -716,6 +793,28 @@ func RegisterInputControllerServiceHandlerClient(ctx context.Context, mux *runti }) + mux.Handle("GET", pattern_InputControllerService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.inputcontroller.v1.InputControllerService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/component/input/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_InputControllerService_GetStatus_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_InputControllerService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_InputControllerService_GetGeometries_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -752,6 +851,8 @@ var ( pattern_InputControllerService_DoCommand_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "input", "name", "do_command"}, "")) + pattern_InputControllerService_GetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "input", "name", "get_status"}, "")) + pattern_InputControllerService_GetGeometries_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "input", "name", "geometries"}, "")) ) @@ -766,5 +867,7 @@ var ( forward_InputControllerService_DoCommand_0 = runtime.ForwardResponseMessage + forward_InputControllerService_GetStatus_0 = runtime.ForwardResponseMessage + forward_InputControllerService_GetGeometries_0 = runtime.ForwardResponseMessage ) diff --git a/component/inputcontroller/v1/input_controller_grpc.pb.go b/component/inputcontroller/v1/input_controller_grpc.pb.go index fb12192372..ef3e7cb3af 100644 --- a/component/inputcontroller/v1/input_controller_grpc.pb.go +++ b/component/inputcontroller/v1/input_controller_grpc.pb.go @@ -34,6 +34,8 @@ type InputControllerServiceClient interface { TriggerEvent(ctx context.Context, in *TriggerEventRequest, opts ...grpc.CallOption) (*TriggerEventResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(ctx context.Context, in *v1.DoCommandRequest, opts ...grpc.CallOption) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) // GetGeometries returns the geometries of the component in their current configuration GetGeometries(ctx context.Context, in *v1.GetGeometriesRequest, opts ...grpc.CallOption) (*v1.GetGeometriesResponse, error) } @@ -114,6 +116,15 @@ func (c *inputControllerServiceClient) DoCommand(ctx context.Context, in *v1.DoC return out, nil } +func (c *inputControllerServiceClient) GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) { + out := new(v1.GetStatusResponse) + err := c.cc.Invoke(ctx, "/viam.component.inputcontroller.v1.InputControllerService/GetStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *inputControllerServiceClient) GetGeometries(ctx context.Context, in *v1.GetGeometriesRequest, opts ...grpc.CallOption) (*v1.GetGeometriesResponse, error) { out := new(v1.GetGeometriesResponse) err := c.cc.Invoke(ctx, "/viam.component.inputcontroller.v1.InputControllerService/GetGeometries", in, out, opts...) @@ -138,6 +149,8 @@ type InputControllerServiceServer interface { TriggerEvent(context.Context, *TriggerEventRequest) (*TriggerEventResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) // GetGeometries returns the geometries of the component in their current configuration GetGeometries(context.Context, *v1.GetGeometriesRequest) (*v1.GetGeometriesResponse, error) mustEmbedUnimplementedInputControllerServiceServer() @@ -162,6 +175,9 @@ func (UnimplementedInputControllerServiceServer) TriggerEvent(context.Context, * func (UnimplementedInputControllerServiceServer) DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DoCommand not implemented") } +func (UnimplementedInputControllerServiceServer) GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented") +} func (UnimplementedInputControllerServiceServer) GetGeometries(context.Context, *v1.GetGeometriesRequest) (*v1.GetGeometriesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetGeometries not implemented") } @@ -272,6 +288,24 @@ func _InputControllerService_DoCommand_Handler(srv interface{}, ctx context.Cont return interceptor(ctx, in, info, handler) } +func _InputControllerService_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InputControllerServiceServer).GetStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.inputcontroller.v1.InputControllerService/GetStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InputControllerServiceServer).GetStatus(ctx, req.(*v1.GetStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _InputControllerService_GetGeometries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(v1.GetGeometriesRequest) if err := dec(in); err != nil { @@ -313,6 +347,10 @@ var InputControllerService_ServiceDesc = grpc.ServiceDesc{ MethodName: "DoCommand", Handler: _InputControllerService_DoCommand_Handler, }, + { + MethodName: "GetStatus", + Handler: _InputControllerService_GetStatus_Handler, + }, { MethodName: "GetGeometries", Handler: _InputControllerService_GetGeometries_Handler, diff --git a/component/motor/v1/motor.pb.go b/component/motor/v1/motor.pb.go index 8cd6e06a43..517c9c9fdc 100644 --- a/component/motor/v1/motor.pb.go +++ b/component/motor/v1/motor.pb.go @@ -1203,7 +1203,7 @@ var file_component_motor_v1_motor_proto_rawDesc = []byte{ 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x2f, 0x0a, 0x10, 0x49, 0x73, 0x4d, 0x6f, 0x76, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x6d, 0x6f, 0x76, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x08, 0x69, 0x73, 0x4d, 0x6f, 0x76, 0x69, 0x6e, 0x67, 0x32, 0xae, 0x0e, 0x0a, 0x0c, 0x4d, + 0x52, 0x08, 0x69, 0x73, 0x4d, 0x6f, 0x76, 0x69, 0x6e, 0x67, 0x32, 0xb9, 0x0f, 0x0a, 0x0c, 0x4d, 0x6f, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x96, 0x01, 0x0a, 0x08, 0x53, 0x65, 0x74, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x28, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x2e, @@ -1309,21 +1309,30 @@ var file_component_motor_v1_motor_proto_rawDesc = []byte{ 0xe4, 0x93, 0x02, 0x30, 0x22, 0x2e, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x64, 0x6f, 0x5f, 0x63, 0x6f, 0x6d, - 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x94, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, - 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, - 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x76, - 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x12, 0x2e, 0x2f, 0x76, 0x69, - 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, - 0x65, 0x6e, 0x74, 0x2f, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, - 0x2f, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x42, 0x41, 0x0a, 0x1b, 0x63, - 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, - 0x74, 0x2e, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x5a, 0x22, 0x67, 0x6f, 0x2e, 0x76, - 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x70, - 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x88, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x20, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x12, + 0x2e, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, + 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x2f, 0x7b, 0x6e, + 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x94, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, + 0x73, 0x12, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x12, 0x2e, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x6d, + 0x6f, 0x74, 0x6f, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x6f, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x42, 0x41, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x6d, 0x6f, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x5a, 0x22, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x2f, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -1363,9 +1372,11 @@ var file_component_motor_v1_motor_proto_goTypes = []any{ (*IsMovingResponse)(nil), // 20: viam.component.motor.v1.IsMovingResponse (*structpb.Struct)(nil), // 21: google.protobuf.Struct (*v1.DoCommandRequest)(nil), // 22: viam.common.v1.DoCommandRequest - (*v1.GetGeometriesRequest)(nil), // 23: viam.common.v1.GetGeometriesRequest - (*v1.DoCommandResponse)(nil), // 24: viam.common.v1.DoCommandResponse - (*v1.GetGeometriesResponse)(nil), // 25: viam.common.v1.GetGeometriesResponse + (*v1.GetStatusRequest)(nil), // 23: viam.common.v1.GetStatusRequest + (*v1.GetGeometriesRequest)(nil), // 24: viam.common.v1.GetGeometriesRequest + (*v1.DoCommandResponse)(nil), // 25: viam.common.v1.DoCommandResponse + (*v1.GetStatusResponse)(nil), // 26: viam.common.v1.GetStatusResponse + (*v1.GetGeometriesResponse)(nil), // 27: viam.common.v1.GetGeometriesResponse } var file_component_motor_v1_motor_proto_depIdxs = []int32{ 21, // 0: viam.component.motor.v1.SetPowerRequest.extra:type_name -> google.protobuf.Struct @@ -1388,21 +1399,23 @@ var file_component_motor_v1_motor_proto_depIdxs = []int32{ 14, // 17: viam.component.motor.v1.MotorService.IsPowered:input_type -> viam.component.motor.v1.IsPoweredRequest 19, // 18: viam.component.motor.v1.MotorService.IsMoving:input_type -> viam.component.motor.v1.IsMovingRequest 22, // 19: viam.component.motor.v1.MotorService.DoCommand:input_type -> viam.common.v1.DoCommandRequest - 23, // 20: viam.component.motor.v1.MotorService.GetGeometries:input_type -> viam.common.v1.GetGeometriesRequest - 1, // 21: viam.component.motor.v1.MotorService.SetPower:output_type -> viam.component.motor.v1.SetPowerResponse - 3, // 22: viam.component.motor.v1.MotorService.GoFor:output_type -> viam.component.motor.v1.GoForResponse - 5, // 23: viam.component.motor.v1.MotorService.GoTo:output_type -> viam.component.motor.v1.GoToResponse - 7, // 24: viam.component.motor.v1.MotorService.SetRPM:output_type -> viam.component.motor.v1.SetRPMResponse - 9, // 25: viam.component.motor.v1.MotorService.ResetZeroPosition:output_type -> viam.component.motor.v1.ResetZeroPositionResponse - 11, // 26: viam.component.motor.v1.MotorService.GetPosition:output_type -> viam.component.motor.v1.GetPositionResponse - 17, // 27: viam.component.motor.v1.MotorService.GetProperties:output_type -> viam.component.motor.v1.GetPropertiesResponse - 13, // 28: viam.component.motor.v1.MotorService.Stop:output_type -> viam.component.motor.v1.StopResponse - 15, // 29: viam.component.motor.v1.MotorService.IsPowered:output_type -> viam.component.motor.v1.IsPoweredResponse - 20, // 30: viam.component.motor.v1.MotorService.IsMoving:output_type -> viam.component.motor.v1.IsMovingResponse - 24, // 31: viam.component.motor.v1.MotorService.DoCommand:output_type -> viam.common.v1.DoCommandResponse - 25, // 32: viam.component.motor.v1.MotorService.GetGeometries:output_type -> viam.common.v1.GetGeometriesResponse - 21, // [21:33] is the sub-list for method output_type - 9, // [9:21] is the sub-list for method input_type + 23, // 20: viam.component.motor.v1.MotorService.GetStatus:input_type -> viam.common.v1.GetStatusRequest + 24, // 21: viam.component.motor.v1.MotorService.GetGeometries:input_type -> viam.common.v1.GetGeometriesRequest + 1, // 22: viam.component.motor.v1.MotorService.SetPower:output_type -> viam.component.motor.v1.SetPowerResponse + 3, // 23: viam.component.motor.v1.MotorService.GoFor:output_type -> viam.component.motor.v1.GoForResponse + 5, // 24: viam.component.motor.v1.MotorService.GoTo:output_type -> viam.component.motor.v1.GoToResponse + 7, // 25: viam.component.motor.v1.MotorService.SetRPM:output_type -> viam.component.motor.v1.SetRPMResponse + 9, // 26: viam.component.motor.v1.MotorService.ResetZeroPosition:output_type -> viam.component.motor.v1.ResetZeroPositionResponse + 11, // 27: viam.component.motor.v1.MotorService.GetPosition:output_type -> viam.component.motor.v1.GetPositionResponse + 17, // 28: viam.component.motor.v1.MotorService.GetProperties:output_type -> viam.component.motor.v1.GetPropertiesResponse + 13, // 29: viam.component.motor.v1.MotorService.Stop:output_type -> viam.component.motor.v1.StopResponse + 15, // 30: viam.component.motor.v1.MotorService.IsPowered:output_type -> viam.component.motor.v1.IsPoweredResponse + 20, // 31: viam.component.motor.v1.MotorService.IsMoving:output_type -> viam.component.motor.v1.IsMovingResponse + 25, // 32: viam.component.motor.v1.MotorService.DoCommand:output_type -> viam.common.v1.DoCommandResponse + 26, // 33: viam.component.motor.v1.MotorService.GetStatus:output_type -> viam.common.v1.GetStatusResponse + 27, // 34: viam.component.motor.v1.MotorService.GetGeometries:output_type -> viam.common.v1.GetGeometriesResponse + 22, // [22:35] is the sub-list for method output_type + 9, // [9:22] is the sub-list for method input_type 9, // [9:9] is the sub-list for extension type_name 9, // [9:9] is the sub-list for extension extendee 0, // [0:9] is the sub-list for field type_name diff --git a/component/motor/v1/motor.pb.gw.go b/component/motor/v1/motor.pb.gw.go index 6137ef1639..dabdd587a3 100644 --- a/component/motor/v1/motor.pb.gw.go +++ b/component/motor/v1/motor.pb.gw.go @@ -784,6 +784,58 @@ func local_request_MotorService_DoCommand_0(ctx context.Context, marshaler runti } +func request_MotorService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, client MotorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_MotorService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, server MotorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetStatus(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_MotorService_GetGeometries_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) @@ -1135,6 +1187,31 @@ func RegisterMotorServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu }) + mux.Handle("GET", pattern_MotorService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.motor.v1.MotorService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/component/motor/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_MotorService_GetStatus_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MotorService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_MotorService_GetGeometries_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1443,6 +1520,28 @@ func RegisterMotorServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu }) + mux.Handle("GET", pattern_MotorService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.motor.v1.MotorService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/component/motor/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MotorService_GetStatus_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MotorService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_MotorService_GetGeometries_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1491,6 +1590,8 @@ var ( pattern_MotorService_DoCommand_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "motor", "name", "do_command"}, "")) + pattern_MotorService_GetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "motor", "name", "get_status"}, "")) + pattern_MotorService_GetGeometries_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "motor", "name", "geometries"}, "")) ) @@ -1517,5 +1618,7 @@ var ( forward_MotorService_DoCommand_0 = runtime.ForwardResponseMessage + forward_MotorService_GetStatus_0 = runtime.ForwardResponseMessage + forward_MotorService_GetGeometries_0 = runtime.ForwardResponseMessage ) diff --git a/component/motor/v1/motor_grpc.pb.go b/component/motor/v1/motor_grpc.pb.go index 33b8219008..dfc9c463b7 100644 --- a/component/motor/v1/motor_grpc.pb.go +++ b/component/motor/v1/motor_grpc.pb.go @@ -55,6 +55,8 @@ type MotorServiceClient interface { IsMoving(ctx context.Context, in *IsMovingRequest, opts ...grpc.CallOption) (*IsMovingResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(ctx context.Context, in *v1.DoCommandRequest, opts ...grpc.CallOption) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) // GetGeometries returns the geometries of the component in their current configuration GetGeometries(ctx context.Context, in *v1.GetGeometriesRequest, opts ...grpc.CallOption) (*v1.GetGeometriesResponse, error) } @@ -166,6 +168,15 @@ func (c *motorServiceClient) DoCommand(ctx context.Context, in *v1.DoCommandRequ return out, nil } +func (c *motorServiceClient) GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) { + out := new(v1.GetStatusResponse) + err := c.cc.Invoke(ctx, "/viam.component.motor.v1.MotorService/GetStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *motorServiceClient) GetGeometries(ctx context.Context, in *v1.GetGeometriesRequest, opts ...grpc.CallOption) (*v1.GetGeometriesResponse, error) { out := new(v1.GetGeometriesResponse) err := c.cc.Invoke(ctx, "/viam.component.motor.v1.MotorService/GetGeometries", in, out, opts...) @@ -211,6 +222,8 @@ type MotorServiceServer interface { IsMoving(context.Context, *IsMovingRequest) (*IsMovingResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) // GetGeometries returns the geometries of the component in their current configuration GetGeometries(context.Context, *v1.GetGeometriesRequest) (*v1.GetGeometriesResponse, error) mustEmbedUnimplementedMotorServiceServer() @@ -253,6 +266,9 @@ func (UnimplementedMotorServiceServer) IsMoving(context.Context, *IsMovingReques func (UnimplementedMotorServiceServer) DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DoCommand not implemented") } +func (UnimplementedMotorServiceServer) GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented") +} func (UnimplementedMotorServiceServer) GetGeometries(context.Context, *v1.GetGeometriesRequest) (*v1.GetGeometriesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetGeometries not implemented") } @@ -467,6 +483,24 @@ func _MotorService_DoCommand_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } +func _MotorService_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MotorServiceServer).GetStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.motor.v1.MotorService/GetStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MotorServiceServer).GetStatus(ctx, req.(*v1.GetStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _MotorService_GetGeometries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(v1.GetGeometriesRequest) if err := dec(in); err != nil { @@ -536,6 +570,10 @@ var MotorService_ServiceDesc = grpc.ServiceDesc{ MethodName: "DoCommand", Handler: _MotorService_DoCommand_Handler, }, + { + MethodName: "GetStatus", + Handler: _MotorService_GetStatus_Handler, + }, { MethodName: "GetGeometries", Handler: _MotorService_GetGeometries_Handler, diff --git a/component/movementsensor/v1/movementsensor.pb.go b/component/movementsensor/v1/movementsensor.pb.go index 01c02ba877..5a238d39c7 100644 --- a/component/movementsensor/v1/movementsensor.pb.go +++ b/component/movementsensor/v1/movementsensor.pb.go @@ -1059,7 +1059,7 @@ var file_component_movementsensor_v1_movementsensor_proto_rawDesc = []byte{ 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x33, 0x52, 0x12, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x41, 0x63, 0x63, 0x65, 0x6c, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xcf, 0x10, 0x0a, 0x15, 0x4d, 0x6f, 0x76, 0x65, 0x6d, 0x65, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xe3, 0x11, 0x0a, 0x15, 0x4d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xd2, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x56, 0x65, 0x6c, 0x6f, 0x63, 0x69, 0x74, 0x79, 0x12, 0x3a, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, @@ -1173,32 +1173,41 @@ var file_component_movementsensor_v1_movementsensor_proto_rawDesc = []byte{ 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x6d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x64, 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, - 0x9d, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, - 0x73, 0x12, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, - 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3f, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x12, 0x37, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x6d, - 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2f, 0x7b, 0x6e, - 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, - 0x95, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x12, - 0x22, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x91, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x2e, + 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x21, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x3f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x12, 0x37, 0x2f, 0x76, 0x69, 0x61, + 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x2f, 0x6d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x6e, 0x73, 0x6f, + 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x9d, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x3f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x12, 0x37, 0x2f, 0x76, 0x69, 0x61, + 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x2f, 0x6d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x6e, 0x73, 0x6f, + 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x65, 0x73, 0x12, 0x95, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x69, + 0x6e, 0x67, 0x73, 0x12, 0x22, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, - 0x12, 0x35, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, - 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x6d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x72, - 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x53, 0x0a, 0x24, 0x63, 0x6f, 0x6d, 0x2e, 0x76, - 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x6d, 0x6f, - 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x5a, - 0x2b, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x6d, 0x6f, 0x76, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, + 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x37, 0x12, 0x35, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x6d, 0x6f, 0x76, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, + 0x65, 0x7d, 0x2f, 0x72, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x53, 0x0a, 0x24, 0x63, + 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, + 0x74, 0x2e, 0x6d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x5a, 0x2b, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x6d, + 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2f, 0x76, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1237,11 +1246,13 @@ var file_component_movementsensor_v1_movementsensor_proto_goTypes = []any{ (*v1.Orientation)(nil), // 19: viam.common.v1.Orientation (*v1.GeoPoint)(nil), // 20: viam.common.v1.GeoPoint (*v1.DoCommandRequest)(nil), // 21: viam.common.v1.DoCommandRequest - (*v1.GetGeometriesRequest)(nil), // 22: viam.common.v1.GetGeometriesRequest - (*v1.GetReadingsRequest)(nil), // 23: viam.common.v1.GetReadingsRequest - (*v1.DoCommandResponse)(nil), // 24: viam.common.v1.DoCommandResponse - (*v1.GetGeometriesResponse)(nil), // 25: viam.common.v1.GetGeometriesResponse - (*v1.GetReadingsResponse)(nil), // 26: viam.common.v1.GetReadingsResponse + (*v1.GetStatusRequest)(nil), // 22: viam.common.v1.GetStatusRequest + (*v1.GetGeometriesRequest)(nil), // 23: viam.common.v1.GetGeometriesRequest + (*v1.GetReadingsRequest)(nil), // 24: viam.common.v1.GetReadingsRequest + (*v1.DoCommandResponse)(nil), // 25: viam.common.v1.DoCommandResponse + (*v1.GetStatusResponse)(nil), // 26: viam.common.v1.GetStatusResponse + (*v1.GetGeometriesResponse)(nil), // 27: viam.common.v1.GetGeometriesResponse + (*v1.GetReadingsResponse)(nil), // 28: viam.common.v1.GetReadingsResponse } var file_component_movementsensor_v1_movementsensor_proto_depIdxs = []int32{ 17, // 0: viam.component.movementsensor.v1.GetLinearVelocityRequest.extra:type_name -> google.protobuf.Struct @@ -1267,21 +1278,23 @@ var file_component_movementsensor_v1_movementsensor_proto_depIdxs = []int32{ 12, // 20: viam.component.movementsensor.v1.MovementSensorService.GetAccuracy:input_type -> viam.component.movementsensor.v1.GetAccuracyRequest 14, // 21: viam.component.movementsensor.v1.MovementSensorService.GetLinearAcceleration:input_type -> viam.component.movementsensor.v1.GetLinearAccelerationRequest 21, // 22: viam.component.movementsensor.v1.MovementSensorService.DoCommand:input_type -> viam.common.v1.DoCommandRequest - 22, // 23: viam.component.movementsensor.v1.MovementSensorService.GetGeometries:input_type -> viam.common.v1.GetGeometriesRequest - 23, // 24: viam.component.movementsensor.v1.MovementSensorService.GetReadings:input_type -> viam.common.v1.GetReadingsRequest - 1, // 25: viam.component.movementsensor.v1.MovementSensorService.GetLinearVelocity:output_type -> viam.component.movementsensor.v1.GetLinearVelocityResponse - 3, // 26: viam.component.movementsensor.v1.MovementSensorService.GetAngularVelocity:output_type -> viam.component.movementsensor.v1.GetAngularVelocityResponse - 5, // 27: viam.component.movementsensor.v1.MovementSensorService.GetCompassHeading:output_type -> viam.component.movementsensor.v1.GetCompassHeadingResponse - 7, // 28: viam.component.movementsensor.v1.MovementSensorService.GetOrientation:output_type -> viam.component.movementsensor.v1.GetOrientationResponse - 9, // 29: viam.component.movementsensor.v1.MovementSensorService.GetPosition:output_type -> viam.component.movementsensor.v1.GetPositionResponse - 11, // 30: viam.component.movementsensor.v1.MovementSensorService.GetProperties:output_type -> viam.component.movementsensor.v1.GetPropertiesResponse - 13, // 31: viam.component.movementsensor.v1.MovementSensorService.GetAccuracy:output_type -> viam.component.movementsensor.v1.GetAccuracyResponse - 15, // 32: viam.component.movementsensor.v1.MovementSensorService.GetLinearAcceleration:output_type -> viam.component.movementsensor.v1.GetLinearAccelerationResponse - 24, // 33: viam.component.movementsensor.v1.MovementSensorService.DoCommand:output_type -> viam.common.v1.DoCommandResponse - 25, // 34: viam.component.movementsensor.v1.MovementSensorService.GetGeometries:output_type -> viam.common.v1.GetGeometriesResponse - 26, // 35: viam.component.movementsensor.v1.MovementSensorService.GetReadings:output_type -> viam.common.v1.GetReadingsResponse - 25, // [25:36] is the sub-list for method output_type - 14, // [14:25] is the sub-list for method input_type + 22, // 23: viam.component.movementsensor.v1.MovementSensorService.GetStatus:input_type -> viam.common.v1.GetStatusRequest + 23, // 24: viam.component.movementsensor.v1.MovementSensorService.GetGeometries:input_type -> viam.common.v1.GetGeometriesRequest + 24, // 25: viam.component.movementsensor.v1.MovementSensorService.GetReadings:input_type -> viam.common.v1.GetReadingsRequest + 1, // 26: viam.component.movementsensor.v1.MovementSensorService.GetLinearVelocity:output_type -> viam.component.movementsensor.v1.GetLinearVelocityResponse + 3, // 27: viam.component.movementsensor.v1.MovementSensorService.GetAngularVelocity:output_type -> viam.component.movementsensor.v1.GetAngularVelocityResponse + 5, // 28: viam.component.movementsensor.v1.MovementSensorService.GetCompassHeading:output_type -> viam.component.movementsensor.v1.GetCompassHeadingResponse + 7, // 29: viam.component.movementsensor.v1.MovementSensorService.GetOrientation:output_type -> viam.component.movementsensor.v1.GetOrientationResponse + 9, // 30: viam.component.movementsensor.v1.MovementSensorService.GetPosition:output_type -> viam.component.movementsensor.v1.GetPositionResponse + 11, // 31: viam.component.movementsensor.v1.MovementSensorService.GetProperties:output_type -> viam.component.movementsensor.v1.GetPropertiesResponse + 13, // 32: viam.component.movementsensor.v1.MovementSensorService.GetAccuracy:output_type -> viam.component.movementsensor.v1.GetAccuracyResponse + 15, // 33: viam.component.movementsensor.v1.MovementSensorService.GetLinearAcceleration:output_type -> viam.component.movementsensor.v1.GetLinearAccelerationResponse + 25, // 34: viam.component.movementsensor.v1.MovementSensorService.DoCommand:output_type -> viam.common.v1.DoCommandResponse + 26, // 35: viam.component.movementsensor.v1.MovementSensorService.GetStatus:output_type -> viam.common.v1.GetStatusResponse + 27, // 36: viam.component.movementsensor.v1.MovementSensorService.GetGeometries:output_type -> viam.common.v1.GetGeometriesResponse + 28, // 37: viam.component.movementsensor.v1.MovementSensorService.GetReadings:output_type -> viam.common.v1.GetReadingsResponse + 26, // [26:38] is the sub-list for method output_type + 14, // [14:26] is the sub-list for method input_type 14, // [14:14] is the sub-list for extension type_name 14, // [14:14] is the sub-list for extension extendee 0, // [0:14] is the sub-list for field type_name diff --git a/component/movementsensor/v1/movementsensor.pb.gw.go b/component/movementsensor/v1/movementsensor.pb.gw.go index ccdbe81f11..d8df5a4686 100644 --- a/component/movementsensor/v1/movementsensor.pb.gw.go +++ b/component/movementsensor/v1/movementsensor.pb.gw.go @@ -662,6 +662,58 @@ func local_request_MovementSensorService_DoCommand_0(ctx context.Context, marsha } +func request_MovementSensorService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, client MovementSensorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_MovementSensorService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, server MovementSensorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetStatus(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_MovementSensorService_GetGeometries_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) @@ -1033,6 +1085,31 @@ func RegisterMovementSensorServiceHandlerServer(ctx context.Context, mux *runtim }) + mux.Handle("GET", pattern_MovementSensorService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.movementsensor.v1.MovementSensorService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/component/movementsensor/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_MovementSensorService_GetStatus_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MovementSensorService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_MovementSensorService_GetGeometries_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1322,6 +1399,28 @@ func RegisterMovementSensorServiceHandlerClient(ctx context.Context, mux *runtim }) + mux.Handle("GET", pattern_MovementSensorService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.movementsensor.v1.MovementSensorService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/component/movementsensor/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MovementSensorService_GetStatus_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MovementSensorService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_MovementSensorService_GetGeometries_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1388,6 +1487,8 @@ var ( pattern_MovementSensorService_DoCommand_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "movementsensor", "name", "do_command"}, "")) + pattern_MovementSensorService_GetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "movementsensor", "name", "get_status"}, "")) + pattern_MovementSensorService_GetGeometries_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "movementsensor", "name", "geometries"}, "")) pattern_MovementSensorService_GetReadings_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "movementsensor", "name", "readings"}, "")) @@ -1412,6 +1513,8 @@ var ( forward_MovementSensorService_DoCommand_0 = runtime.ForwardResponseMessage + forward_MovementSensorService_GetStatus_0 = runtime.ForwardResponseMessage + forward_MovementSensorService_GetGeometries_0 = runtime.ForwardResponseMessage forward_MovementSensorService_GetReadings_0 = runtime.ForwardResponseMessage diff --git a/component/movementsensor/v1/movementsensor_grpc.pb.go b/component/movementsensor/v1/movementsensor_grpc.pb.go index 66b61382d4..4653272a4f 100644 --- a/component/movementsensor/v1/movementsensor_grpc.pb.go +++ b/component/movementsensor/v1/movementsensor_grpc.pb.go @@ -32,6 +32,8 @@ type MovementSensorServiceClient interface { GetAccuracy(ctx context.Context, in *GetAccuracyRequest, opts ...grpc.CallOption) (*GetAccuracyResponse, error) GetLinearAcceleration(ctx context.Context, in *GetLinearAccelerationRequest, opts ...grpc.CallOption) (*GetLinearAccelerationResponse, error) DoCommand(ctx context.Context, in *v1.DoCommandRequest, opts ...grpc.CallOption) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) // GetGeometries returns the geometries of the component in their current configuration GetGeometries(ctx context.Context, in *v1.GetGeometriesRequest, opts ...grpc.CallOption) (*v1.GetGeometriesResponse, error) // GetReadings returns the readings of a sensor of the underlying robot. @@ -127,6 +129,15 @@ func (c *movementSensorServiceClient) DoCommand(ctx context.Context, in *v1.DoCo return out, nil } +func (c *movementSensorServiceClient) GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) { + out := new(v1.GetStatusResponse) + err := c.cc.Invoke(ctx, "/viam.component.movementsensor.v1.MovementSensorService/GetStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *movementSensorServiceClient) GetGeometries(ctx context.Context, in *v1.GetGeometriesRequest, opts ...grpc.CallOption) (*v1.GetGeometriesResponse, error) { out := new(v1.GetGeometriesResponse) err := c.cc.Invoke(ctx, "/viam.component.movementsensor.v1.MovementSensorService/GetGeometries", in, out, opts...) @@ -158,6 +169,8 @@ type MovementSensorServiceServer interface { GetAccuracy(context.Context, *GetAccuracyRequest) (*GetAccuracyResponse, error) GetLinearAcceleration(context.Context, *GetLinearAccelerationRequest) (*GetLinearAccelerationResponse, error) DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) // GetGeometries returns the geometries of the component in their current configuration GetGeometries(context.Context, *v1.GetGeometriesRequest) (*v1.GetGeometriesResponse, error) // GetReadings returns the readings of a sensor of the underlying robot. @@ -196,6 +209,9 @@ func (UnimplementedMovementSensorServiceServer) GetLinearAcceleration(context.Co func (UnimplementedMovementSensorServiceServer) DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DoCommand not implemented") } +func (UnimplementedMovementSensorServiceServer) GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented") +} func (UnimplementedMovementSensorServiceServer) GetGeometries(context.Context, *v1.GetGeometriesRequest) (*v1.GetGeometriesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetGeometries not implemented") } @@ -377,6 +393,24 @@ func _MovementSensorService_DoCommand_Handler(srv interface{}, ctx context.Conte return interceptor(ctx, in, info, handler) } +func _MovementSensorService_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MovementSensorServiceServer).GetStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.movementsensor.v1.MovementSensorService/GetStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MovementSensorServiceServer).GetStatus(ctx, req.(*v1.GetStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _MovementSensorService_GetGeometries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(v1.GetGeometriesRequest) if err := dec(in); err != nil { @@ -456,6 +490,10 @@ var MovementSensorService_ServiceDesc = grpc.ServiceDesc{ MethodName: "DoCommand", Handler: _MovementSensorService_DoCommand_Handler, }, + { + MethodName: "GetStatus", + Handler: _MovementSensorService_GetStatus_Handler, + }, { MethodName: "GetGeometries", Handler: _MovementSensorService_GetGeometries_Handler, diff --git a/component/posetracker/v1/pose_tracker.pb.go b/component/posetracker/v1/pose_tracker.pb.go index 4e85ad5b1f..5ea1a086a2 100644 --- a/component/posetracker/v1/pose_tracker.pb.go +++ b/component/posetracker/v1/pose_tracker.pb.go @@ -168,7 +168,7 @@ var file_component_posetracker_v1_pose_tracker_proto_rawDesc = []byte{ 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x65, 0x49, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x32, 0xec, 0x03, 0x0a, 0x12, 0x50, 0x6f, 0x73, 0x65, 0x54, 0x72, 0x61, + 0x3a, 0x02, 0x38, 0x01, 0x32, 0xfe, 0x04, 0x0a, 0x12, 0x50, 0x6f, 0x73, 0x65, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa5, 0x01, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x65, 0x73, 0x12, 0x2e, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x6f, 0x73, 0x65, 0x74, 0x72, @@ -189,21 +189,30 @@ var file_component_posetracker_v1_pose_tracker_proto_rawDesc = []byte{ 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x64, 0x6f, 0x5f, 0x63, 0x6f, - 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x9b, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, - 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, - 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x12, 0x35, 0x2f, 0x76, - 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, - 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x65, - 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x65, 0x73, 0x42, 0x35, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, - 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x5a, 0x1c, 0x67, 0x6f, - 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, - 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x8f, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x20, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, + 0x12, 0x35, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x74, 0x72, + 0x61, 0x63, 0x6b, 0x65, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x74, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x9b, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x47, + 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, + 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x25, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x12, 0x35, + 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, + 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x63, + 0x6b, 0x65, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x6f, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x65, 0x73, 0x42, 0x35, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, + 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x5a, 0x1c, + 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -226,25 +235,29 @@ var file_component_posetracker_v1_pose_tracker_proto_goTypes = []any{ (*structpb.Struct)(nil), // 3: google.protobuf.Struct (*v1.PoseInFrame)(nil), // 4: viam.common.v1.PoseInFrame (*v1.DoCommandRequest)(nil), // 5: viam.common.v1.DoCommandRequest - (*v1.GetGeometriesRequest)(nil), // 6: viam.common.v1.GetGeometriesRequest - (*v1.DoCommandResponse)(nil), // 7: viam.common.v1.DoCommandResponse - (*v1.GetGeometriesResponse)(nil), // 8: viam.common.v1.GetGeometriesResponse + (*v1.GetStatusRequest)(nil), // 6: viam.common.v1.GetStatusRequest + (*v1.GetGeometriesRequest)(nil), // 7: viam.common.v1.GetGeometriesRequest + (*v1.DoCommandResponse)(nil), // 8: viam.common.v1.DoCommandResponse + (*v1.GetStatusResponse)(nil), // 9: viam.common.v1.GetStatusResponse + (*v1.GetGeometriesResponse)(nil), // 10: viam.common.v1.GetGeometriesResponse } var file_component_posetracker_v1_pose_tracker_proto_depIdxs = []int32{ - 3, // 0: viam.component.posetracker.v1.GetPosesRequest.extra:type_name -> google.protobuf.Struct - 2, // 1: viam.component.posetracker.v1.GetPosesResponse.body_poses:type_name -> viam.component.posetracker.v1.GetPosesResponse.BodyPosesEntry - 4, // 2: viam.component.posetracker.v1.GetPosesResponse.BodyPosesEntry.value:type_name -> viam.common.v1.PoseInFrame - 0, // 3: viam.component.posetracker.v1.PoseTrackerService.GetPoses:input_type -> viam.component.posetracker.v1.GetPosesRequest - 5, // 4: viam.component.posetracker.v1.PoseTrackerService.DoCommand:input_type -> viam.common.v1.DoCommandRequest - 6, // 5: viam.component.posetracker.v1.PoseTrackerService.GetGeometries:input_type -> viam.common.v1.GetGeometriesRequest - 1, // 6: viam.component.posetracker.v1.PoseTrackerService.GetPoses:output_type -> viam.component.posetracker.v1.GetPosesResponse - 7, // 7: viam.component.posetracker.v1.PoseTrackerService.DoCommand:output_type -> viam.common.v1.DoCommandResponse - 8, // 8: viam.component.posetracker.v1.PoseTrackerService.GetGeometries:output_type -> viam.common.v1.GetGeometriesResponse - 6, // [6:9] is the sub-list for method output_type - 3, // [3:6] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 3, // 0: viam.component.posetracker.v1.GetPosesRequest.extra:type_name -> google.protobuf.Struct + 2, // 1: viam.component.posetracker.v1.GetPosesResponse.body_poses:type_name -> viam.component.posetracker.v1.GetPosesResponse.BodyPosesEntry + 4, // 2: viam.component.posetracker.v1.GetPosesResponse.BodyPosesEntry.value:type_name -> viam.common.v1.PoseInFrame + 0, // 3: viam.component.posetracker.v1.PoseTrackerService.GetPoses:input_type -> viam.component.posetracker.v1.GetPosesRequest + 5, // 4: viam.component.posetracker.v1.PoseTrackerService.DoCommand:input_type -> viam.common.v1.DoCommandRequest + 6, // 5: viam.component.posetracker.v1.PoseTrackerService.GetStatus:input_type -> viam.common.v1.GetStatusRequest + 7, // 6: viam.component.posetracker.v1.PoseTrackerService.GetGeometries:input_type -> viam.common.v1.GetGeometriesRequest + 1, // 7: viam.component.posetracker.v1.PoseTrackerService.GetPoses:output_type -> viam.component.posetracker.v1.GetPosesResponse + 8, // 8: viam.component.posetracker.v1.PoseTrackerService.DoCommand:output_type -> viam.common.v1.DoCommandResponse + 9, // 9: viam.component.posetracker.v1.PoseTrackerService.GetStatus:output_type -> viam.common.v1.GetStatusResponse + 10, // 10: viam.component.posetracker.v1.PoseTrackerService.GetGeometries:output_type -> viam.common.v1.GetGeometriesResponse + 7, // [7:11] is the sub-list for method output_type + 3, // [3:7] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_component_posetracker_v1_pose_tracker_proto_init() } diff --git a/component/posetracker/v1/pose_tracker.pb.gw.go b/component/posetracker/v1/pose_tracker.pb.gw.go index 453b52421c..caed2f51bd 100644 --- a/component/posetracker/v1/pose_tracker.pb.gw.go +++ b/component/posetracker/v1/pose_tracker.pb.gw.go @@ -172,6 +172,58 @@ func local_request_PoseTrackerService_DoCommand_0(ctx context.Context, marshaler } +func request_PoseTrackerService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, client PoseTrackerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_PoseTrackerService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, server PoseTrackerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetStatus(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_PoseTrackerService_GetGeometries_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) @@ -298,6 +350,31 @@ func RegisterPoseTrackerServiceHandlerServer(ctx context.Context, mux *runtime.S }) + mux.Handle("GET", pattern_PoseTrackerService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.posetracker.v1.PoseTrackerService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/component/pose_tracker/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_PoseTrackerService_GetStatus_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_PoseTrackerService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_PoseTrackerService_GetGeometries_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -408,6 +485,28 @@ func RegisterPoseTrackerServiceHandlerClient(ctx context.Context, mux *runtime.S }) + mux.Handle("GET", pattern_PoseTrackerService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.posetracker.v1.PoseTrackerService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/component/pose_tracker/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_PoseTrackerService_GetStatus_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_PoseTrackerService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_PoseTrackerService_GetGeometries_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -438,6 +537,8 @@ var ( pattern_PoseTrackerService_DoCommand_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "pose_tracker", "name", "do_command"}, "")) + pattern_PoseTrackerService_GetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "pose_tracker", "name", "get_status"}, "")) + pattern_PoseTrackerService_GetGeometries_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "pose_tracker", "name", "geometries"}, "")) ) @@ -446,5 +547,7 @@ var ( forward_PoseTrackerService_DoCommand_0 = runtime.ForwardResponseMessage + forward_PoseTrackerService_GetStatus_0 = runtime.ForwardResponseMessage + forward_PoseTrackerService_GetGeometries_0 = runtime.ForwardResponseMessage ) diff --git a/component/posetracker/v1/pose_tracker_grpc.pb.go b/component/posetracker/v1/pose_tracker_grpc.pb.go index 5c13719d6d..739a101ffa 100644 --- a/component/posetracker/v1/pose_tracker_grpc.pb.go +++ b/component/posetracker/v1/pose_tracker_grpc.pb.go @@ -27,6 +27,8 @@ type PoseTrackerServiceClient interface { GetPoses(ctx context.Context, in *GetPosesRequest, opts ...grpc.CallOption) (*GetPosesResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(ctx context.Context, in *v1.DoCommandRequest, opts ...grpc.CallOption) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) // GetGeometries returns the geometries of the component in their current configuration GetGeometries(ctx context.Context, in *v1.GetGeometriesRequest, opts ...grpc.CallOption) (*v1.GetGeometriesResponse, error) } @@ -57,6 +59,15 @@ func (c *poseTrackerServiceClient) DoCommand(ctx context.Context, in *v1.DoComma return out, nil } +func (c *poseTrackerServiceClient) GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) { + out := new(v1.GetStatusResponse) + err := c.cc.Invoke(ctx, "/viam.component.posetracker.v1.PoseTrackerService/GetStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *poseTrackerServiceClient) GetGeometries(ctx context.Context, in *v1.GetGeometriesRequest, opts ...grpc.CallOption) (*v1.GetGeometriesResponse, error) { out := new(v1.GetGeometriesResponse) err := c.cc.Invoke(ctx, "/viam.component.posetracker.v1.PoseTrackerService/GetGeometries", in, out, opts...) @@ -74,6 +85,8 @@ type PoseTrackerServiceServer interface { GetPoses(context.Context, *GetPosesRequest) (*GetPosesResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) // GetGeometries returns the geometries of the component in their current configuration GetGeometries(context.Context, *v1.GetGeometriesRequest) (*v1.GetGeometriesResponse, error) mustEmbedUnimplementedPoseTrackerServiceServer() @@ -89,6 +102,9 @@ func (UnimplementedPoseTrackerServiceServer) GetPoses(context.Context, *GetPoses func (UnimplementedPoseTrackerServiceServer) DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DoCommand not implemented") } +func (UnimplementedPoseTrackerServiceServer) GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented") +} func (UnimplementedPoseTrackerServiceServer) GetGeometries(context.Context, *v1.GetGeometriesRequest) (*v1.GetGeometriesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetGeometries not implemented") } @@ -141,6 +157,24 @@ func _PoseTrackerService_DoCommand_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _PoseTrackerService_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PoseTrackerServiceServer).GetStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.posetracker.v1.PoseTrackerService/GetStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PoseTrackerServiceServer).GetStatus(ctx, req.(*v1.GetStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _PoseTrackerService_GetGeometries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(v1.GetGeometriesRequest) if err := dec(in); err != nil { @@ -174,6 +208,10 @@ var PoseTrackerService_ServiceDesc = grpc.ServiceDesc{ MethodName: "DoCommand", Handler: _PoseTrackerService_DoCommand_Handler, }, + { + MethodName: "GetStatus", + Handler: _PoseTrackerService_GetStatus_Handler, + }, { MethodName: "GetGeometries", Handler: _PoseTrackerService_GetGeometries_Handler, diff --git a/component/powersensor/v1/powersensor.pb.go b/component/powersensor/v1/powersensor.pb.go index fa572fda46..75f3098a2e 100644 --- a/component/powersensor/v1/powersensor.pb.go +++ b/component/powersensor/v1/powersensor.pb.go @@ -384,7 +384,7 @@ var file_component_powersensor_v1_powersensor_proto_rawDesc = []byte{ 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, 0x28, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x77, 0x61, 0x74, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, - 0x77, 0x61, 0x74, 0x74, 0x73, 0x32, 0xc4, 0x06, 0x0a, 0x12, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x53, + 0x77, 0x61, 0x74, 0x74, 0x73, 0x32, 0xd6, 0x07, 0x0a, 0x12, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xad, 0x01, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x74, 0x61, 0x67, 0x65, 0x12, 0x30, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x6f, 0x77, @@ -436,13 +436,22 @@ var file_component_powersensor_v1_powersensor_proto_rawDesc = []byte{ 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x22, 0x35, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, - 0x7d, 0x2f, 0x64, 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x42, 0x4d, 0x0a, 0x21, - 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, - 0x6e, 0x74, 0x2e, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2e, 0x76, - 0x31, 0x5a, 0x28, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x70, 0x6f, 0x77, - 0x65, 0x72, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x7d, 0x2f, 0x64, 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x8f, 0x01, 0x0a, + 0x09, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x2e, 0x76, 0x69, 0x61, + 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x76, + 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x3d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x12, 0x35, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, + 0x70, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2f, 0x7b, 0x6e, 0x61, + 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x4d, + 0x0a, 0x21, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x5a, 0x28, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x70, + 0x6f, 0x77, 0x65, 0x72, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -468,8 +477,10 @@ var file_component_powersensor_v1_powersensor_proto_goTypes = []any{ (*structpb.Struct)(nil), // 6: google.protobuf.Struct (*v1.GetReadingsRequest)(nil), // 7: viam.common.v1.GetReadingsRequest (*v1.DoCommandRequest)(nil), // 8: viam.common.v1.DoCommandRequest - (*v1.GetReadingsResponse)(nil), // 9: viam.common.v1.GetReadingsResponse - (*v1.DoCommandResponse)(nil), // 10: viam.common.v1.DoCommandResponse + (*v1.GetStatusRequest)(nil), // 9: viam.common.v1.GetStatusRequest + (*v1.GetReadingsResponse)(nil), // 10: viam.common.v1.GetReadingsResponse + (*v1.DoCommandResponse)(nil), // 11: viam.common.v1.DoCommandResponse + (*v1.GetStatusResponse)(nil), // 12: viam.common.v1.GetStatusResponse } var file_component_powersensor_v1_powersensor_proto_depIdxs = []int32{ 6, // 0: viam.component.powersensor.v1.GetVoltageRequest.extra:type_name -> google.protobuf.Struct @@ -480,13 +491,15 @@ var file_component_powersensor_v1_powersensor_proto_depIdxs = []int32{ 4, // 5: viam.component.powersensor.v1.PowerSensorService.GetPower:input_type -> viam.component.powersensor.v1.GetPowerRequest 7, // 6: viam.component.powersensor.v1.PowerSensorService.GetReadings:input_type -> viam.common.v1.GetReadingsRequest 8, // 7: viam.component.powersensor.v1.PowerSensorService.DoCommand:input_type -> viam.common.v1.DoCommandRequest - 1, // 8: viam.component.powersensor.v1.PowerSensorService.GetVoltage:output_type -> viam.component.powersensor.v1.GetVoltageResponse - 3, // 9: viam.component.powersensor.v1.PowerSensorService.GetCurrent:output_type -> viam.component.powersensor.v1.GetCurrentResponse - 5, // 10: viam.component.powersensor.v1.PowerSensorService.GetPower:output_type -> viam.component.powersensor.v1.GetPowerResponse - 9, // 11: viam.component.powersensor.v1.PowerSensorService.GetReadings:output_type -> viam.common.v1.GetReadingsResponse - 10, // 12: viam.component.powersensor.v1.PowerSensorService.DoCommand:output_type -> viam.common.v1.DoCommandResponse - 8, // [8:13] is the sub-list for method output_type - 3, // [3:8] is the sub-list for method input_type + 9, // 8: viam.component.powersensor.v1.PowerSensorService.GetStatus:input_type -> viam.common.v1.GetStatusRequest + 1, // 9: viam.component.powersensor.v1.PowerSensorService.GetVoltage:output_type -> viam.component.powersensor.v1.GetVoltageResponse + 3, // 10: viam.component.powersensor.v1.PowerSensorService.GetCurrent:output_type -> viam.component.powersensor.v1.GetCurrentResponse + 5, // 11: viam.component.powersensor.v1.PowerSensorService.GetPower:output_type -> viam.component.powersensor.v1.GetPowerResponse + 10, // 12: viam.component.powersensor.v1.PowerSensorService.GetReadings:output_type -> viam.common.v1.GetReadingsResponse + 11, // 13: viam.component.powersensor.v1.PowerSensorService.DoCommand:output_type -> viam.common.v1.DoCommandResponse + 12, // 14: viam.component.powersensor.v1.PowerSensorService.GetStatus:output_type -> viam.common.v1.GetStatusResponse + 9, // [9:15] is the sub-list for method output_type + 3, // [3:9] is the sub-list for method input_type 3, // [3:3] is the sub-list for extension type_name 3, // [3:3] is the sub-list for extension extendee 0, // [0:3] is the sub-list for field type_name diff --git a/component/powersensor/v1/powersensor.pb.gw.go b/component/powersensor/v1/powersensor.pb.gw.go index 623f489c31..d3132ad622 100644 --- a/component/powersensor/v1/powersensor.pb.gw.go +++ b/component/powersensor/v1/powersensor.pb.gw.go @@ -382,6 +382,58 @@ func local_request_PowerSensorService_DoCommand_0(ctx context.Context, marshaler } +func request_PowerSensorService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, client PowerSensorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_PowerSensorService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, server PowerSensorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetStatus(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterPowerSensorServiceHandlerServer registers the http handlers for service PowerSensorService to "mux". // UnaryRPC :call PowerSensorServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -513,6 +565,31 @@ func RegisterPowerSensorServiceHandlerServer(ctx context.Context, mux *runtime.S }) + mux.Handle("GET", pattern_PowerSensorService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.powersensor.v1.PowerSensorService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/component/power_sensor/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_PowerSensorService_GetStatus_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_PowerSensorService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -664,6 +741,28 @@ func RegisterPowerSensorServiceHandlerClient(ctx context.Context, mux *runtime.S }) + mux.Handle("GET", pattern_PowerSensorService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.powersensor.v1.PowerSensorService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/component/power_sensor/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_PowerSensorService_GetStatus_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_PowerSensorService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -677,6 +776,8 @@ var ( pattern_PowerSensorService_GetReadings_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "power_sensor", "name", "readings"}, "")) pattern_PowerSensorService_DoCommand_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "power_sensor", "name", "do_command"}, "")) + + pattern_PowerSensorService_GetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "power_sensor", "name", "get_status"}, "")) ) var ( @@ -689,4 +790,6 @@ var ( forward_PowerSensorService_GetReadings_0 = runtime.ForwardResponseMessage forward_PowerSensorService_DoCommand_0 = runtime.ForwardResponseMessage + + forward_PowerSensorService_GetStatus_0 = runtime.ForwardResponseMessage ) diff --git a/component/powersensor/v1/powersensor_grpc.pb.go b/component/powersensor/v1/powersensor_grpc.pb.go index ee65f524f3..7c256788f7 100644 --- a/component/powersensor/v1/powersensor_grpc.pb.go +++ b/component/powersensor/v1/powersensor_grpc.pb.go @@ -33,6 +33,8 @@ type PowerSensorServiceClient interface { GetReadings(ctx context.Context, in *v1.GetReadingsRequest, opts ...grpc.CallOption) (*v1.GetReadingsResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(ctx context.Context, in *v1.DoCommandRequest, opts ...grpc.CallOption) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) } type powerSensorServiceClient struct { @@ -88,6 +90,15 @@ func (c *powerSensorServiceClient) DoCommand(ctx context.Context, in *v1.DoComma return out, nil } +func (c *powerSensorServiceClient) GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) { + out := new(v1.GetStatusResponse) + err := c.cc.Invoke(ctx, "/viam.component.powersensor.v1.PowerSensorService/GetStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // PowerSensorServiceServer is the server API for PowerSensorService service. // All implementations must embed UnimplementedPowerSensorServiceServer // for forward compatibility @@ -102,6 +113,8 @@ type PowerSensorServiceServer interface { GetReadings(context.Context, *v1.GetReadingsRequest) (*v1.GetReadingsResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) mustEmbedUnimplementedPowerSensorServiceServer() } @@ -124,6 +137,9 @@ func (UnimplementedPowerSensorServiceServer) GetReadings(context.Context, *v1.Ge func (UnimplementedPowerSensorServiceServer) DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DoCommand not implemented") } +func (UnimplementedPowerSensorServiceServer) GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented") +} func (UnimplementedPowerSensorServiceServer) mustEmbedUnimplementedPowerSensorServiceServer() {} // UnsafePowerSensorServiceServer may be embedded to opt out of forward compatibility for this service. @@ -227,6 +243,24 @@ func _PowerSensorService_DoCommand_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _PowerSensorService_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PowerSensorServiceServer).GetStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.powersensor.v1.PowerSensorService/GetStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PowerSensorServiceServer).GetStatus(ctx, req.(*v1.GetStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + // PowerSensorService_ServiceDesc is the grpc.ServiceDesc for PowerSensorService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -254,6 +288,10 @@ var PowerSensorService_ServiceDesc = grpc.ServiceDesc{ MethodName: "DoCommand", Handler: _PowerSensorService_DoCommand_Handler, }, + { + MethodName: "GetStatus", + Handler: _PowerSensorService_GetStatus_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "component/powersensor/v1/powersensor.proto", diff --git a/component/sensor/v1/sensor.pb.go b/component/sensor/v1/sensor.pb.go index df318426f6..f2d43d7df4 100644 --- a/component/sensor/v1/sensor.pb.go +++ b/component/sensor/v1/sensor.pb.go @@ -31,7 +31,7 @@ var file_component_sensor_v1_sensor_proto_rawDesc = []byte{ 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x32, 0xc3, 0x03, 0x0a, 0x0d, 0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x53, 0x65, 0x72, + 0x74, 0x6f, 0x32, 0xcf, 0x04, 0x0a, 0x0d, 0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x8d, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x22, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, @@ -50,40 +50,53 @@ var file_component_sensor_v1_sensor_proto_rawDesc = []byte{ 0x2f, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x64, 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, - 0x12, 0x95, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, - 0x65, 0x73, 0x12, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, - 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, - 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x42, 0x43, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, - 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x73, - 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x5a, 0x23, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, - 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, - 0x65, 0x6e, 0x74, 0x2f, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x89, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, + 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x21, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x76, 0x69, + 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, + 0x65, 0x6e, 0x74, 0x2f, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, + 0x7d, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x95, 0x01, 0x0a, + 0x0d, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x24, + 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x73, 0x65, 0x6e, 0x73, + 0x6f, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x65, 0x73, 0x42, 0x43, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, + 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x65, 0x6e, 0x73, 0x6f, + 0x72, 0x2e, 0x76, 0x31, 0x5a, 0x23, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, + 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var file_component_sensor_v1_sensor_proto_goTypes = []any{ (*v1.GetReadingsRequest)(nil), // 0: viam.common.v1.GetReadingsRequest (*v1.DoCommandRequest)(nil), // 1: viam.common.v1.DoCommandRequest - (*v1.GetGeometriesRequest)(nil), // 2: viam.common.v1.GetGeometriesRequest - (*v1.GetReadingsResponse)(nil), // 3: viam.common.v1.GetReadingsResponse - (*v1.DoCommandResponse)(nil), // 4: viam.common.v1.DoCommandResponse - (*v1.GetGeometriesResponse)(nil), // 5: viam.common.v1.GetGeometriesResponse + (*v1.GetStatusRequest)(nil), // 2: viam.common.v1.GetStatusRequest + (*v1.GetGeometriesRequest)(nil), // 3: viam.common.v1.GetGeometriesRequest + (*v1.GetReadingsResponse)(nil), // 4: viam.common.v1.GetReadingsResponse + (*v1.DoCommandResponse)(nil), // 5: viam.common.v1.DoCommandResponse + (*v1.GetStatusResponse)(nil), // 6: viam.common.v1.GetStatusResponse + (*v1.GetGeometriesResponse)(nil), // 7: viam.common.v1.GetGeometriesResponse } var file_component_sensor_v1_sensor_proto_depIdxs = []int32{ 0, // 0: viam.component.sensor.v1.SensorService.GetReadings:input_type -> viam.common.v1.GetReadingsRequest 1, // 1: viam.component.sensor.v1.SensorService.DoCommand:input_type -> viam.common.v1.DoCommandRequest - 2, // 2: viam.component.sensor.v1.SensorService.GetGeometries:input_type -> viam.common.v1.GetGeometriesRequest - 3, // 3: viam.component.sensor.v1.SensorService.GetReadings:output_type -> viam.common.v1.GetReadingsResponse - 4, // 4: viam.component.sensor.v1.SensorService.DoCommand:output_type -> viam.common.v1.DoCommandResponse - 5, // 5: viam.component.sensor.v1.SensorService.GetGeometries:output_type -> viam.common.v1.GetGeometriesResponse - 3, // [3:6] is the sub-list for method output_type - 0, // [0:3] is the sub-list for method input_type + 2, // 2: viam.component.sensor.v1.SensorService.GetStatus:input_type -> viam.common.v1.GetStatusRequest + 3, // 3: viam.component.sensor.v1.SensorService.GetGeometries:input_type -> viam.common.v1.GetGeometriesRequest + 4, // 4: viam.component.sensor.v1.SensorService.GetReadings:output_type -> viam.common.v1.GetReadingsResponse + 5, // 5: viam.component.sensor.v1.SensorService.DoCommand:output_type -> viam.common.v1.DoCommandResponse + 6, // 6: viam.component.sensor.v1.SensorService.GetStatus:output_type -> viam.common.v1.GetStatusResponse + 7, // 7: viam.component.sensor.v1.SensorService.GetGeometries:output_type -> viam.common.v1.GetGeometriesResponse + 4, // [4:8] is the sub-list for method output_type + 0, // [0:4] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name diff --git a/component/sensor/v1/sensor.pb.gw.go b/component/sensor/v1/sensor.pb.gw.go index 1c3d3c79fb..4883a12511 100644 --- a/component/sensor/v1/sensor.pb.gw.go +++ b/component/sensor/v1/sensor.pb.gw.go @@ -172,6 +172,58 @@ func local_request_SensorService_DoCommand_0(ctx context.Context, marshaler runt } +func request_SensorService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, client SensorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SensorService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, server SensorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetStatus(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_SensorService_GetGeometries_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) @@ -298,6 +350,31 @@ func RegisterSensorServiceHandlerServer(ctx context.Context, mux *runtime.ServeM }) + mux.Handle("GET", pattern_SensorService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.sensor.v1.SensorService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/component/sensor/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SensorService_GetStatus_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SensorService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_SensorService_GetGeometries_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -408,6 +485,28 @@ func RegisterSensorServiceHandlerClient(ctx context.Context, mux *runtime.ServeM }) + mux.Handle("GET", pattern_SensorService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.sensor.v1.SensorService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/component/sensor/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SensorService_GetStatus_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SensorService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_SensorService_GetGeometries_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -438,6 +537,8 @@ var ( pattern_SensorService_DoCommand_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "sensor", "name", "do_command"}, "")) + pattern_SensorService_GetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "sensor", "name", "get_status"}, "")) + pattern_SensorService_GetGeometries_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "sensor", "name", "geometries"}, "")) ) @@ -446,5 +547,7 @@ var ( forward_SensorService_DoCommand_0 = runtime.ForwardResponseMessage + forward_SensorService_GetStatus_0 = runtime.ForwardResponseMessage + forward_SensorService_GetGeometries_0 = runtime.ForwardResponseMessage ) diff --git a/component/sensor/v1/sensor_grpc.pb.go b/component/sensor/v1/sensor_grpc.pb.go index 8a86dddadd..c5b0202146 100644 --- a/component/sensor/v1/sensor_grpc.pb.go +++ b/component/sensor/v1/sensor_grpc.pb.go @@ -27,6 +27,8 @@ type SensorServiceClient interface { GetReadings(ctx context.Context, in *v1.GetReadingsRequest, opts ...grpc.CallOption) (*v1.GetReadingsResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(ctx context.Context, in *v1.DoCommandRequest, opts ...grpc.CallOption) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) // GetGeometries returns the geometries of the component in their current configuration GetGeometries(ctx context.Context, in *v1.GetGeometriesRequest, opts ...grpc.CallOption) (*v1.GetGeometriesResponse, error) } @@ -57,6 +59,15 @@ func (c *sensorServiceClient) DoCommand(ctx context.Context, in *v1.DoCommandReq return out, nil } +func (c *sensorServiceClient) GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) { + out := new(v1.GetStatusResponse) + err := c.cc.Invoke(ctx, "/viam.component.sensor.v1.SensorService/GetStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *sensorServiceClient) GetGeometries(ctx context.Context, in *v1.GetGeometriesRequest, opts ...grpc.CallOption) (*v1.GetGeometriesResponse, error) { out := new(v1.GetGeometriesResponse) err := c.cc.Invoke(ctx, "/viam.component.sensor.v1.SensorService/GetGeometries", in, out, opts...) @@ -74,6 +85,8 @@ type SensorServiceServer interface { GetReadings(context.Context, *v1.GetReadingsRequest) (*v1.GetReadingsResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) // GetGeometries returns the geometries of the component in their current configuration GetGeometries(context.Context, *v1.GetGeometriesRequest) (*v1.GetGeometriesResponse, error) mustEmbedUnimplementedSensorServiceServer() @@ -89,6 +102,9 @@ func (UnimplementedSensorServiceServer) GetReadings(context.Context, *v1.GetRead func (UnimplementedSensorServiceServer) DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DoCommand not implemented") } +func (UnimplementedSensorServiceServer) GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented") +} func (UnimplementedSensorServiceServer) GetGeometries(context.Context, *v1.GetGeometriesRequest) (*v1.GetGeometriesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetGeometries not implemented") } @@ -141,6 +157,24 @@ func _SensorService_DoCommand_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _SensorService_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SensorServiceServer).GetStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.sensor.v1.SensorService/GetStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SensorServiceServer).GetStatus(ctx, req.(*v1.GetStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _SensorService_GetGeometries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(v1.GetGeometriesRequest) if err := dec(in); err != nil { @@ -174,6 +208,10 @@ var SensorService_ServiceDesc = grpc.ServiceDesc{ MethodName: "DoCommand", Handler: _SensorService_DoCommand_Handler, }, + { + MethodName: "GetStatus", + Handler: _SensorService_GetStatus_Handler, + }, { MethodName: "GetGeometries", Handler: _SensorService_GetGeometries_Handler, diff --git a/component/servo/v1/servo.pb.go b/component/servo/v1/servo.pb.go index e7f6ba9f93..a2b35e39d5 100644 --- a/component/servo/v1/servo.pb.go +++ b/component/servo/v1/servo.pb.go @@ -503,7 +503,7 @@ var file_component_servo_v1_servo_proto_rawDesc = []byte{ 0x6d, 0x65, 0x22, 0x2f, 0x0a, 0x10, 0x49, 0x73, 0x4d, 0x6f, 0x76, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x6d, 0x6f, 0x76, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x4d, 0x6f, 0x76, - 0x69, 0x6e, 0x67, 0x32, 0xfe, 0x06, 0x0a, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x6f, 0x53, 0x65, 0x72, + 0x69, 0x6e, 0x67, 0x32, 0x89, 0x08, 0x0a, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x89, 0x01, 0x0a, 0x04, 0x4d, 0x6f, 0x76, 0x65, 0x12, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, @@ -549,21 +549,30 @@ var file_component_servo_v1_servo_proto_rawDesc = []byte{ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x22, 0x2e, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x6f, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, - 0x65, 0x7d, 0x2f, 0x64, 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x94, 0x01, - 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, - 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, - 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x30, 0x12, 0x2e, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x73, 0x65, 0x72, - 0x76, 0x6f, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, - 0x72, 0x69, 0x65, 0x73, 0x42, 0x41, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, - 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x6f, - 0x2e, 0x76, 0x31, 0x5a, 0x22, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x73, - 0x65, 0x72, 0x76, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x7d, 0x2f, 0x64, 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x88, 0x01, + 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, + 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x12, 0x2e, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x2f, 0x73, 0x65, 0x72, 0x76, 0x6f, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, + 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x94, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, + 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x76, 0x69, 0x61, + 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, + 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x25, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x12, + 0x2e, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, + 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x6f, 0x2f, 0x7b, 0x6e, + 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x42, + 0x41, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, + 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x6f, 0x2e, 0x76, 0x31, 0x5a, 0x22, + 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x6f, 0x2f, + 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -591,9 +600,11 @@ var file_component_servo_v1_servo_proto_goTypes = []any{ (*IsMovingResponse)(nil), // 8: viam.component.servo.v1.IsMovingResponse (*structpb.Struct)(nil), // 9: google.protobuf.Struct (*v1.DoCommandRequest)(nil), // 10: viam.common.v1.DoCommandRequest - (*v1.GetGeometriesRequest)(nil), // 11: viam.common.v1.GetGeometriesRequest - (*v1.DoCommandResponse)(nil), // 12: viam.common.v1.DoCommandResponse - (*v1.GetGeometriesResponse)(nil), // 13: viam.common.v1.GetGeometriesResponse + (*v1.GetStatusRequest)(nil), // 11: viam.common.v1.GetStatusRequest + (*v1.GetGeometriesRequest)(nil), // 12: viam.common.v1.GetGeometriesRequest + (*v1.DoCommandResponse)(nil), // 13: viam.common.v1.DoCommandResponse + (*v1.GetStatusResponse)(nil), // 14: viam.common.v1.GetStatusResponse + (*v1.GetGeometriesResponse)(nil), // 15: viam.common.v1.GetGeometriesResponse } var file_component_servo_v1_servo_proto_depIdxs = []int32{ 9, // 0: viam.component.servo.v1.MoveRequest.extra:type_name -> google.protobuf.Struct @@ -604,15 +615,17 @@ var file_component_servo_v1_servo_proto_depIdxs = []int32{ 4, // 5: viam.component.servo.v1.ServoService.Stop:input_type -> viam.component.servo.v1.StopRequest 7, // 6: viam.component.servo.v1.ServoService.IsMoving:input_type -> viam.component.servo.v1.IsMovingRequest 10, // 7: viam.component.servo.v1.ServoService.DoCommand:input_type -> viam.common.v1.DoCommandRequest - 11, // 8: viam.component.servo.v1.ServoService.GetGeometries:input_type -> viam.common.v1.GetGeometriesRequest - 1, // 9: viam.component.servo.v1.ServoService.Move:output_type -> viam.component.servo.v1.MoveResponse - 3, // 10: viam.component.servo.v1.ServoService.GetPosition:output_type -> viam.component.servo.v1.GetPositionResponse - 5, // 11: viam.component.servo.v1.ServoService.Stop:output_type -> viam.component.servo.v1.StopResponse - 8, // 12: viam.component.servo.v1.ServoService.IsMoving:output_type -> viam.component.servo.v1.IsMovingResponse - 12, // 13: viam.component.servo.v1.ServoService.DoCommand:output_type -> viam.common.v1.DoCommandResponse - 13, // 14: viam.component.servo.v1.ServoService.GetGeometries:output_type -> viam.common.v1.GetGeometriesResponse - 9, // [9:15] is the sub-list for method output_type - 3, // [3:9] is the sub-list for method input_type + 11, // 8: viam.component.servo.v1.ServoService.GetStatus:input_type -> viam.common.v1.GetStatusRequest + 12, // 9: viam.component.servo.v1.ServoService.GetGeometries:input_type -> viam.common.v1.GetGeometriesRequest + 1, // 10: viam.component.servo.v1.ServoService.Move:output_type -> viam.component.servo.v1.MoveResponse + 3, // 11: viam.component.servo.v1.ServoService.GetPosition:output_type -> viam.component.servo.v1.GetPositionResponse + 5, // 12: viam.component.servo.v1.ServoService.Stop:output_type -> viam.component.servo.v1.StopResponse + 8, // 13: viam.component.servo.v1.ServoService.IsMoving:output_type -> viam.component.servo.v1.IsMovingResponse + 13, // 14: viam.component.servo.v1.ServoService.DoCommand:output_type -> viam.common.v1.DoCommandResponse + 14, // 15: viam.component.servo.v1.ServoService.GetStatus:output_type -> viam.common.v1.GetStatusResponse + 15, // 16: viam.component.servo.v1.ServoService.GetGeometries:output_type -> viam.common.v1.GetGeometriesResponse + 10, // [10:17] is the sub-list for method output_type + 3, // [3:10] is the sub-list for method input_type 3, // [3:3] is the sub-list for extension type_name 3, // [3:3] is the sub-list for extension extendee 0, // [0:3] is the sub-list for field type_name diff --git a/component/servo/v1/servo.pb.gw.go b/component/servo/v1/servo.pb.gw.go index 83fc78c365..8be1891641 100644 --- a/component/servo/v1/servo.pb.gw.go +++ b/component/servo/v1/servo.pb.gw.go @@ -364,6 +364,58 @@ func local_request_ServoService_DoCommand_0(ctx context.Context, marshaler runti } +func request_ServoService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, client ServoServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_ServoService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, server ServoServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetStatus(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_ServoService_GetGeometries_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) @@ -565,6 +617,31 @@ func RegisterServoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu }) + mux.Handle("GET", pattern_ServoService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.servo.v1.ServoService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/component/servo/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ServoService_GetStatus_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_ServoService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_ServoService_GetGeometries_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -741,6 +818,28 @@ func RegisterServoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu }) + mux.Handle("GET", pattern_ServoService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.servo.v1.ServoService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/component/servo/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ServoService_GetStatus_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_ServoService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_ServoService_GetGeometries_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -777,6 +876,8 @@ var ( pattern_ServoService_DoCommand_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "servo", "name", "do_command"}, "")) + pattern_ServoService_GetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "servo", "name", "get_status"}, "")) + pattern_ServoService_GetGeometries_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "servo", "name", "geometries"}, "")) ) @@ -791,5 +892,7 @@ var ( forward_ServoService_DoCommand_0 = runtime.ForwardResponseMessage + forward_ServoService_GetStatus_0 = runtime.ForwardResponseMessage + forward_ServoService_GetGeometries_0 = runtime.ForwardResponseMessage ) diff --git a/component/servo/v1/servo_grpc.pb.go b/component/servo/v1/servo_grpc.pb.go index 4d24f7e01d..297cfe48a6 100644 --- a/component/servo/v1/servo_grpc.pb.go +++ b/component/servo/v1/servo_grpc.pb.go @@ -34,6 +34,8 @@ type ServoServiceClient interface { IsMoving(ctx context.Context, in *IsMovingRequest, opts ...grpc.CallOption) (*IsMovingResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(ctx context.Context, in *v1.DoCommandRequest, opts ...grpc.CallOption) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) // GetGeometries returns the geometries of the component in their current configuration GetGeometries(ctx context.Context, in *v1.GetGeometriesRequest, opts ...grpc.CallOption) (*v1.GetGeometriesResponse, error) } @@ -91,6 +93,15 @@ func (c *servoServiceClient) DoCommand(ctx context.Context, in *v1.DoCommandRequ return out, nil } +func (c *servoServiceClient) GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) { + out := new(v1.GetStatusResponse) + err := c.cc.Invoke(ctx, "/viam.component.servo.v1.ServoService/GetStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *servoServiceClient) GetGeometries(ctx context.Context, in *v1.GetGeometriesRequest, opts ...grpc.CallOption) (*v1.GetGeometriesResponse, error) { out := new(v1.GetGeometriesResponse) err := c.cc.Invoke(ctx, "/viam.component.servo.v1.ServoService/GetGeometries", in, out, opts...) @@ -115,6 +126,8 @@ type ServoServiceServer interface { IsMoving(context.Context, *IsMovingRequest) (*IsMovingResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) // GetGeometries returns the geometries of the component in their current configuration GetGeometries(context.Context, *v1.GetGeometriesRequest) (*v1.GetGeometriesResponse, error) mustEmbedUnimplementedServoServiceServer() @@ -139,6 +152,9 @@ func (UnimplementedServoServiceServer) IsMoving(context.Context, *IsMovingReques func (UnimplementedServoServiceServer) DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DoCommand not implemented") } +func (UnimplementedServoServiceServer) GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented") +} func (UnimplementedServoServiceServer) GetGeometries(context.Context, *v1.GetGeometriesRequest) (*v1.GetGeometriesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetGeometries not implemented") } @@ -245,6 +261,24 @@ func _ServoService_DoCommand_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } +func _ServoService_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServoServiceServer).GetStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.servo.v1.ServoService/GetStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServoServiceServer).GetStatus(ctx, req.(*v1.GetStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _ServoService_GetGeometries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(v1.GetGeometriesRequest) if err := dec(in); err != nil { @@ -290,6 +324,10 @@ var ServoService_ServiceDesc = grpc.ServiceDesc{ MethodName: "DoCommand", Handler: _ServoService_DoCommand_Handler, }, + { + MethodName: "GetStatus", + Handler: _ServoService_GetStatus_Handler, + }, { MethodName: "GetGeometries", Handler: _ServoService_GetGeometries_Handler, diff --git a/component/switch/v1/switch.pb.go b/component/switch/v1/switch.pb.go index 660238eaa3..67235eccea 100644 --- a/component/switch/v1/switch.pb.go +++ b/component/switch/v1/switch.pb.go @@ -366,7 +366,7 @@ var file_component_switch_v1_switch_proto_rawDesc = []byte{ 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4f, 0x66, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, - 0x6c, 0x73, 0x32, 0xbd, 0x05, 0x0a, 0x0d, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x53, 0x65, 0x72, + 0x6c, 0x73, 0x32, 0xc9, 0x06, 0x0a, 0x0d, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa9, 0x01, 0x0a, 0x0b, 0x53, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, @@ -410,11 +410,20 @@ var file_component_switch_v1_switch_proto_rawDesc = []byte{ 0x31, 0x22, 0x2f, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x64, 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, - 0x6e, 0x64, 0x42, 0x43, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, - 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x2e, - 0x76, 0x31, 0x5a, 0x23, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x73, 0x77, - 0x69, 0x74, 0x63, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x64, 0x12, 0x89, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x20, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, + 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, + 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x2f, 0x7b, 0x6e, 0x61, + 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x43, + 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x5a, 0x23, + 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, + 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -439,25 +448,29 @@ var file_component_switch_v1_switch_proto_goTypes = []any{ (*GetNumberOfPositionsResponse)(nil), // 5: viam.component.switch.v1.GetNumberOfPositionsResponse (*structpb.Struct)(nil), // 6: google.protobuf.Struct (*v1.DoCommandRequest)(nil), // 7: viam.common.v1.DoCommandRequest - (*v1.DoCommandResponse)(nil), // 8: viam.common.v1.DoCommandResponse + (*v1.GetStatusRequest)(nil), // 8: viam.common.v1.GetStatusRequest + (*v1.DoCommandResponse)(nil), // 9: viam.common.v1.DoCommandResponse + (*v1.GetStatusResponse)(nil), // 10: viam.common.v1.GetStatusResponse } var file_component_switch_v1_switch_proto_depIdxs = []int32{ - 6, // 0: viam.component.switch.v1.SetPositionRequest.extra:type_name -> google.protobuf.Struct - 6, // 1: viam.component.switch.v1.GetPositionRequest.extra:type_name -> google.protobuf.Struct - 6, // 2: viam.component.switch.v1.GetNumberOfPositionsRequest.extra:type_name -> google.protobuf.Struct - 0, // 3: viam.component.switch.v1.SwitchService.SetPosition:input_type -> viam.component.switch.v1.SetPositionRequest - 2, // 4: viam.component.switch.v1.SwitchService.GetPosition:input_type -> viam.component.switch.v1.GetPositionRequest - 4, // 5: viam.component.switch.v1.SwitchService.GetNumberOfPositions:input_type -> viam.component.switch.v1.GetNumberOfPositionsRequest - 7, // 6: viam.component.switch.v1.SwitchService.DoCommand:input_type -> viam.common.v1.DoCommandRequest - 1, // 7: viam.component.switch.v1.SwitchService.SetPosition:output_type -> viam.component.switch.v1.SetPositionResponse - 3, // 8: viam.component.switch.v1.SwitchService.GetPosition:output_type -> viam.component.switch.v1.GetPositionResponse - 5, // 9: viam.component.switch.v1.SwitchService.GetNumberOfPositions:output_type -> viam.component.switch.v1.GetNumberOfPositionsResponse - 8, // 10: viam.component.switch.v1.SwitchService.DoCommand:output_type -> viam.common.v1.DoCommandResponse - 7, // [7:11] is the sub-list for method output_type - 3, // [3:7] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 6, // 0: viam.component.switch.v1.SetPositionRequest.extra:type_name -> google.protobuf.Struct + 6, // 1: viam.component.switch.v1.GetPositionRequest.extra:type_name -> google.protobuf.Struct + 6, // 2: viam.component.switch.v1.GetNumberOfPositionsRequest.extra:type_name -> google.protobuf.Struct + 0, // 3: viam.component.switch.v1.SwitchService.SetPosition:input_type -> viam.component.switch.v1.SetPositionRequest + 2, // 4: viam.component.switch.v1.SwitchService.GetPosition:input_type -> viam.component.switch.v1.GetPositionRequest + 4, // 5: viam.component.switch.v1.SwitchService.GetNumberOfPositions:input_type -> viam.component.switch.v1.GetNumberOfPositionsRequest + 7, // 6: viam.component.switch.v1.SwitchService.DoCommand:input_type -> viam.common.v1.DoCommandRequest + 8, // 7: viam.component.switch.v1.SwitchService.GetStatus:input_type -> viam.common.v1.GetStatusRequest + 1, // 8: viam.component.switch.v1.SwitchService.SetPosition:output_type -> viam.component.switch.v1.SetPositionResponse + 3, // 9: viam.component.switch.v1.SwitchService.GetPosition:output_type -> viam.component.switch.v1.GetPositionResponse + 5, // 10: viam.component.switch.v1.SwitchService.GetNumberOfPositions:output_type -> viam.component.switch.v1.GetNumberOfPositionsResponse + 9, // 11: viam.component.switch.v1.SwitchService.DoCommand:output_type -> viam.common.v1.DoCommandResponse + 10, // 12: viam.component.switch.v1.SwitchService.GetStatus:output_type -> viam.common.v1.GetStatusResponse + 8, // [8:13] is the sub-list for method output_type + 3, // [3:8] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_component_switch_v1_switch_proto_init() } diff --git a/component/switch/v1/switch.pb.gw.go b/component/switch/v1/switch.pb.gw.go index 66ef0dba54..f4c45ca8fe 100644 --- a/component/switch/v1/switch.pb.gw.go +++ b/component/switch/v1/switch.pb.gw.go @@ -312,6 +312,58 @@ func local_request_SwitchService_DoCommand_0(ctx context.Context, marshaler runt } +func request_SwitchService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, client SwitchServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SwitchService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, server SwitchServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetStatus(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterSwitchServiceHandlerServer registers the http handlers for service SwitchService to "mux". // UnaryRPC :call SwitchServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -418,6 +470,31 @@ func RegisterSwitchServiceHandlerServer(ctx context.Context, mux *runtime.ServeM }) + mux.Handle("GET", pattern_SwitchService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.switch.v1.SwitchService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/component/switch/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SwitchService_GetStatus_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SwitchService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -547,6 +624,28 @@ func RegisterSwitchServiceHandlerClient(ctx context.Context, mux *runtime.ServeM }) + mux.Handle("GET", pattern_SwitchService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.switch.v1.SwitchService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/component/switch/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SwitchService_GetStatus_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SwitchService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -558,6 +657,8 @@ var ( pattern_SwitchService_GetNumberOfPositions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "switch", "name", "get_number_of_positions"}, "")) pattern_SwitchService_DoCommand_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "switch", "name", "do_command"}, "")) + + pattern_SwitchService_GetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "switch", "name", "get_status"}, "")) ) var ( @@ -568,4 +669,6 @@ var ( forward_SwitchService_GetNumberOfPositions_0 = runtime.ForwardResponseMessage forward_SwitchService_DoCommand_0 = runtime.ForwardResponseMessage + + forward_SwitchService_GetStatus_0 = runtime.ForwardResponseMessage ) diff --git a/component/switch/v1/switch_grpc.pb.go b/component/switch/v1/switch_grpc.pb.go index b2a54862dc..6d8cd699f7 100644 --- a/component/switch/v1/switch_grpc.pb.go +++ b/component/switch/v1/switch_grpc.pb.go @@ -31,6 +31,8 @@ type SwitchServiceClient interface { GetNumberOfPositions(ctx context.Context, in *GetNumberOfPositionsRequest, opts ...grpc.CallOption) (*GetNumberOfPositionsResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(ctx context.Context, in *v1.DoCommandRequest, opts ...grpc.CallOption) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) } type switchServiceClient struct { @@ -77,6 +79,15 @@ func (c *switchServiceClient) DoCommand(ctx context.Context, in *v1.DoCommandReq return out, nil } +func (c *switchServiceClient) GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) { + out := new(v1.GetStatusResponse) + err := c.cc.Invoke(ctx, "/viam.component.switch.v1.SwitchService/GetStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // SwitchServiceServer is the server API for SwitchService service. // All implementations must embed UnimplementedSwitchServiceServer // for forward compatibility @@ -89,6 +100,8 @@ type SwitchServiceServer interface { GetNumberOfPositions(context.Context, *GetNumberOfPositionsRequest) (*GetNumberOfPositionsResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) mustEmbedUnimplementedSwitchServiceServer() } @@ -108,6 +121,9 @@ func (UnimplementedSwitchServiceServer) GetNumberOfPositions(context.Context, *G func (UnimplementedSwitchServiceServer) DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DoCommand not implemented") } +func (UnimplementedSwitchServiceServer) GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented") +} func (UnimplementedSwitchServiceServer) mustEmbedUnimplementedSwitchServiceServer() {} // UnsafeSwitchServiceServer may be embedded to opt out of forward compatibility for this service. @@ -193,6 +209,24 @@ func _SwitchService_DoCommand_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _SwitchService_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SwitchServiceServer).GetStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.switch.v1.SwitchService/GetStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SwitchServiceServer).GetStatus(ctx, req.(*v1.GetStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + // SwitchService_ServiceDesc is the grpc.ServiceDesc for SwitchService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -216,6 +250,10 @@ var SwitchService_ServiceDesc = grpc.ServiceDesc{ MethodName: "DoCommand", Handler: _SwitchService_DoCommand_Handler, }, + { + MethodName: "GetStatus", + Handler: _SwitchService_GetStatus_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "component/switch/v1/switch.proto", diff --git a/gen/js/common/v1/common_pb.d.ts b/gen/js/common/v1/common_pb.d.ts index fa48ea6166..a39dbc9e89 100644 --- a/gen/js/common/v1/common_pb.d.ts +++ b/gen/js/common/v1/common_pb.d.ts @@ -666,6 +666,48 @@ export namespace DoCommandResponse { } } +export class GetStatusRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetStatusRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetStatusRequest): GetStatusRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetStatusRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetStatusRequest; + static deserializeBinaryFromReader(message: GetStatusRequest, reader: jspb.BinaryReader): GetStatusRequest; +} + +export namespace GetStatusRequest { + export type AsObject = { + name: string, + } +} + +export class GetStatusResponse extends jspb.Message { + hasResult(): boolean; + clearResult(): void; + getResult(): google_protobuf_struct_pb.Struct | undefined; + setResult(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetStatusResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetStatusResponse): GetStatusResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetStatusResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetStatusResponse; + static deserializeBinaryFromReader(message: GetStatusResponse, reader: jspb.BinaryReader): GetStatusResponse; +} + +export namespace GetStatusResponse { + export type AsObject = { + result?: google_protobuf_struct_pb.Struct.AsObject, + } +} + export class GetKinematicsRequest extends jspb.Message { getName(): string; setName(value: string): void; diff --git a/gen/js/common/v1/common_pb.js b/gen/js/common/v1/common_pb.js index fa80159b99..863ee10130 100644 --- a/gen/js/common/v1/common_pb.js +++ b/gen/js/common/v1/common_pb.js @@ -41,6 +41,8 @@ goog.exportSymbol('proto.viam.common.v1.GetPropertiesRequest', null, global); goog.exportSymbol('proto.viam.common.v1.GetPropertiesResponse', null, global); goog.exportSymbol('proto.viam.common.v1.GetReadingsRequest', null, global); goog.exportSymbol('proto.viam.common.v1.GetReadingsResponse', null, global); +goog.exportSymbol('proto.viam.common.v1.GetStatusRequest', null, global); +goog.exportSymbol('proto.viam.common.v1.GetStatusResponse', null, global); goog.exportSymbol('proto.viam.common.v1.KinematicsFileFormat', null, global); goog.exportSymbol('proto.viam.common.v1.LogEntry', null, global); goog.exportSymbol('proto.viam.common.v1.Mesh', null, global); @@ -520,6 +522,48 @@ if (goog.DEBUG && !COMPILED) { */ proto.viam.common.v1.DoCommandResponse.displayName = 'proto.viam.common.v1.DoCommandResponse'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.common.v1.GetStatusRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.common.v1.GetStatusRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.common.v1.GetStatusRequest.displayName = 'proto.viam.common.v1.GetStatusRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.common.v1.GetStatusResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.common.v1.GetStatusResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.common.v1.GetStatusResponse.displayName = 'proto.viam.common.v1.GetStatusResponse'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -5430,6 +5474,287 @@ proto.viam.common.v1.DoCommandResponse.prototype.hasResult = function() { +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.common.v1.GetStatusRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.common.v1.GetStatusRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.common.v1.GetStatusRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.common.v1.GetStatusRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.common.v1.GetStatusRequest} + */ +proto.viam.common.v1.GetStatusRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.common.v1.GetStatusRequest; + return proto.viam.common.v1.GetStatusRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.common.v1.GetStatusRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.common.v1.GetStatusRequest} + */ +proto.viam.common.v1.GetStatusRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.common.v1.GetStatusRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.common.v1.GetStatusRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.common.v1.GetStatusRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.common.v1.GetStatusRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.common.v1.GetStatusRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.common.v1.GetStatusRequest} returns this + */ +proto.viam.common.v1.GetStatusRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.common.v1.GetStatusResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.common.v1.GetStatusResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.common.v1.GetStatusResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.common.v1.GetStatusResponse.toObject = function(includeInstance, msg) { + var f, obj = { + result: (f = msg.getResult()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.common.v1.GetStatusResponse} + */ +proto.viam.common.v1.GetStatusResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.common.v1.GetStatusResponse; + return proto.viam.common.v1.GetStatusResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.common.v1.GetStatusResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.common.v1.GetStatusResponse} + */ +proto.viam.common.v1.GetStatusResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setResult(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.common.v1.GetStatusResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.common.v1.GetStatusResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.common.v1.GetStatusResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.common.v1.GetStatusResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getResult(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional google.protobuf.Struct result = 1; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.common.v1.GetStatusResponse.prototype.getResult = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.common.v1.GetStatusResponse} returns this +*/ +proto.viam.common.v1.GetStatusResponse.prototype.setResult = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.common.v1.GetStatusResponse} returns this + */ +proto.viam.common.v1.GetStatusResponse.prototype.clearResult = function() { + return this.setResult(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.common.v1.GetStatusResponse.prototype.hasResult = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. diff --git a/gen/js/component/arm/v1/arm_grpc_web_pb.js b/gen/js/component/arm/v1/arm_grpc_web_pb.js index 8ad2bf1c90..f6450da061 100644 --- a/gen/js/component/arm/v1/arm_grpc_web_pb.js +++ b/gen/js/component/arm/v1/arm_grpc_web_pb.js @@ -571,6 +571,67 @@ proto.viam.component.arm.v1.ArmServicePromiseClient.prototype.doCommand = }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.common.v1.GetStatusRequest, + * !proto.viam.common.v1.GetStatusResponse>} + */ +const methodDescriptor_ArmService_GetStatus = new grpc.web.MethodDescriptor( + '/viam.component.arm.v1.ArmService/GetStatus', + grpc.web.MethodType.UNARY, + common_v1_common_pb.GetStatusRequest, + common_v1_common_pb.GetStatusResponse, + /** + * @param {!proto.viam.common.v1.GetStatusRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + common_v1_common_pb.GetStatusResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.common.v1.GetStatusResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.arm.v1.ArmServiceClient.prototype.getStatus = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.arm.v1.ArmService/GetStatus', + request, + metadata || {}, + methodDescriptor_ArmService_GetStatus, + callback); +}; + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.arm.v1.ArmServicePromiseClient.prototype.getStatus = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.arm.v1.ArmService/GetStatus', + request, + metadata || {}, + methodDescriptor_ArmService_GetStatus); +}; + + /** * @const * @type {!grpc.web.MethodDescriptor< diff --git a/gen/js/component/arm/v1/arm_pb_service.d.ts b/gen/js/component/arm/v1/arm_pb_service.d.ts index 7e66b5aabe..dce4fb2129 100644 --- a/gen/js/component/arm/v1/arm_pb_service.d.ts +++ b/gen/js/component/arm/v1/arm_pb_service.d.ts @@ -77,6 +77,15 @@ type ArmServiceDoCommand = { readonly responseType: typeof common_v1_common_pb.DoCommandResponse; }; +type ArmServiceGetStatus = { + readonly methodName: string; + readonly service: typeof ArmService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof common_v1_common_pb.GetStatusRequest; + readonly responseType: typeof common_v1_common_pb.GetStatusResponse; +}; + type ArmServiceGetKinematics = { readonly methodName: string; readonly service: typeof ArmService; @@ -114,6 +123,7 @@ export class ArmService { static readonly Stop: ArmServiceStop; static readonly IsMoving: ArmServiceIsMoving; static readonly DoCommand: ArmServiceDoCommand; + static readonly GetStatus: ArmServiceGetStatus; static readonly GetKinematics: ArmServiceGetKinematics; static readonly GetGeometries: ArmServiceGetGeometries; static readonly Get3DModels: ArmServiceGet3DModels; @@ -223,6 +233,15 @@ export class ArmServiceClient { requestMessage: common_v1_common_pb.DoCommandRequest, callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.DoCommandResponse|null) => void ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; getKinematics( requestMessage: common_v1_common_pb.GetKinematicsRequest, metadata: grpc.Metadata, diff --git a/gen/js/component/arm/v1/arm_pb_service.js b/gen/js/component/arm/v1/arm_pb_service.js index b64f9b26cd..aab43d20e8 100644 --- a/gen/js/component/arm/v1/arm_pb_service.js +++ b/gen/js/component/arm/v1/arm_pb_service.js @@ -83,6 +83,15 @@ ArmService.DoCommand = { responseType: common_v1_common_pb.DoCommandResponse }; +ArmService.GetStatus = { + methodName: "GetStatus", + service: ArmService, + requestStream: false, + responseStream: false, + requestType: common_v1_common_pb.GetStatusRequest, + responseType: common_v1_common_pb.GetStatusResponse +}; + ArmService.GetKinematics = { methodName: "GetKinematics", service: ArmService, @@ -365,6 +374,37 @@ ArmServiceClient.prototype.doCommand = function doCommand(requestMessage, metada }; }; +ArmServiceClient.prototype.getStatus = function getStatus(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(ArmService.GetStatus, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + ArmServiceClient.prototype.getKinematics = function getKinematics(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; diff --git a/gen/js/component/audioin/v1/audioin_grpc_web_pb.js b/gen/js/component/audioin/v1/audioin_grpc_web_pb.js index ac3a3ec897..964c2f5ad3 100644 --- a/gen/js/component/audioin/v1/audioin_grpc_web_pb.js +++ b/gen/js/component/audioin/v1/audioin_grpc_web_pb.js @@ -261,6 +261,67 @@ proto.viam.component.audioin.v1.AudioInServicePromiseClient.prototype.doCommand }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.common.v1.GetStatusRequest, + * !proto.viam.common.v1.GetStatusResponse>} + */ +const methodDescriptor_AudioInService_GetStatus = new grpc.web.MethodDescriptor( + '/viam.component.audioin.v1.AudioInService/GetStatus', + grpc.web.MethodType.UNARY, + common_v1_common_pb.GetStatusRequest, + common_v1_common_pb.GetStatusResponse, + /** + * @param {!proto.viam.common.v1.GetStatusRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + common_v1_common_pb.GetStatusResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.common.v1.GetStatusResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.audioin.v1.AudioInServiceClient.prototype.getStatus = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.audioin.v1.AudioInService/GetStatus', + request, + metadata || {}, + methodDescriptor_AudioInService_GetStatus, + callback); +}; + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.audioin.v1.AudioInServicePromiseClient.prototype.getStatus = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.audioin.v1.AudioInService/GetStatus', + request, + metadata || {}, + methodDescriptor_AudioInService_GetStatus); +}; + + /** * @const * @type {!grpc.web.MethodDescriptor< diff --git a/gen/js/component/audioin/v1/audioin_pb_service.d.ts b/gen/js/component/audioin/v1/audioin_pb_service.d.ts index 7e3c81b676..4380e5e84e 100644 --- a/gen/js/component/audioin/v1/audioin_pb_service.d.ts +++ b/gen/js/component/audioin/v1/audioin_pb_service.d.ts @@ -32,6 +32,15 @@ type AudioInServiceDoCommand = { readonly responseType: typeof common_v1_common_pb.DoCommandResponse; }; +type AudioInServiceGetStatus = { + readonly methodName: string; + readonly service: typeof AudioInService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof common_v1_common_pb.GetStatusRequest; + readonly responseType: typeof common_v1_common_pb.GetStatusResponse; +}; + type AudioInServiceGetGeometries = { readonly methodName: string; readonly service: typeof AudioInService; @@ -46,6 +55,7 @@ export class AudioInService { static readonly GetAudio: AudioInServiceGetAudio; static readonly GetProperties: AudioInServiceGetProperties; static readonly DoCommand: AudioInServiceDoCommand; + static readonly GetStatus: AudioInServiceGetStatus; static readonly GetGeometries: AudioInServiceGetGeometries; } @@ -100,6 +110,15 @@ export class AudioInServiceClient { requestMessage: common_v1_common_pb.DoCommandRequest, callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.DoCommandResponse|null) => void ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; getGeometries( requestMessage: common_v1_common_pb.GetGeometriesRequest, metadata: grpc.Metadata, diff --git a/gen/js/component/audioin/v1/audioin_pb_service.js b/gen/js/component/audioin/v1/audioin_pb_service.js index 014bb6b9f9..6e6b78d9f4 100644 --- a/gen/js/component/audioin/v1/audioin_pb_service.js +++ b/gen/js/component/audioin/v1/audioin_pb_service.js @@ -38,6 +38,15 @@ AudioInService.DoCommand = { responseType: common_v1_common_pb.DoCommandResponse }; +AudioInService.GetStatus = { + methodName: "GetStatus", + service: AudioInService, + requestStream: false, + responseStream: false, + requestType: common_v1_common_pb.GetStatusRequest, + responseType: common_v1_common_pb.GetStatusResponse +}; + AudioInService.GetGeometries = { methodName: "GetGeometries", service: AudioInService, @@ -155,6 +164,37 @@ AudioInServiceClient.prototype.doCommand = function doCommand(requestMessage, me }; }; +AudioInServiceClient.prototype.getStatus = function getStatus(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(AudioInService.GetStatus, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + AudioInServiceClient.prototype.getGeometries = function getGeometries(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; diff --git a/gen/js/component/audioout/v1/audioout_grpc_web_pb.js b/gen/js/component/audioout/v1/audioout_grpc_web_pb.js index ea95466342..4e46151c6f 100644 --- a/gen/js/component/audioout/v1/audioout_grpc_web_pb.js +++ b/gen/js/component/audioout/v1/audioout_grpc_web_pb.js @@ -266,6 +266,67 @@ proto.viam.component.audioout.v1.AudioOutServicePromiseClient.prototype.doComman }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.common.v1.GetStatusRequest, + * !proto.viam.common.v1.GetStatusResponse>} + */ +const methodDescriptor_AudioOutService_GetStatus = new grpc.web.MethodDescriptor( + '/viam.component.audioout.v1.AudioOutService/GetStatus', + grpc.web.MethodType.UNARY, + common_v1_common_pb.GetStatusRequest, + common_v1_common_pb.GetStatusResponse, + /** + * @param {!proto.viam.common.v1.GetStatusRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + common_v1_common_pb.GetStatusResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.common.v1.GetStatusResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.audioout.v1.AudioOutServiceClient.prototype.getStatus = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.audioout.v1.AudioOutService/GetStatus', + request, + metadata || {}, + methodDescriptor_AudioOutService_GetStatus, + callback); +}; + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.audioout.v1.AudioOutServicePromiseClient.prototype.getStatus = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.audioout.v1.AudioOutService/GetStatus', + request, + metadata || {}, + methodDescriptor_AudioOutService_GetStatus); +}; + + /** * @const * @type {!grpc.web.MethodDescriptor< diff --git a/gen/js/component/audioout/v1/audioout_pb_service.d.ts b/gen/js/component/audioout/v1/audioout_pb_service.d.ts index fec7e6a1e4..4ab9a71d77 100644 --- a/gen/js/component/audioout/v1/audioout_pb_service.d.ts +++ b/gen/js/component/audioout/v1/audioout_pb_service.d.ts @@ -32,6 +32,15 @@ type AudioOutServiceDoCommand = { readonly responseType: typeof common_v1_common_pb.DoCommandResponse; }; +type AudioOutServiceGetStatus = { + readonly methodName: string; + readonly service: typeof AudioOutService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof common_v1_common_pb.GetStatusRequest; + readonly responseType: typeof common_v1_common_pb.GetStatusResponse; +}; + type AudioOutServiceGetGeometries = { readonly methodName: string; readonly service: typeof AudioOutService; @@ -46,6 +55,7 @@ export class AudioOutService { static readonly Play: AudioOutServicePlay; static readonly GetProperties: AudioOutServiceGetProperties; static readonly DoCommand: AudioOutServiceDoCommand; + static readonly GetStatus: AudioOutServiceGetStatus; static readonly GetGeometries: AudioOutServiceGetGeometries; } @@ -108,6 +118,15 @@ export class AudioOutServiceClient { requestMessage: common_v1_common_pb.DoCommandRequest, callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.DoCommandResponse|null) => void ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; getGeometries( requestMessage: common_v1_common_pb.GetGeometriesRequest, metadata: grpc.Metadata, diff --git a/gen/js/component/audioout/v1/audioout_pb_service.js b/gen/js/component/audioout/v1/audioout_pb_service.js index cd161edd67..5292264852 100644 --- a/gen/js/component/audioout/v1/audioout_pb_service.js +++ b/gen/js/component/audioout/v1/audioout_pb_service.js @@ -38,6 +38,15 @@ AudioOutService.DoCommand = { responseType: common_v1_common_pb.DoCommandResponse }; +AudioOutService.GetStatus = { + methodName: "GetStatus", + service: AudioOutService, + requestStream: false, + responseStream: false, + requestType: common_v1_common_pb.GetStatusRequest, + responseType: common_v1_common_pb.GetStatusResponse +}; + AudioOutService.GetGeometries = { methodName: "GetGeometries", service: AudioOutService, @@ -147,6 +156,37 @@ AudioOutServiceClient.prototype.doCommand = function doCommand(requestMessage, m }; }; +AudioOutServiceClient.prototype.getStatus = function getStatus(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(AudioOutService.GetStatus, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + AudioOutServiceClient.prototype.getGeometries = function getGeometries(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; diff --git a/gen/js/component/base/v1/base_grpc_web_pb.js b/gen/js/component/base/v1/base_grpc_web_pb.js index 78efa236c1..dbc9382f37 100644 --- a/gen/js/component/base/v1/base_grpc_web_pb.js +++ b/gen/js/component/base/v1/base_grpc_web_pb.js @@ -510,6 +510,67 @@ proto.viam.component.base.v1.BaseServicePromiseClient.prototype.doCommand = }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.common.v1.GetStatusRequest, + * !proto.viam.common.v1.GetStatusResponse>} + */ +const methodDescriptor_BaseService_GetStatus = new grpc.web.MethodDescriptor( + '/viam.component.base.v1.BaseService/GetStatus', + grpc.web.MethodType.UNARY, + common_v1_common_pb.GetStatusRequest, + common_v1_common_pb.GetStatusResponse, + /** + * @param {!proto.viam.common.v1.GetStatusRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + common_v1_common_pb.GetStatusResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.common.v1.GetStatusResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.base.v1.BaseServiceClient.prototype.getStatus = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.base.v1.BaseService/GetStatus', + request, + metadata || {}, + methodDescriptor_BaseService_GetStatus, + callback); +}; + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.base.v1.BaseServicePromiseClient.prototype.getStatus = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.base.v1.BaseService/GetStatus', + request, + metadata || {}, + methodDescriptor_BaseService_GetStatus); +}; + + /** * @const * @type {!grpc.web.MethodDescriptor< diff --git a/gen/js/component/base/v1/base_pb_service.d.ts b/gen/js/component/base/v1/base_pb_service.d.ts index fb86a12b86..3374237994 100644 --- a/gen/js/component/base/v1/base_pb_service.d.ts +++ b/gen/js/component/base/v1/base_pb_service.d.ts @@ -68,6 +68,15 @@ type BaseServiceDoCommand = { readonly responseType: typeof common_v1_common_pb.DoCommandResponse; }; +type BaseServiceGetStatus = { + readonly methodName: string; + readonly service: typeof BaseService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof common_v1_common_pb.GetStatusRequest; + readonly responseType: typeof common_v1_common_pb.GetStatusResponse; +}; + type BaseServiceGetGeometries = { readonly methodName: string; readonly service: typeof BaseService; @@ -95,6 +104,7 @@ export class BaseService { static readonly Stop: BaseServiceStop; static readonly IsMoving: BaseServiceIsMoving; static readonly DoCommand: BaseServiceDoCommand; + static readonly GetStatus: BaseServiceGetStatus; static readonly GetGeometries: BaseServiceGetGeometries; static readonly GetProperties: BaseServiceGetProperties; } @@ -194,6 +204,15 @@ export class BaseServiceClient { requestMessage: common_v1_common_pb.DoCommandRequest, callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.DoCommandResponse|null) => void ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; getGeometries( requestMessage: common_v1_common_pb.GetGeometriesRequest, metadata: grpc.Metadata, diff --git a/gen/js/component/base/v1/base_pb_service.js b/gen/js/component/base/v1/base_pb_service.js index 2c2e076d04..a6f44c79a6 100644 --- a/gen/js/component/base/v1/base_pb_service.js +++ b/gen/js/component/base/v1/base_pb_service.js @@ -74,6 +74,15 @@ BaseService.DoCommand = { responseType: common_v1_common_pb.DoCommandResponse }; +BaseService.GetStatus = { + methodName: "GetStatus", + service: BaseService, + requestStream: false, + responseStream: false, + requestType: common_v1_common_pb.GetStatusRequest, + responseType: common_v1_common_pb.GetStatusResponse +}; + BaseService.GetGeometries = { methodName: "GetGeometries", service: BaseService, @@ -316,6 +325,37 @@ BaseServiceClient.prototype.doCommand = function doCommand(requestMessage, metad }; }; +BaseServiceClient.prototype.getStatus = function getStatus(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(BaseService.GetStatus, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + BaseServiceClient.prototype.getGeometries = function getGeometries(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; diff --git a/gen/js/component/board/v1/board_grpc_web_pb.js b/gen/js/component/board/v1/board_grpc_web_pb.js index a499fcceb8..cc0cb13938 100644 --- a/gen/js/component/board/v1/board_grpc_web_pb.js +++ b/gen/js/component/board/v1/board_grpc_web_pb.js @@ -512,6 +512,67 @@ proto.viam.component.board.v1.BoardServicePromiseClient.prototype.doCommand = }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.common.v1.GetStatusRequest, + * !proto.viam.common.v1.GetStatusResponse>} + */ +const methodDescriptor_BoardService_GetStatus = new grpc.web.MethodDescriptor( + '/viam.component.board.v1.BoardService/GetStatus', + grpc.web.MethodType.UNARY, + common_v1_common_pb.GetStatusRequest, + common_v1_common_pb.GetStatusResponse, + /** + * @param {!proto.viam.common.v1.GetStatusRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + common_v1_common_pb.GetStatusResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.common.v1.GetStatusResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.board.v1.BoardServiceClient.prototype.getStatus = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.board.v1.BoardService/GetStatus', + request, + metadata || {}, + methodDescriptor_BoardService_GetStatus, + callback); +}; + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.board.v1.BoardServicePromiseClient.prototype.getStatus = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.board.v1.BoardService/GetStatus', + request, + metadata || {}, + methodDescriptor_BoardService_GetStatus); +}; + + /** * @const * @type {!grpc.web.MethodDescriptor< diff --git a/gen/js/component/board/v1/board_pb_service.d.ts b/gen/js/component/board/v1/board_pb_service.d.ts index 19e3dbf133..fd800eaa5f 100644 --- a/gen/js/component/board/v1/board_pb_service.d.ts +++ b/gen/js/component/board/v1/board_pb_service.d.ts @@ -68,6 +68,15 @@ type BoardServiceDoCommand = { readonly responseType: typeof common_v1_common_pb.DoCommandResponse; }; +type BoardServiceGetStatus = { + readonly methodName: string; + readonly service: typeof BoardService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof common_v1_common_pb.GetStatusRequest; + readonly responseType: typeof common_v1_common_pb.GetStatusResponse; +}; + type BoardServiceReadAnalogReader = { readonly methodName: string; readonly service: typeof BoardService; @@ -131,6 +140,7 @@ export class BoardService { static readonly PWMFrequency: BoardServicePWMFrequency; static readonly SetPWMFrequency: BoardServiceSetPWMFrequency; static readonly DoCommand: BoardServiceDoCommand; + static readonly GetStatus: BoardServiceGetStatus; static readonly ReadAnalogReader: BoardServiceReadAnalogReader; static readonly WriteAnalog: BoardServiceWriteAnalog; static readonly GetDigitalInterruptValue: BoardServiceGetDigitalInterruptValue; @@ -234,6 +244,15 @@ export class BoardServiceClient { requestMessage: common_v1_common_pb.DoCommandRequest, callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.DoCommandResponse|null) => void ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; readAnalogReader( requestMessage: component_board_v1_board_pb.ReadAnalogReaderRequest, metadata: grpc.Metadata, diff --git a/gen/js/component/board/v1/board_pb_service.js b/gen/js/component/board/v1/board_pb_service.js index 383df9a1de..e59fd2bef5 100644 --- a/gen/js/component/board/v1/board_pb_service.js +++ b/gen/js/component/board/v1/board_pb_service.js @@ -74,6 +74,15 @@ BoardService.DoCommand = { responseType: common_v1_common_pb.DoCommandResponse }; +BoardService.GetStatus = { + methodName: "GetStatus", + service: BoardService, + requestStream: false, + responseStream: false, + requestType: common_v1_common_pb.GetStatusRequest, + responseType: common_v1_common_pb.GetStatusResponse +}; + BoardService.ReadAnalogReader = { methodName: "ReadAnalogReader", service: BoardService, @@ -352,6 +361,37 @@ BoardServiceClient.prototype.doCommand = function doCommand(requestMessage, meta }; }; +BoardServiceClient.prototype.getStatus = function getStatus(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(BoardService.GetStatus, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + BoardServiceClient.prototype.readAnalogReader = function readAnalogReader(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; diff --git a/gen/js/component/button/v1/button_grpc_web_pb.js b/gen/js/component/button/v1/button_grpc_web_pb.js index 558f0cc6e6..7a42c271aa 100644 --- a/gen/js/component/button/v1/button_grpc_web_pb.js +++ b/gen/js/component/button/v1/button_grpc_web_pb.js @@ -205,5 +205,66 @@ proto.viam.component.button.v1.ButtonServicePromiseClient.prototype.doCommand = }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.common.v1.GetStatusRequest, + * !proto.viam.common.v1.GetStatusResponse>} + */ +const methodDescriptor_ButtonService_GetStatus = new grpc.web.MethodDescriptor( + '/viam.component.button.v1.ButtonService/GetStatus', + grpc.web.MethodType.UNARY, + common_v1_common_pb.GetStatusRequest, + common_v1_common_pb.GetStatusResponse, + /** + * @param {!proto.viam.common.v1.GetStatusRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + common_v1_common_pb.GetStatusResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.common.v1.GetStatusResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.button.v1.ButtonServiceClient.prototype.getStatus = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.button.v1.ButtonService/GetStatus', + request, + metadata || {}, + methodDescriptor_ButtonService_GetStatus, + callback); +}; + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.button.v1.ButtonServicePromiseClient.prototype.getStatus = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.button.v1.ButtonService/GetStatus', + request, + metadata || {}, + methodDescriptor_ButtonService_GetStatus); +}; + + module.exports = proto.viam.component.button.v1; diff --git a/gen/js/component/button/v1/button_pb_service.d.ts b/gen/js/component/button/v1/button_pb_service.d.ts index 929274de56..2b001d3633 100644 --- a/gen/js/component/button/v1/button_pb_service.d.ts +++ b/gen/js/component/button/v1/button_pb_service.d.ts @@ -23,10 +23,20 @@ type ButtonServiceDoCommand = { readonly responseType: typeof common_v1_common_pb.DoCommandResponse; }; +type ButtonServiceGetStatus = { + readonly methodName: string; + readonly service: typeof ButtonService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof common_v1_common_pb.GetStatusRequest; + readonly responseType: typeof common_v1_common_pb.GetStatusResponse; +}; + export class ButtonService { static readonly serviceName: string; static readonly Push: ButtonServicePush; static readonly DoCommand: ButtonServiceDoCommand; + static readonly GetStatus: ButtonServiceGetStatus; } export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } @@ -79,5 +89,14 @@ export class ButtonServiceClient { requestMessage: common_v1_common_pb.DoCommandRequest, callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.DoCommandResponse|null) => void ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; } diff --git a/gen/js/component/button/v1/button_pb_service.js b/gen/js/component/button/v1/button_pb_service.js index 82b30a7756..9c6076469a 100644 --- a/gen/js/component/button/v1/button_pb_service.js +++ b/gen/js/component/button/v1/button_pb_service.js @@ -29,6 +29,15 @@ ButtonService.DoCommand = { responseType: common_v1_common_pb.DoCommandResponse }; +ButtonService.GetStatus = { + methodName: "GetStatus", + service: ButtonService, + requestStream: false, + responseStream: false, + requestType: common_v1_common_pb.GetStatusRequest, + responseType: common_v1_common_pb.GetStatusResponse +}; + exports.ButtonService = ButtonService; function ButtonServiceClient(serviceHost, options) { @@ -98,5 +107,36 @@ ButtonServiceClient.prototype.doCommand = function doCommand(requestMessage, met }; }; +ButtonServiceClient.prototype.getStatus = function getStatus(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(ButtonService.GetStatus, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + exports.ButtonServiceClient = ButtonServiceClient; diff --git a/gen/js/component/camera/v1/camera_grpc_web_pb.js b/gen/js/component/camera/v1/camera_grpc_web_pb.js index 8352acf403..e400c820ac 100644 --- a/gen/js/component/camera/v1/camera_grpc_web_pb.js +++ b/gen/js/component/camera/v1/camera_grpc_web_pb.js @@ -453,6 +453,67 @@ proto.viam.component.camera.v1.CameraServicePromiseClient.prototype.doCommand = }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.common.v1.GetStatusRequest, + * !proto.viam.common.v1.GetStatusResponse>} + */ +const methodDescriptor_CameraService_GetStatus = new grpc.web.MethodDescriptor( + '/viam.component.camera.v1.CameraService/GetStatus', + grpc.web.MethodType.UNARY, + common_v1_common_pb.GetStatusRequest, + common_v1_common_pb.GetStatusResponse, + /** + * @param {!proto.viam.common.v1.GetStatusRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + common_v1_common_pb.GetStatusResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.common.v1.GetStatusResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.camera.v1.CameraServiceClient.prototype.getStatus = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.camera.v1.CameraService/GetStatus', + request, + metadata || {}, + methodDescriptor_CameraService_GetStatus, + callback); +}; + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.camera.v1.CameraServicePromiseClient.prototype.getStatus = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.camera.v1.CameraService/GetStatus', + request, + metadata || {}, + methodDescriptor_CameraService_GetStatus); +}; + + /** * @const * @type {!grpc.web.MethodDescriptor< diff --git a/gen/js/component/camera/v1/camera_pb_service.d.ts b/gen/js/component/camera/v1/camera_pb_service.d.ts index 788fbcdd6c..eb1eb5b027 100644 --- a/gen/js/component/camera/v1/camera_pb_service.d.ts +++ b/gen/js/component/camera/v1/camera_pb_service.d.ts @@ -60,6 +60,15 @@ type CameraServiceDoCommand = { readonly responseType: typeof common_v1_common_pb.DoCommandResponse; }; +type CameraServiceGetStatus = { + readonly methodName: string; + readonly service: typeof CameraService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof common_v1_common_pb.GetStatusRequest; + readonly responseType: typeof common_v1_common_pb.GetStatusResponse; +}; + type CameraServiceGetGeometries = { readonly methodName: string; readonly service: typeof CameraService; @@ -77,6 +86,7 @@ export class CameraService { static readonly GetPointCloud: CameraServiceGetPointCloud; static readonly GetProperties: CameraServiceGetProperties; static readonly DoCommand: CameraServiceDoCommand; + static readonly GetStatus: CameraServiceGetStatus; static readonly GetGeometries: CameraServiceGetGeometries; } @@ -166,6 +176,15 @@ export class CameraServiceClient { requestMessage: common_v1_common_pb.DoCommandRequest, callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.DoCommandResponse|null) => void ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; getGeometries( requestMessage: common_v1_common_pb.GetGeometriesRequest, metadata: grpc.Metadata, diff --git a/gen/js/component/camera/v1/camera_pb_service.js b/gen/js/component/camera/v1/camera_pb_service.js index a331a41803..55380e15ce 100644 --- a/gen/js/component/camera/v1/camera_pb_service.js +++ b/gen/js/component/camera/v1/camera_pb_service.js @@ -66,6 +66,15 @@ CameraService.DoCommand = { responseType: common_v1_common_pb.DoCommandResponse }; +CameraService.GetStatus = { + methodName: "GetStatus", + service: CameraService, + requestStream: false, + responseStream: false, + requestType: common_v1_common_pb.GetStatusRequest, + responseType: common_v1_common_pb.GetStatusResponse +}; + CameraService.GetGeometries = { methodName: "GetGeometries", service: CameraService, @@ -268,6 +277,37 @@ CameraServiceClient.prototype.doCommand = function doCommand(requestMessage, met }; }; +CameraServiceClient.prototype.getStatus = function getStatus(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(CameraService.GetStatus, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + CameraServiceClient.prototype.getGeometries = function getGeometries(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; diff --git a/gen/js/component/encoder/v1/encoder_grpc_web_pb.js b/gen/js/component/encoder/v1/encoder_grpc_web_pb.js index 6fef844136..422025b9a1 100644 --- a/gen/js/component/encoder/v1/encoder_grpc_web_pb.js +++ b/gen/js/component/encoder/v1/encoder_grpc_web_pb.js @@ -327,6 +327,67 @@ proto.viam.component.encoder.v1.EncoderServicePromiseClient.prototype.doCommand }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.common.v1.GetStatusRequest, + * !proto.viam.common.v1.GetStatusResponse>} + */ +const methodDescriptor_EncoderService_GetStatus = new grpc.web.MethodDescriptor( + '/viam.component.encoder.v1.EncoderService/GetStatus', + grpc.web.MethodType.UNARY, + common_v1_common_pb.GetStatusRequest, + common_v1_common_pb.GetStatusResponse, + /** + * @param {!proto.viam.common.v1.GetStatusRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + common_v1_common_pb.GetStatusResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.common.v1.GetStatusResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.encoder.v1.EncoderServiceClient.prototype.getStatus = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.encoder.v1.EncoderService/GetStatus', + request, + metadata || {}, + methodDescriptor_EncoderService_GetStatus, + callback); +}; + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.encoder.v1.EncoderServicePromiseClient.prototype.getStatus = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.encoder.v1.EncoderService/GetStatus', + request, + metadata || {}, + methodDescriptor_EncoderService_GetStatus); +}; + + /** * @const * @type {!grpc.web.MethodDescriptor< diff --git a/gen/js/component/encoder/v1/encoder_pb_service.d.ts b/gen/js/component/encoder/v1/encoder_pb_service.d.ts index 26b51c56e9..4d14cc68e8 100644 --- a/gen/js/component/encoder/v1/encoder_pb_service.d.ts +++ b/gen/js/component/encoder/v1/encoder_pb_service.d.ts @@ -41,6 +41,15 @@ type EncoderServiceDoCommand = { readonly responseType: typeof common_v1_common_pb.DoCommandResponse; }; +type EncoderServiceGetStatus = { + readonly methodName: string; + readonly service: typeof EncoderService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof common_v1_common_pb.GetStatusRequest; + readonly responseType: typeof common_v1_common_pb.GetStatusResponse; +}; + type EncoderServiceGetGeometries = { readonly methodName: string; readonly service: typeof EncoderService; @@ -56,6 +65,7 @@ export class EncoderService { static readonly ResetPosition: EncoderServiceResetPosition; static readonly GetProperties: EncoderServiceGetProperties; static readonly DoCommand: EncoderServiceDoCommand; + static readonly GetStatus: EncoderServiceGetStatus; static readonly GetGeometries: EncoderServiceGetGeometries; } @@ -127,6 +137,15 @@ export class EncoderServiceClient { requestMessage: common_v1_common_pb.DoCommandRequest, callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.DoCommandResponse|null) => void ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; getGeometries( requestMessage: common_v1_common_pb.GetGeometriesRequest, metadata: grpc.Metadata, diff --git a/gen/js/component/encoder/v1/encoder_pb_service.js b/gen/js/component/encoder/v1/encoder_pb_service.js index 75cfbbe484..116e93a8a8 100644 --- a/gen/js/component/encoder/v1/encoder_pb_service.js +++ b/gen/js/component/encoder/v1/encoder_pb_service.js @@ -47,6 +47,15 @@ EncoderService.DoCommand = { responseType: common_v1_common_pb.DoCommandResponse }; +EncoderService.GetStatus = { + methodName: "GetStatus", + service: EncoderService, + requestStream: false, + responseStream: false, + requestType: common_v1_common_pb.GetStatusRequest, + responseType: common_v1_common_pb.GetStatusResponse +}; + EncoderService.GetGeometries = { methodName: "GetGeometries", service: EncoderService, @@ -187,6 +196,37 @@ EncoderServiceClient.prototype.doCommand = function doCommand(requestMessage, me }; }; +EncoderServiceClient.prototype.getStatus = function getStatus(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(EncoderService.GetStatus, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + EncoderServiceClient.prototype.getGeometries = function getGeometries(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; diff --git a/gen/js/component/gantry/v1/gantry_grpc_web_pb.js b/gen/js/component/gantry/v1/gantry_grpc_web_pb.js index fc019c09ef..b839748b6d 100644 --- a/gen/js/component/gantry/v1/gantry_grpc_web_pb.js +++ b/gen/js/component/gantry/v1/gantry_grpc_web_pb.js @@ -510,6 +510,67 @@ proto.viam.component.gantry.v1.GantryServicePromiseClient.prototype.doCommand = }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.common.v1.GetStatusRequest, + * !proto.viam.common.v1.GetStatusResponse>} + */ +const methodDescriptor_GantryService_GetStatus = new grpc.web.MethodDescriptor( + '/viam.component.gantry.v1.GantryService/GetStatus', + grpc.web.MethodType.UNARY, + common_v1_common_pb.GetStatusRequest, + common_v1_common_pb.GetStatusResponse, + /** + * @param {!proto.viam.common.v1.GetStatusRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + common_v1_common_pb.GetStatusResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.common.v1.GetStatusResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.gantry.v1.GantryServiceClient.prototype.getStatus = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.gantry.v1.GantryService/GetStatus', + request, + metadata || {}, + methodDescriptor_GantryService_GetStatus, + callback); +}; + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.gantry.v1.GantryServicePromiseClient.prototype.getStatus = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.gantry.v1.GantryService/GetStatus', + request, + metadata || {}, + methodDescriptor_GantryService_GetStatus); +}; + + /** * @const * @type {!grpc.web.MethodDescriptor< diff --git a/gen/js/component/gantry/v1/gantry_pb_service.d.ts b/gen/js/component/gantry/v1/gantry_pb_service.d.ts index 09def3d519..b1dee8da38 100644 --- a/gen/js/component/gantry/v1/gantry_pb_service.d.ts +++ b/gen/js/component/gantry/v1/gantry_pb_service.d.ts @@ -68,6 +68,15 @@ type GantryServiceDoCommand = { readonly responseType: typeof common_v1_common_pb.DoCommandResponse; }; +type GantryServiceGetStatus = { + readonly methodName: string; + readonly service: typeof GantryService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof common_v1_common_pb.GetStatusRequest; + readonly responseType: typeof common_v1_common_pb.GetStatusResponse; +}; + type GantryServiceGetKinematics = { readonly methodName: string; readonly service: typeof GantryService; @@ -95,6 +104,7 @@ export class GantryService { static readonly Stop: GantryServiceStop; static readonly IsMoving: GantryServiceIsMoving; static readonly DoCommand: GantryServiceDoCommand; + static readonly GetStatus: GantryServiceGetStatus; static readonly GetKinematics: GantryServiceGetKinematics; static readonly GetGeometries: GantryServiceGetGeometries; } @@ -194,6 +204,15 @@ export class GantryServiceClient { requestMessage: common_v1_common_pb.DoCommandRequest, callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.DoCommandResponse|null) => void ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; getKinematics( requestMessage: common_v1_common_pb.GetKinematicsRequest, metadata: grpc.Metadata, diff --git a/gen/js/component/gantry/v1/gantry_pb_service.js b/gen/js/component/gantry/v1/gantry_pb_service.js index 5c72488099..1176d47ae3 100644 --- a/gen/js/component/gantry/v1/gantry_pb_service.js +++ b/gen/js/component/gantry/v1/gantry_pb_service.js @@ -74,6 +74,15 @@ GantryService.DoCommand = { responseType: common_v1_common_pb.DoCommandResponse }; +GantryService.GetStatus = { + methodName: "GetStatus", + service: GantryService, + requestStream: false, + responseStream: false, + requestType: common_v1_common_pb.GetStatusRequest, + responseType: common_v1_common_pb.GetStatusResponse +}; + GantryService.GetKinematics = { methodName: "GetKinematics", service: GantryService, @@ -316,6 +325,37 @@ GantryServiceClient.prototype.doCommand = function doCommand(requestMessage, met }; }; +GantryServiceClient.prototype.getStatus = function getStatus(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(GantryService.GetStatus, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + GantryServiceClient.prototype.getKinematics = function getKinematics(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; diff --git a/gen/js/component/generic/v1/generic_grpc_web_pb.js b/gen/js/component/generic/v1/generic_grpc_web_pb.js index 1ccdcd4837..71d39214c2 100644 --- a/gen/js/component/generic/v1/generic_grpc_web_pb.js +++ b/gen/js/component/generic/v1/generic_grpc_web_pb.js @@ -142,6 +142,67 @@ proto.viam.component.generic.v1.GenericServicePromiseClient.prototype.doCommand }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.common.v1.GetStatusRequest, + * !proto.viam.common.v1.GetStatusResponse>} + */ +const methodDescriptor_GenericService_GetStatus = new grpc.web.MethodDescriptor( + '/viam.component.generic.v1.GenericService/GetStatus', + grpc.web.MethodType.UNARY, + common_v1_common_pb.GetStatusRequest, + common_v1_common_pb.GetStatusResponse, + /** + * @param {!proto.viam.common.v1.GetStatusRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + common_v1_common_pb.GetStatusResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.common.v1.GetStatusResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.generic.v1.GenericServiceClient.prototype.getStatus = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.generic.v1.GenericService/GetStatus', + request, + metadata || {}, + methodDescriptor_GenericService_GetStatus, + callback); +}; + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.generic.v1.GenericServicePromiseClient.prototype.getStatus = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.generic.v1.GenericService/GetStatus', + request, + metadata || {}, + methodDescriptor_GenericService_GetStatus); +}; + + /** * @const * @type {!grpc.web.MethodDescriptor< diff --git a/gen/js/component/generic/v1/generic_pb_service.d.ts b/gen/js/component/generic/v1/generic_pb_service.d.ts index cde746dfee..dac9a2cf22 100644 --- a/gen/js/component/generic/v1/generic_pb_service.d.ts +++ b/gen/js/component/generic/v1/generic_pb_service.d.ts @@ -14,6 +14,15 @@ type GenericServiceDoCommand = { readonly responseType: typeof common_v1_common_pb.DoCommandResponse; }; +type GenericServiceGetStatus = { + readonly methodName: string; + readonly service: typeof GenericService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof common_v1_common_pb.GetStatusRequest; + readonly responseType: typeof common_v1_common_pb.GetStatusResponse; +}; + type GenericServiceGetGeometries = { readonly methodName: string; readonly service: typeof GenericService; @@ -26,6 +35,7 @@ type GenericServiceGetGeometries = { export class GenericService { static readonly serviceName: string; static readonly DoCommand: GenericServiceDoCommand; + static readonly GetStatus: GenericServiceGetStatus; static readonly GetGeometries: GenericServiceGetGeometries; } @@ -70,6 +80,15 @@ export class GenericServiceClient { requestMessage: common_v1_common_pb.DoCommandRequest, callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.DoCommandResponse|null) => void ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; getGeometries( requestMessage: common_v1_common_pb.GetGeometriesRequest, metadata: grpc.Metadata, diff --git a/gen/js/component/generic/v1/generic_pb_service.js b/gen/js/component/generic/v1/generic_pb_service.js index 262822beba..ccbf0ff433 100644 --- a/gen/js/component/generic/v1/generic_pb_service.js +++ b/gen/js/component/generic/v1/generic_pb_service.js @@ -20,6 +20,15 @@ GenericService.DoCommand = { responseType: common_v1_common_pb.DoCommandResponse }; +GenericService.GetStatus = { + methodName: "GetStatus", + service: GenericService, + requestStream: false, + responseStream: false, + requestType: common_v1_common_pb.GetStatusRequest, + responseType: common_v1_common_pb.GetStatusResponse +}; + GenericService.GetGeometries = { methodName: "GetGeometries", service: GenericService, @@ -67,6 +76,37 @@ GenericServiceClient.prototype.doCommand = function doCommand(requestMessage, me }; }; +GenericServiceClient.prototype.getStatus = function getStatus(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(GenericService.GetStatus, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + GenericServiceClient.prototype.getGeometries = function getGeometries(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; diff --git a/gen/js/component/gripper/v1/gripper_grpc_web_pb.js b/gen/js/component/gripper/v1/gripper_grpc_web_pb.js index 628fe3b832..a50e8a112d 100644 --- a/gen/js/component/gripper/v1/gripper_grpc_web_pb.js +++ b/gen/js/component/gripper/v1/gripper_grpc_web_pb.js @@ -449,6 +449,67 @@ proto.viam.component.gripper.v1.GripperServicePromiseClient.prototype.doCommand }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.common.v1.GetStatusRequest, + * !proto.viam.common.v1.GetStatusResponse>} + */ +const methodDescriptor_GripperService_GetStatus = new grpc.web.MethodDescriptor( + '/viam.component.gripper.v1.GripperService/GetStatus', + grpc.web.MethodType.UNARY, + common_v1_common_pb.GetStatusRequest, + common_v1_common_pb.GetStatusResponse, + /** + * @param {!proto.viam.common.v1.GetStatusRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + common_v1_common_pb.GetStatusResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.common.v1.GetStatusResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.gripper.v1.GripperServiceClient.prototype.getStatus = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.gripper.v1.GripperService/GetStatus', + request, + metadata || {}, + methodDescriptor_GripperService_GetStatus, + callback); +}; + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.gripper.v1.GripperServicePromiseClient.prototype.getStatus = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.gripper.v1.GripperService/GetStatus', + request, + metadata || {}, + methodDescriptor_GripperService_GetStatus); +}; + + /** * @const * @type {!grpc.web.MethodDescriptor< diff --git a/gen/js/component/gripper/v1/gripper_pb_service.d.ts b/gen/js/component/gripper/v1/gripper_pb_service.d.ts index ed61597f83..e829be9038 100644 --- a/gen/js/component/gripper/v1/gripper_pb_service.d.ts +++ b/gen/js/component/gripper/v1/gripper_pb_service.d.ts @@ -59,6 +59,15 @@ type GripperServiceDoCommand = { readonly responseType: typeof common_v1_common_pb.DoCommandResponse; }; +type GripperServiceGetStatus = { + readonly methodName: string; + readonly service: typeof GripperService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof common_v1_common_pb.GetStatusRequest; + readonly responseType: typeof common_v1_common_pb.GetStatusResponse; +}; + type GripperServiceGetGeometries = { readonly methodName: string; readonly service: typeof GripperService; @@ -85,6 +94,7 @@ export class GripperService { static readonly IsMoving: GripperServiceIsMoving; static readonly IsHoldingSomething: GripperServiceIsHoldingSomething; static readonly DoCommand: GripperServiceDoCommand; + static readonly GetStatus: GripperServiceGetStatus; static readonly GetGeometries: GripperServiceGetGeometries; static readonly GetKinematics: GripperServiceGetKinematics; } @@ -175,6 +185,15 @@ export class GripperServiceClient { requestMessage: common_v1_common_pb.DoCommandRequest, callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.DoCommandResponse|null) => void ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; getGeometries( requestMessage: common_v1_common_pb.GetGeometriesRequest, metadata: grpc.Metadata, diff --git a/gen/js/component/gripper/v1/gripper_pb_service.js b/gen/js/component/gripper/v1/gripper_pb_service.js index 7a58cddee4..22f42596b2 100644 --- a/gen/js/component/gripper/v1/gripper_pb_service.js +++ b/gen/js/component/gripper/v1/gripper_pb_service.js @@ -65,6 +65,15 @@ GripperService.DoCommand = { responseType: common_v1_common_pb.DoCommandResponse }; +GripperService.GetStatus = { + methodName: "GetStatus", + service: GripperService, + requestStream: false, + responseStream: false, + requestType: common_v1_common_pb.GetStatusRequest, + responseType: common_v1_common_pb.GetStatusResponse +}; + GripperService.GetGeometries = { methodName: "GetGeometries", service: GripperService, @@ -276,6 +285,37 @@ GripperServiceClient.prototype.doCommand = function doCommand(requestMessage, me }; }; +GripperServiceClient.prototype.getStatus = function getStatus(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(GripperService.GetStatus, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + GripperServiceClient.prototype.getGeometries = function getGeometries(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; diff --git a/gen/js/component/inputcontroller/v1/input_controller_grpc_web_pb.js b/gen/js/component/inputcontroller/v1/input_controller_grpc_web_pb.js index e04de0cbf7..4b28ec6395 100644 --- a/gen/js/component/inputcontroller/v1/input_controller_grpc_web_pb.js +++ b/gen/js/component/inputcontroller/v1/input_controller_grpc_web_pb.js @@ -385,6 +385,67 @@ proto.viam.component.inputcontroller.v1.InputControllerServicePromiseClient.prot }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.common.v1.GetStatusRequest, + * !proto.viam.common.v1.GetStatusResponse>} + */ +const methodDescriptor_InputControllerService_GetStatus = new grpc.web.MethodDescriptor( + '/viam.component.inputcontroller.v1.InputControllerService/GetStatus', + grpc.web.MethodType.UNARY, + common_v1_common_pb.GetStatusRequest, + common_v1_common_pb.GetStatusResponse, + /** + * @param {!proto.viam.common.v1.GetStatusRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + common_v1_common_pb.GetStatusResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.common.v1.GetStatusResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.inputcontroller.v1.InputControllerServiceClient.prototype.getStatus = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.inputcontroller.v1.InputControllerService/GetStatus', + request, + metadata || {}, + methodDescriptor_InputControllerService_GetStatus, + callback); +}; + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.inputcontroller.v1.InputControllerServicePromiseClient.prototype.getStatus = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.inputcontroller.v1.InputControllerService/GetStatus', + request, + metadata || {}, + methodDescriptor_InputControllerService_GetStatus); +}; + + /** * @const * @type {!grpc.web.MethodDescriptor< diff --git a/gen/js/component/inputcontroller/v1/input_controller_pb_service.d.ts b/gen/js/component/inputcontroller/v1/input_controller_pb_service.d.ts index 4dbd2f868e..f3a0059b53 100644 --- a/gen/js/component/inputcontroller/v1/input_controller_pb_service.d.ts +++ b/gen/js/component/inputcontroller/v1/input_controller_pb_service.d.ts @@ -50,6 +50,15 @@ type InputControllerServiceDoCommand = { readonly responseType: typeof common_v1_common_pb.DoCommandResponse; }; +type InputControllerServiceGetStatus = { + readonly methodName: string; + readonly service: typeof InputControllerService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof common_v1_common_pb.GetStatusRequest; + readonly responseType: typeof common_v1_common_pb.GetStatusResponse; +}; + type InputControllerServiceGetGeometries = { readonly methodName: string; readonly service: typeof InputControllerService; @@ -66,6 +75,7 @@ export class InputControllerService { static readonly StreamEvents: InputControllerServiceStreamEvents; static readonly TriggerEvent: InputControllerServiceTriggerEvent; static readonly DoCommand: InputControllerServiceDoCommand; + static readonly GetStatus: InputControllerServiceGetStatus; static readonly GetGeometries: InputControllerServiceGetGeometries; } @@ -138,6 +148,15 @@ export class InputControllerServiceClient { requestMessage: common_v1_common_pb.DoCommandRequest, callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.DoCommandResponse|null) => void ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; getGeometries( requestMessage: common_v1_common_pb.GetGeometriesRequest, metadata: grpc.Metadata, diff --git a/gen/js/component/inputcontroller/v1/input_controller_pb_service.js b/gen/js/component/inputcontroller/v1/input_controller_pb_service.js index 521ee76f15..941885f251 100644 --- a/gen/js/component/inputcontroller/v1/input_controller_pb_service.js +++ b/gen/js/component/inputcontroller/v1/input_controller_pb_service.js @@ -56,6 +56,15 @@ InputControllerService.DoCommand = { responseType: common_v1_common_pb.DoCommandResponse }; +InputControllerService.GetStatus = { + methodName: "GetStatus", + service: InputControllerService, + requestStream: false, + responseStream: false, + requestType: common_v1_common_pb.GetStatusRequest, + responseType: common_v1_common_pb.GetStatusResponse +}; + InputControllerService.GetGeometries = { methodName: "GetGeometries", service: InputControllerService, @@ -235,6 +244,37 @@ InputControllerServiceClient.prototype.doCommand = function doCommand(requestMes }; }; +InputControllerServiceClient.prototype.getStatus = function getStatus(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(InputControllerService.GetStatus, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + InputControllerServiceClient.prototype.getGeometries = function getGeometries(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; diff --git a/gen/js/component/motor/v1/motor_grpc_web_pb.js b/gen/js/component/motor/v1/motor_grpc_web_pb.js index 69c6dd15e6..6a6295dbc9 100644 --- a/gen/js/component/motor/v1/motor_grpc_web_pb.js +++ b/gen/js/component/motor/v1/motor_grpc_web_pb.js @@ -754,6 +754,67 @@ proto.viam.component.motor.v1.MotorServicePromiseClient.prototype.doCommand = }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.common.v1.GetStatusRequest, + * !proto.viam.common.v1.GetStatusResponse>} + */ +const methodDescriptor_MotorService_GetStatus = new grpc.web.MethodDescriptor( + '/viam.component.motor.v1.MotorService/GetStatus', + grpc.web.MethodType.UNARY, + common_v1_common_pb.GetStatusRequest, + common_v1_common_pb.GetStatusResponse, + /** + * @param {!proto.viam.common.v1.GetStatusRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + common_v1_common_pb.GetStatusResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.common.v1.GetStatusResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.motor.v1.MotorServiceClient.prototype.getStatus = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.motor.v1.MotorService/GetStatus', + request, + metadata || {}, + methodDescriptor_MotorService_GetStatus, + callback); +}; + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.motor.v1.MotorServicePromiseClient.prototype.getStatus = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.motor.v1.MotorService/GetStatus', + request, + metadata || {}, + methodDescriptor_MotorService_GetStatus); +}; + + /** * @const * @type {!grpc.web.MethodDescriptor< diff --git a/gen/js/component/motor/v1/motor_pb_service.d.ts b/gen/js/component/motor/v1/motor_pb_service.d.ts index e3ac2a1c45..761acc70e7 100644 --- a/gen/js/component/motor/v1/motor_pb_service.d.ts +++ b/gen/js/component/motor/v1/motor_pb_service.d.ts @@ -104,6 +104,15 @@ type MotorServiceDoCommand = { readonly responseType: typeof common_v1_common_pb.DoCommandResponse; }; +type MotorServiceGetStatus = { + readonly methodName: string; + readonly service: typeof MotorService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof common_v1_common_pb.GetStatusRequest; + readonly responseType: typeof common_v1_common_pb.GetStatusResponse; +}; + type MotorServiceGetGeometries = { readonly methodName: string; readonly service: typeof MotorService; @@ -126,6 +135,7 @@ export class MotorService { static readonly IsPowered: MotorServiceIsPowered; static readonly IsMoving: MotorServiceIsMoving; static readonly DoCommand: MotorServiceDoCommand; + static readonly GetStatus: MotorServiceGetStatus; static readonly GetGeometries: MotorServiceGetGeometries; } @@ -260,6 +270,15 @@ export class MotorServiceClient { requestMessage: common_v1_common_pb.DoCommandRequest, callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.DoCommandResponse|null) => void ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; getGeometries( requestMessage: common_v1_common_pb.GetGeometriesRequest, metadata: grpc.Metadata, diff --git a/gen/js/component/motor/v1/motor_pb_service.js b/gen/js/component/motor/v1/motor_pb_service.js index 919942498e..271d793ef4 100644 --- a/gen/js/component/motor/v1/motor_pb_service.js +++ b/gen/js/component/motor/v1/motor_pb_service.js @@ -110,6 +110,15 @@ MotorService.DoCommand = { responseType: common_v1_common_pb.DoCommandResponse }; +MotorService.GetStatus = { + methodName: "GetStatus", + service: MotorService, + requestStream: false, + responseStream: false, + requestType: common_v1_common_pb.GetStatusRequest, + responseType: common_v1_common_pb.GetStatusResponse +}; + MotorService.GetGeometries = { methodName: "GetGeometries", service: MotorService, @@ -467,6 +476,37 @@ MotorServiceClient.prototype.doCommand = function doCommand(requestMessage, meta }; }; +MotorServiceClient.prototype.getStatus = function getStatus(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(MotorService.GetStatus, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + MotorServiceClient.prototype.getGeometries = function getGeometries(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; diff --git a/gen/js/component/movementsensor/v1/movementsensor_grpc_web_pb.js b/gen/js/component/movementsensor/v1/movementsensor_grpc_web_pb.js index 93ffb68a42..2065f2d43f 100644 --- a/gen/js/component/movementsensor/v1/movementsensor_grpc_web_pb.js +++ b/gen/js/component/movementsensor/v1/movementsensor_grpc_web_pb.js @@ -632,6 +632,67 @@ proto.viam.component.movementsensor.v1.MovementSensorServicePromiseClient.protot }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.common.v1.GetStatusRequest, + * !proto.viam.common.v1.GetStatusResponse>} + */ +const methodDescriptor_MovementSensorService_GetStatus = new grpc.web.MethodDescriptor( + '/viam.component.movementsensor.v1.MovementSensorService/GetStatus', + grpc.web.MethodType.UNARY, + common_v1_common_pb.GetStatusRequest, + common_v1_common_pb.GetStatusResponse, + /** + * @param {!proto.viam.common.v1.GetStatusRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + common_v1_common_pb.GetStatusResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.common.v1.GetStatusResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.movementsensor.v1.MovementSensorServiceClient.prototype.getStatus = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.movementsensor.v1.MovementSensorService/GetStatus', + request, + metadata || {}, + methodDescriptor_MovementSensorService_GetStatus, + callback); +}; + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.movementsensor.v1.MovementSensorServicePromiseClient.prototype.getStatus = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.movementsensor.v1.MovementSensorService/GetStatus', + request, + metadata || {}, + methodDescriptor_MovementSensorService_GetStatus); +}; + + /** * @const * @type {!grpc.web.MethodDescriptor< diff --git a/gen/js/component/movementsensor/v1/movementsensor_pb_service.d.ts b/gen/js/component/movementsensor/v1/movementsensor_pb_service.d.ts index 996469863c..12aa8e3f00 100644 --- a/gen/js/component/movementsensor/v1/movementsensor_pb_service.d.ts +++ b/gen/js/component/movementsensor/v1/movementsensor_pb_service.d.ts @@ -86,6 +86,15 @@ type MovementSensorServiceDoCommand = { readonly responseType: typeof common_v1_common_pb.DoCommandResponse; }; +type MovementSensorServiceGetStatus = { + readonly methodName: string; + readonly service: typeof MovementSensorService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof common_v1_common_pb.GetStatusRequest; + readonly responseType: typeof common_v1_common_pb.GetStatusResponse; +}; + type MovementSensorServiceGetGeometries = { readonly methodName: string; readonly service: typeof MovementSensorService; @@ -115,6 +124,7 @@ export class MovementSensorService { static readonly GetAccuracy: MovementSensorServiceGetAccuracy; static readonly GetLinearAcceleration: MovementSensorServiceGetLinearAcceleration; static readonly DoCommand: MovementSensorServiceDoCommand; + static readonly GetStatus: MovementSensorServiceGetStatus; static readonly GetGeometries: MovementSensorServiceGetGeometries; static readonly GetReadings: MovementSensorServiceGetReadings; } @@ -232,6 +242,15 @@ export class MovementSensorServiceClient { requestMessage: common_v1_common_pb.DoCommandRequest, callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.DoCommandResponse|null) => void ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; getGeometries( requestMessage: common_v1_common_pb.GetGeometriesRequest, metadata: grpc.Metadata, diff --git a/gen/js/component/movementsensor/v1/movementsensor_pb_service.js b/gen/js/component/movementsensor/v1/movementsensor_pb_service.js index b956be7d29..f9dd505185 100644 --- a/gen/js/component/movementsensor/v1/movementsensor_pb_service.js +++ b/gen/js/component/movementsensor/v1/movementsensor_pb_service.js @@ -92,6 +92,15 @@ MovementSensorService.DoCommand = { responseType: common_v1_common_pb.DoCommandResponse }; +MovementSensorService.GetStatus = { + methodName: "GetStatus", + service: MovementSensorService, + requestStream: false, + responseStream: false, + requestType: common_v1_common_pb.GetStatusRequest, + responseType: common_v1_common_pb.GetStatusResponse +}; + MovementSensorService.GetGeometries = { methodName: "GetGeometries", service: MovementSensorService, @@ -396,6 +405,37 @@ MovementSensorServiceClient.prototype.doCommand = function doCommand(requestMess }; }; +MovementSensorServiceClient.prototype.getStatus = function getStatus(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(MovementSensorService.GetStatus, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + MovementSensorServiceClient.prototype.getGeometries = function getGeometries(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; diff --git a/gen/js/component/posetracker/v1/pose_tracker_grpc_web_pb.js b/gen/js/component/posetracker/v1/pose_tracker_grpc_web_pb.js index 2057657475..864f8df507 100644 --- a/gen/js/component/posetracker/v1/pose_tracker_grpc_web_pb.js +++ b/gen/js/component/posetracker/v1/pose_tracker_grpc_web_pb.js @@ -205,6 +205,67 @@ proto.viam.component.posetracker.v1.PoseTrackerServicePromiseClient.prototype.do }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.common.v1.GetStatusRequest, + * !proto.viam.common.v1.GetStatusResponse>} + */ +const methodDescriptor_PoseTrackerService_GetStatus = new grpc.web.MethodDescriptor( + '/viam.component.posetracker.v1.PoseTrackerService/GetStatus', + grpc.web.MethodType.UNARY, + common_v1_common_pb.GetStatusRequest, + common_v1_common_pb.GetStatusResponse, + /** + * @param {!proto.viam.common.v1.GetStatusRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + common_v1_common_pb.GetStatusResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.common.v1.GetStatusResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.posetracker.v1.PoseTrackerServiceClient.prototype.getStatus = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.posetracker.v1.PoseTrackerService/GetStatus', + request, + metadata || {}, + methodDescriptor_PoseTrackerService_GetStatus, + callback); +}; + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.posetracker.v1.PoseTrackerServicePromiseClient.prototype.getStatus = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.posetracker.v1.PoseTrackerService/GetStatus', + request, + metadata || {}, + methodDescriptor_PoseTrackerService_GetStatus); +}; + + /** * @const * @type {!grpc.web.MethodDescriptor< diff --git a/gen/js/component/posetracker/v1/pose_tracker_pb_service.d.ts b/gen/js/component/posetracker/v1/pose_tracker_pb_service.d.ts index ac7fdb2a9f..0e74e1f894 100644 --- a/gen/js/component/posetracker/v1/pose_tracker_pb_service.d.ts +++ b/gen/js/component/posetracker/v1/pose_tracker_pb_service.d.ts @@ -23,6 +23,15 @@ type PoseTrackerServiceDoCommand = { readonly responseType: typeof common_v1_common_pb.DoCommandResponse; }; +type PoseTrackerServiceGetStatus = { + readonly methodName: string; + readonly service: typeof PoseTrackerService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof common_v1_common_pb.GetStatusRequest; + readonly responseType: typeof common_v1_common_pb.GetStatusResponse; +}; + type PoseTrackerServiceGetGeometries = { readonly methodName: string; readonly service: typeof PoseTrackerService; @@ -36,6 +45,7 @@ export class PoseTrackerService { static readonly serviceName: string; static readonly GetPoses: PoseTrackerServiceGetPoses; static readonly DoCommand: PoseTrackerServiceDoCommand; + static readonly GetStatus: PoseTrackerServiceGetStatus; static readonly GetGeometries: PoseTrackerServiceGetGeometries; } @@ -89,6 +99,15 @@ export class PoseTrackerServiceClient { requestMessage: common_v1_common_pb.DoCommandRequest, callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.DoCommandResponse|null) => void ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; getGeometries( requestMessage: common_v1_common_pb.GetGeometriesRequest, metadata: grpc.Metadata, diff --git a/gen/js/component/posetracker/v1/pose_tracker_pb_service.js b/gen/js/component/posetracker/v1/pose_tracker_pb_service.js index 91f5386413..567dda5f15 100644 --- a/gen/js/component/posetracker/v1/pose_tracker_pb_service.js +++ b/gen/js/component/posetracker/v1/pose_tracker_pb_service.js @@ -29,6 +29,15 @@ PoseTrackerService.DoCommand = { responseType: common_v1_common_pb.DoCommandResponse }; +PoseTrackerService.GetStatus = { + methodName: "GetStatus", + service: PoseTrackerService, + requestStream: false, + responseStream: false, + requestType: common_v1_common_pb.GetStatusRequest, + responseType: common_v1_common_pb.GetStatusResponse +}; + PoseTrackerService.GetGeometries = { methodName: "GetGeometries", service: PoseTrackerService, @@ -107,6 +116,37 @@ PoseTrackerServiceClient.prototype.doCommand = function doCommand(requestMessage }; }; +PoseTrackerServiceClient.prototype.getStatus = function getStatus(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(PoseTrackerService.GetStatus, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + PoseTrackerServiceClient.prototype.getGeometries = function getGeometries(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; diff --git a/gen/js/component/powersensor/v1/powersensor_grpc_web_pb.js b/gen/js/component/powersensor/v1/powersensor_grpc_web_pb.js index 79f7919b7c..f09479e8ea 100644 --- a/gen/js/component/powersensor/v1/powersensor_grpc_web_pb.js +++ b/gen/js/component/powersensor/v1/powersensor_grpc_web_pb.js @@ -388,5 +388,66 @@ proto.viam.component.powersensor.v1.PowerSensorServicePromiseClient.prototype.do }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.common.v1.GetStatusRequest, + * !proto.viam.common.v1.GetStatusResponse>} + */ +const methodDescriptor_PowerSensorService_GetStatus = new grpc.web.MethodDescriptor( + '/viam.component.powersensor.v1.PowerSensorService/GetStatus', + grpc.web.MethodType.UNARY, + common_v1_common_pb.GetStatusRequest, + common_v1_common_pb.GetStatusResponse, + /** + * @param {!proto.viam.common.v1.GetStatusRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + common_v1_common_pb.GetStatusResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.common.v1.GetStatusResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.powersensor.v1.PowerSensorServiceClient.prototype.getStatus = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.powersensor.v1.PowerSensorService/GetStatus', + request, + metadata || {}, + methodDescriptor_PowerSensorService_GetStatus, + callback); +}; + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.powersensor.v1.PowerSensorServicePromiseClient.prototype.getStatus = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.powersensor.v1.PowerSensorService/GetStatus', + request, + metadata || {}, + methodDescriptor_PowerSensorService_GetStatus); +}; + + module.exports = proto.viam.component.powersensor.v1; diff --git a/gen/js/component/powersensor/v1/powersensor_pb_service.d.ts b/gen/js/component/powersensor/v1/powersensor_pb_service.d.ts index a548aad44f..e476824eba 100644 --- a/gen/js/component/powersensor/v1/powersensor_pb_service.d.ts +++ b/gen/js/component/powersensor/v1/powersensor_pb_service.d.ts @@ -50,6 +50,15 @@ type PowerSensorServiceDoCommand = { readonly responseType: typeof common_v1_common_pb.DoCommandResponse; }; +type PowerSensorServiceGetStatus = { + readonly methodName: string; + readonly service: typeof PowerSensorService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof common_v1_common_pb.GetStatusRequest; + readonly responseType: typeof common_v1_common_pb.GetStatusResponse; +}; + export class PowerSensorService { static readonly serviceName: string; static readonly GetVoltage: PowerSensorServiceGetVoltage; @@ -57,6 +66,7 @@ export class PowerSensorService { static readonly GetPower: PowerSensorServiceGetPower; static readonly GetReadings: PowerSensorServiceGetReadings; static readonly DoCommand: PowerSensorServiceDoCommand; + static readonly GetStatus: PowerSensorServiceGetStatus; } export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } @@ -136,5 +146,14 @@ export class PowerSensorServiceClient { requestMessage: common_v1_common_pb.DoCommandRequest, callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.DoCommandResponse|null) => void ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; } diff --git a/gen/js/component/powersensor/v1/powersensor_pb_service.js b/gen/js/component/powersensor/v1/powersensor_pb_service.js index df4604933d..9dd1e42090 100644 --- a/gen/js/component/powersensor/v1/powersensor_pb_service.js +++ b/gen/js/component/powersensor/v1/powersensor_pb_service.js @@ -56,6 +56,15 @@ PowerSensorService.DoCommand = { responseType: common_v1_common_pb.DoCommandResponse }; +PowerSensorService.GetStatus = { + methodName: "GetStatus", + service: PowerSensorService, + requestStream: false, + responseStream: false, + requestType: common_v1_common_pb.GetStatusRequest, + responseType: common_v1_common_pb.GetStatusResponse +}; + exports.PowerSensorService = PowerSensorService; function PowerSensorServiceClient(serviceHost, options) { @@ -218,5 +227,36 @@ PowerSensorServiceClient.prototype.doCommand = function doCommand(requestMessage }; }; +PowerSensorServiceClient.prototype.getStatus = function getStatus(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(PowerSensorService.GetStatus, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + exports.PowerSensorServiceClient = PowerSensorServiceClient; diff --git a/gen/js/component/sensor/v1/sensor_grpc_web_pb.js b/gen/js/component/sensor/v1/sensor_grpc_web_pb.js index ae3cbfd994..91b4d06d5f 100644 --- a/gen/js/component/sensor/v1/sensor_grpc_web_pb.js +++ b/gen/js/component/sensor/v1/sensor_grpc_web_pb.js @@ -203,6 +203,67 @@ proto.viam.component.sensor.v1.SensorServicePromiseClient.prototype.doCommand = }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.common.v1.GetStatusRequest, + * !proto.viam.common.v1.GetStatusResponse>} + */ +const methodDescriptor_SensorService_GetStatus = new grpc.web.MethodDescriptor( + '/viam.component.sensor.v1.SensorService/GetStatus', + grpc.web.MethodType.UNARY, + common_v1_common_pb.GetStatusRequest, + common_v1_common_pb.GetStatusResponse, + /** + * @param {!proto.viam.common.v1.GetStatusRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + common_v1_common_pb.GetStatusResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.common.v1.GetStatusResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.sensor.v1.SensorServiceClient.prototype.getStatus = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.sensor.v1.SensorService/GetStatus', + request, + metadata || {}, + methodDescriptor_SensorService_GetStatus, + callback); +}; + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.sensor.v1.SensorServicePromiseClient.prototype.getStatus = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.sensor.v1.SensorService/GetStatus', + request, + metadata || {}, + methodDescriptor_SensorService_GetStatus); +}; + + /** * @const * @type {!grpc.web.MethodDescriptor< diff --git a/gen/js/component/sensor/v1/sensor_pb_service.d.ts b/gen/js/component/sensor/v1/sensor_pb_service.d.ts index e5e7ad4244..260b4ffa6f 100644 --- a/gen/js/component/sensor/v1/sensor_pb_service.d.ts +++ b/gen/js/component/sensor/v1/sensor_pb_service.d.ts @@ -23,6 +23,15 @@ type SensorServiceDoCommand = { readonly responseType: typeof common_v1_common_pb.DoCommandResponse; }; +type SensorServiceGetStatus = { + readonly methodName: string; + readonly service: typeof SensorService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof common_v1_common_pb.GetStatusRequest; + readonly responseType: typeof common_v1_common_pb.GetStatusResponse; +}; + type SensorServiceGetGeometries = { readonly methodName: string; readonly service: typeof SensorService; @@ -36,6 +45,7 @@ export class SensorService { static readonly serviceName: string; static readonly GetReadings: SensorServiceGetReadings; static readonly DoCommand: SensorServiceDoCommand; + static readonly GetStatus: SensorServiceGetStatus; static readonly GetGeometries: SensorServiceGetGeometries; } @@ -89,6 +99,15 @@ export class SensorServiceClient { requestMessage: common_v1_common_pb.DoCommandRequest, callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.DoCommandResponse|null) => void ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; getGeometries( requestMessage: common_v1_common_pb.GetGeometriesRequest, metadata: grpc.Metadata, diff --git a/gen/js/component/sensor/v1/sensor_pb_service.js b/gen/js/component/sensor/v1/sensor_pb_service.js index 25f67dc84c..4c82518ce2 100644 --- a/gen/js/component/sensor/v1/sensor_pb_service.js +++ b/gen/js/component/sensor/v1/sensor_pb_service.js @@ -29,6 +29,15 @@ SensorService.DoCommand = { responseType: common_v1_common_pb.DoCommandResponse }; +SensorService.GetStatus = { + methodName: "GetStatus", + service: SensorService, + requestStream: false, + responseStream: false, + requestType: common_v1_common_pb.GetStatusRequest, + responseType: common_v1_common_pb.GetStatusResponse +}; + SensorService.GetGeometries = { methodName: "GetGeometries", service: SensorService, @@ -107,6 +116,37 @@ SensorServiceClient.prototype.doCommand = function doCommand(requestMessage, met }; }; +SensorServiceClient.prototype.getStatus = function getStatus(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(SensorService.GetStatus, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + SensorServiceClient.prototype.getGeometries = function getGeometries(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; diff --git a/gen/js/component/servo/v1/servo_grpc_web_pb.js b/gen/js/component/servo/v1/servo_grpc_web_pb.js index 4c998cf8de..11d63d4cd4 100644 --- a/gen/js/component/servo/v1/servo_grpc_web_pb.js +++ b/gen/js/component/servo/v1/servo_grpc_web_pb.js @@ -388,6 +388,67 @@ proto.viam.component.servo.v1.ServoServicePromiseClient.prototype.doCommand = }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.common.v1.GetStatusRequest, + * !proto.viam.common.v1.GetStatusResponse>} + */ +const methodDescriptor_ServoService_GetStatus = new grpc.web.MethodDescriptor( + '/viam.component.servo.v1.ServoService/GetStatus', + grpc.web.MethodType.UNARY, + common_v1_common_pb.GetStatusRequest, + common_v1_common_pb.GetStatusResponse, + /** + * @param {!proto.viam.common.v1.GetStatusRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + common_v1_common_pb.GetStatusResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.common.v1.GetStatusResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.servo.v1.ServoServiceClient.prototype.getStatus = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.servo.v1.ServoService/GetStatus', + request, + metadata || {}, + methodDescriptor_ServoService_GetStatus, + callback); +}; + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.servo.v1.ServoServicePromiseClient.prototype.getStatus = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.servo.v1.ServoService/GetStatus', + request, + metadata || {}, + methodDescriptor_ServoService_GetStatus); +}; + + /** * @const * @type {!grpc.web.MethodDescriptor< diff --git a/gen/js/component/servo/v1/servo_pb_service.d.ts b/gen/js/component/servo/v1/servo_pb_service.d.ts index 3505d128eb..4658314b12 100644 --- a/gen/js/component/servo/v1/servo_pb_service.d.ts +++ b/gen/js/component/servo/v1/servo_pb_service.d.ts @@ -50,6 +50,15 @@ type ServoServiceDoCommand = { readonly responseType: typeof common_v1_common_pb.DoCommandResponse; }; +type ServoServiceGetStatus = { + readonly methodName: string; + readonly service: typeof ServoService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof common_v1_common_pb.GetStatusRequest; + readonly responseType: typeof common_v1_common_pb.GetStatusResponse; +}; + type ServoServiceGetGeometries = { readonly methodName: string; readonly service: typeof ServoService; @@ -66,6 +75,7 @@ export class ServoService { static readonly Stop: ServoServiceStop; static readonly IsMoving: ServoServiceIsMoving; static readonly DoCommand: ServoServiceDoCommand; + static readonly GetStatus: ServoServiceGetStatus; static readonly GetGeometries: ServoServiceGetGeometries; } @@ -146,6 +156,15 @@ export class ServoServiceClient { requestMessage: common_v1_common_pb.DoCommandRequest, callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.DoCommandResponse|null) => void ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; getGeometries( requestMessage: common_v1_common_pb.GetGeometriesRequest, metadata: grpc.Metadata, diff --git a/gen/js/component/servo/v1/servo_pb_service.js b/gen/js/component/servo/v1/servo_pb_service.js index c11ccae7c6..2c390598ce 100644 --- a/gen/js/component/servo/v1/servo_pb_service.js +++ b/gen/js/component/servo/v1/servo_pb_service.js @@ -56,6 +56,15 @@ ServoService.DoCommand = { responseType: common_v1_common_pb.DoCommandResponse }; +ServoService.GetStatus = { + methodName: "GetStatus", + service: ServoService, + requestStream: false, + responseStream: false, + requestType: common_v1_common_pb.GetStatusRequest, + responseType: common_v1_common_pb.GetStatusResponse +}; + ServoService.GetGeometries = { methodName: "GetGeometries", service: ServoService, @@ -227,6 +236,37 @@ ServoServiceClient.prototype.doCommand = function doCommand(requestMessage, meta }; }; +ServoServiceClient.prototype.getStatus = function getStatus(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(ServoService.GetStatus, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + ServoServiceClient.prototype.getGeometries = function getGeometries(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; diff --git a/gen/js/component/switch/v1/switch_grpc_web_pb.js b/gen/js/component/switch/v1/switch_grpc_web_pb.js index c3f78ff84e..f201a62b4b 100644 --- a/gen/js/component/switch/v1/switch_grpc_web_pb.js +++ b/gen/js/component/switch/v1/switch_grpc_web_pb.js @@ -327,5 +327,66 @@ proto.viam.component.switch.v1.SwitchServicePromiseClient.prototype.doCommand = }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.common.v1.GetStatusRequest, + * !proto.viam.common.v1.GetStatusResponse>} + */ +const methodDescriptor_SwitchService_GetStatus = new grpc.web.MethodDescriptor( + '/viam.component.switch.v1.SwitchService/GetStatus', + grpc.web.MethodType.UNARY, + common_v1_common_pb.GetStatusRequest, + common_v1_common_pb.GetStatusResponse, + /** + * @param {!proto.viam.common.v1.GetStatusRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + common_v1_common_pb.GetStatusResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.common.v1.GetStatusResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.switch.v1.SwitchServiceClient.prototype.getStatus = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.switch.v1.SwitchService/GetStatus', + request, + metadata || {}, + methodDescriptor_SwitchService_GetStatus, + callback); +}; + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.switch.v1.SwitchServicePromiseClient.prototype.getStatus = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.switch.v1.SwitchService/GetStatus', + request, + metadata || {}, + methodDescriptor_SwitchService_GetStatus); +}; + + module.exports = proto.viam.component.switch.v1; diff --git a/gen/js/component/switch/v1/switch_pb_service.d.ts b/gen/js/component/switch/v1/switch_pb_service.d.ts index 06a936dab1..3f556a1f2d 100644 --- a/gen/js/component/switch/v1/switch_pb_service.d.ts +++ b/gen/js/component/switch/v1/switch_pb_service.d.ts @@ -41,12 +41,22 @@ type SwitchServiceDoCommand = { readonly responseType: typeof common_v1_common_pb.DoCommandResponse; }; +type SwitchServiceGetStatus = { + readonly methodName: string; + readonly service: typeof SwitchService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof common_v1_common_pb.GetStatusRequest; + readonly responseType: typeof common_v1_common_pb.GetStatusResponse; +}; + export class SwitchService { static readonly serviceName: string; static readonly SetPosition: SwitchServiceSetPosition; static readonly GetPosition: SwitchServiceGetPosition; static readonly GetNumberOfPositions: SwitchServiceGetNumberOfPositions; static readonly DoCommand: SwitchServiceDoCommand; + static readonly GetStatus: SwitchServiceGetStatus; } export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } @@ -117,5 +127,14 @@ export class SwitchServiceClient { requestMessage: common_v1_common_pb.DoCommandRequest, callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.DoCommandResponse|null) => void ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; } diff --git a/gen/js/component/switch/v1/switch_pb_service.js b/gen/js/component/switch/v1/switch_pb_service.js index e81b4a1fa4..b4fdd4bb87 100644 --- a/gen/js/component/switch/v1/switch_pb_service.js +++ b/gen/js/component/switch/v1/switch_pb_service.js @@ -47,6 +47,15 @@ SwitchService.DoCommand = { responseType: common_v1_common_pb.DoCommandResponse }; +SwitchService.GetStatus = { + methodName: "GetStatus", + service: SwitchService, + requestStream: false, + responseStream: false, + requestType: common_v1_common_pb.GetStatusRequest, + responseType: common_v1_common_pb.GetStatusResponse +}; + exports.SwitchService = SwitchService; function SwitchServiceClient(serviceHost, options) { @@ -178,5 +187,36 @@ SwitchServiceClient.prototype.doCommand = function doCommand(requestMessage, met }; }; +SwitchServiceClient.prototype.getStatus = function getStatus(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(SwitchService.GetStatus, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + exports.SwitchServiceClient = SwitchServiceClient; diff --git a/gen/js/service/datamanager/v1/data_manager_grpc_web_pb.js b/gen/js/service/datamanager/v1/data_manager_grpc_web_pb.js index 19fa678812..2b03220d09 100644 --- a/gen/js/service/datamanager/v1/data_manager_grpc_web_pb.js +++ b/gen/js/service/datamanager/v1/data_manager_grpc_web_pb.js @@ -207,6 +207,67 @@ proto.viam.service.datamanager.v1.DataManagerServicePromiseClient.prototype.doCo }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.common.v1.GetStatusRequest, + * !proto.viam.common.v1.GetStatusResponse>} + */ +const methodDescriptor_DataManagerService_GetStatus = new grpc.web.MethodDescriptor( + '/viam.service.datamanager.v1.DataManagerService/GetStatus', + grpc.web.MethodType.UNARY, + common_v1_common_pb.GetStatusRequest, + common_v1_common_pb.GetStatusResponse, + /** + * @param {!proto.viam.common.v1.GetStatusRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + common_v1_common_pb.GetStatusResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.common.v1.GetStatusResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.service.datamanager.v1.DataManagerServiceClient.prototype.getStatus = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.service.datamanager.v1.DataManagerService/GetStatus', + request, + metadata || {}, + methodDescriptor_DataManagerService_GetStatus, + callback); +}; + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.service.datamanager.v1.DataManagerServicePromiseClient.prototype.getStatus = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.service.datamanager.v1.DataManagerService/GetStatus', + request, + metadata || {}, + methodDescriptor_DataManagerService_GetStatus); +}; + + /** * @const * @type {!grpc.web.MethodDescriptor< diff --git a/gen/js/service/datamanager/v1/data_manager_pb_service.d.ts b/gen/js/service/datamanager/v1/data_manager_pb_service.d.ts index a83d80ccb2..31c81bc7d4 100644 --- a/gen/js/service/datamanager/v1/data_manager_pb_service.d.ts +++ b/gen/js/service/datamanager/v1/data_manager_pb_service.d.ts @@ -23,6 +23,15 @@ type DataManagerServiceDoCommand = { readonly responseType: typeof common_v1_common_pb.DoCommandResponse; }; +type DataManagerServiceGetStatus = { + readonly methodName: string; + readonly service: typeof DataManagerService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof common_v1_common_pb.GetStatusRequest; + readonly responseType: typeof common_v1_common_pb.GetStatusResponse; +}; + type DataManagerServiceUploadBinaryDataToDatasets = { readonly methodName: string; readonly service: typeof DataManagerService; @@ -36,6 +45,7 @@ export class DataManagerService { static readonly serviceName: string; static readonly Sync: DataManagerServiceSync; static readonly DoCommand: DataManagerServiceDoCommand; + static readonly GetStatus: DataManagerServiceGetStatus; static readonly UploadBinaryDataToDatasets: DataManagerServiceUploadBinaryDataToDatasets; } @@ -89,6 +99,15 @@ export class DataManagerServiceClient { requestMessage: common_v1_common_pb.DoCommandRequest, callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.DoCommandResponse|null) => void ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; uploadBinaryDataToDatasets( requestMessage: service_datamanager_v1_data_manager_pb.UploadBinaryDataToDatasetsRequest, metadata: grpc.Metadata, diff --git a/gen/js/service/datamanager/v1/data_manager_pb_service.js b/gen/js/service/datamanager/v1/data_manager_pb_service.js index a0ce6a77c3..ddff23f17d 100644 --- a/gen/js/service/datamanager/v1/data_manager_pb_service.js +++ b/gen/js/service/datamanager/v1/data_manager_pb_service.js @@ -29,6 +29,15 @@ DataManagerService.DoCommand = { responseType: common_v1_common_pb.DoCommandResponse }; +DataManagerService.GetStatus = { + methodName: "GetStatus", + service: DataManagerService, + requestStream: false, + responseStream: false, + requestType: common_v1_common_pb.GetStatusRequest, + responseType: common_v1_common_pb.GetStatusResponse +}; + DataManagerService.UploadBinaryDataToDatasets = { methodName: "UploadBinaryDataToDatasets", service: DataManagerService, @@ -107,6 +116,37 @@ DataManagerServiceClient.prototype.doCommand = function doCommand(requestMessage }; }; +DataManagerServiceClient.prototype.getStatus = function getStatus(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(DataManagerService.GetStatus, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + DataManagerServiceClient.prototype.uploadBinaryDataToDatasets = function uploadBinaryDataToDatasets(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; diff --git a/gen/js/service/discovery/v1/discovery_grpc_web_pb.js b/gen/js/service/discovery/v1/discovery_grpc_web_pb.js index fa4bed49a9..3d3126b4dc 100644 --- a/gen/js/service/discovery/v1/discovery_grpc_web_pb.js +++ b/gen/js/service/discovery/v1/discovery_grpc_web_pb.js @@ -207,5 +207,66 @@ proto.viam.service.discovery.v1.DiscoveryServicePromiseClient.prototype.doComman }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.common.v1.GetStatusRequest, + * !proto.viam.common.v1.GetStatusResponse>} + */ +const methodDescriptor_DiscoveryService_GetStatus = new grpc.web.MethodDescriptor( + '/viam.service.discovery.v1.DiscoveryService/GetStatus', + grpc.web.MethodType.UNARY, + common_v1_common_pb.GetStatusRequest, + common_v1_common_pb.GetStatusResponse, + /** + * @param {!proto.viam.common.v1.GetStatusRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + common_v1_common_pb.GetStatusResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.common.v1.GetStatusResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.service.discovery.v1.DiscoveryServiceClient.prototype.getStatus = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.service.discovery.v1.DiscoveryService/GetStatus', + request, + metadata || {}, + methodDescriptor_DiscoveryService_GetStatus, + callback); +}; + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.service.discovery.v1.DiscoveryServicePromiseClient.prototype.getStatus = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.service.discovery.v1.DiscoveryService/GetStatus', + request, + metadata || {}, + methodDescriptor_DiscoveryService_GetStatus); +}; + + module.exports = proto.viam.service.discovery.v1; diff --git a/gen/js/service/discovery/v1/discovery_pb_service.d.ts b/gen/js/service/discovery/v1/discovery_pb_service.d.ts index 3295c5b639..6373839a81 100644 --- a/gen/js/service/discovery/v1/discovery_pb_service.d.ts +++ b/gen/js/service/discovery/v1/discovery_pb_service.d.ts @@ -23,10 +23,20 @@ type DiscoveryServiceDoCommand = { readonly responseType: typeof common_v1_common_pb.DoCommandResponse; }; +type DiscoveryServiceGetStatus = { + readonly methodName: string; + readonly service: typeof DiscoveryService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof common_v1_common_pb.GetStatusRequest; + readonly responseType: typeof common_v1_common_pb.GetStatusResponse; +}; + export class DiscoveryService { static readonly serviceName: string; static readonly DiscoverResources: DiscoveryServiceDiscoverResources; static readonly DoCommand: DiscoveryServiceDoCommand; + static readonly GetStatus: DiscoveryServiceGetStatus; } export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } @@ -79,5 +89,14 @@ export class DiscoveryServiceClient { requestMessage: common_v1_common_pb.DoCommandRequest, callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.DoCommandResponse|null) => void ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; } diff --git a/gen/js/service/discovery/v1/discovery_pb_service.js b/gen/js/service/discovery/v1/discovery_pb_service.js index b5f659de57..4d42ef58b2 100644 --- a/gen/js/service/discovery/v1/discovery_pb_service.js +++ b/gen/js/service/discovery/v1/discovery_pb_service.js @@ -29,6 +29,15 @@ DiscoveryService.DoCommand = { responseType: common_v1_common_pb.DoCommandResponse }; +DiscoveryService.GetStatus = { + methodName: "GetStatus", + service: DiscoveryService, + requestStream: false, + responseStream: false, + requestType: common_v1_common_pb.GetStatusRequest, + responseType: common_v1_common_pb.GetStatusResponse +}; + exports.DiscoveryService = DiscoveryService; function DiscoveryServiceClient(serviceHost, options) { @@ -98,5 +107,36 @@ DiscoveryServiceClient.prototype.doCommand = function doCommand(requestMessage, }; }; +DiscoveryServiceClient.prototype.getStatus = function getStatus(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(DiscoveryService.GetStatus, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + exports.DiscoveryServiceClient = DiscoveryServiceClient; diff --git a/gen/js/service/generic/v1/generic_grpc_web_pb.js b/gen/js/service/generic/v1/generic_grpc_web_pb.js index 2d4c261291..b5116c374a 100644 --- a/gen/js/service/generic/v1/generic_grpc_web_pb.js +++ b/gen/js/service/generic/v1/generic_grpc_web_pb.js @@ -142,5 +142,66 @@ proto.viam.service.generic.v1.GenericServicePromiseClient.prototype.doCommand = }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.common.v1.GetStatusRequest, + * !proto.viam.common.v1.GetStatusResponse>} + */ +const methodDescriptor_GenericService_GetStatus = new grpc.web.MethodDescriptor( + '/viam.service.generic.v1.GenericService/GetStatus', + grpc.web.MethodType.UNARY, + common_v1_common_pb.GetStatusRequest, + common_v1_common_pb.GetStatusResponse, + /** + * @param {!proto.viam.common.v1.GetStatusRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + common_v1_common_pb.GetStatusResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.common.v1.GetStatusResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.service.generic.v1.GenericServiceClient.prototype.getStatus = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.service.generic.v1.GenericService/GetStatus', + request, + metadata || {}, + methodDescriptor_GenericService_GetStatus, + callback); +}; + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.service.generic.v1.GenericServicePromiseClient.prototype.getStatus = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.service.generic.v1.GenericService/GetStatus', + request, + metadata || {}, + methodDescriptor_GenericService_GetStatus); +}; + + module.exports = proto.viam.service.generic.v1; diff --git a/gen/js/service/generic/v1/generic_pb_service.d.ts b/gen/js/service/generic/v1/generic_pb_service.d.ts index 9936a1d49d..e79f5c0812 100644 --- a/gen/js/service/generic/v1/generic_pb_service.d.ts +++ b/gen/js/service/generic/v1/generic_pb_service.d.ts @@ -14,9 +14,19 @@ type GenericServiceDoCommand = { readonly responseType: typeof common_v1_common_pb.DoCommandResponse; }; +type GenericServiceGetStatus = { + readonly methodName: string; + readonly service: typeof GenericService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof common_v1_common_pb.GetStatusRequest; + readonly responseType: typeof common_v1_common_pb.GetStatusResponse; +}; + export class GenericService { static readonly serviceName: string; static readonly DoCommand: GenericServiceDoCommand; + static readonly GetStatus: GenericServiceGetStatus; } export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } @@ -60,5 +70,14 @@ export class GenericServiceClient { requestMessage: common_v1_common_pb.DoCommandRequest, callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.DoCommandResponse|null) => void ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; } diff --git a/gen/js/service/generic/v1/generic_pb_service.js b/gen/js/service/generic/v1/generic_pb_service.js index 62ab19ab6f..a57649083d 100644 --- a/gen/js/service/generic/v1/generic_pb_service.js +++ b/gen/js/service/generic/v1/generic_pb_service.js @@ -20,6 +20,15 @@ GenericService.DoCommand = { responseType: common_v1_common_pb.DoCommandResponse }; +GenericService.GetStatus = { + methodName: "GetStatus", + service: GenericService, + requestStream: false, + responseStream: false, + requestType: common_v1_common_pb.GetStatusRequest, + responseType: common_v1_common_pb.GetStatusResponse +}; + exports.GenericService = GenericService; function GenericServiceClient(serviceHost, options) { @@ -58,5 +67,36 @@ GenericServiceClient.prototype.doCommand = function doCommand(requestMessage, me }; }; +GenericServiceClient.prototype.getStatus = function getStatus(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(GenericService.GetStatus, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + exports.GenericServiceClient = GenericServiceClient; diff --git a/gen/js/service/mlmodel/v1/mlmodel_grpc_web_pb.js b/gen/js/service/mlmodel/v1/mlmodel_grpc_web_pb.js index cb903c213f..a383a937b8 100644 --- a/gen/js/service/mlmodel/v1/mlmodel_grpc_web_pb.js +++ b/gen/js/service/mlmodel/v1/mlmodel_grpc_web_pb.js @@ -20,6 +20,8 @@ const grpc = {}; grpc.web = require('grpc-web'); +var common_v1_common_pb = require('../../../common/v1/common_pb.js') + var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js') @@ -203,5 +205,66 @@ proto.viam.service.mlmodel.v1.MLModelServicePromiseClient.prototype.metadata = }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.common.v1.GetStatusRequest, + * !proto.viam.common.v1.GetStatusResponse>} + */ +const methodDescriptor_MLModelService_GetStatus = new grpc.web.MethodDescriptor( + '/viam.service.mlmodel.v1.MLModelService/GetStatus', + grpc.web.MethodType.UNARY, + common_v1_common_pb.GetStatusRequest, + common_v1_common_pb.GetStatusResponse, + /** + * @param {!proto.viam.common.v1.GetStatusRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + common_v1_common_pb.GetStatusResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.common.v1.GetStatusResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.service.mlmodel.v1.MLModelServiceClient.prototype.getStatus = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.service.mlmodel.v1.MLModelService/GetStatus', + request, + metadata || {}, + methodDescriptor_MLModelService_GetStatus, + callback); +}; + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.service.mlmodel.v1.MLModelServicePromiseClient.prototype.getStatus = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.service.mlmodel.v1.MLModelService/GetStatus', + request, + metadata || {}, + methodDescriptor_MLModelService_GetStatus); +}; + + module.exports = proto.viam.service.mlmodel.v1; diff --git a/gen/js/service/mlmodel/v1/mlmodel_pb.d.ts b/gen/js/service/mlmodel/v1/mlmodel_pb.d.ts index 0345997057..178f24112c 100644 --- a/gen/js/service/mlmodel/v1/mlmodel_pb.d.ts +++ b/gen/js/service/mlmodel/v1/mlmodel_pb.d.ts @@ -2,6 +2,7 @@ // file: service/mlmodel/v1/mlmodel.proto import * as jspb from "google-protobuf"; +import * as common_v1_common_pb from "../../../common/v1/common_pb"; import * as google_api_annotations_pb from "../../../google/api/annotations_pb"; import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; diff --git a/gen/js/service/mlmodel/v1/mlmodel_pb.js b/gen/js/service/mlmodel/v1/mlmodel_pb.js index a518f9e0f7..3a8e0df42d 100644 --- a/gen/js/service/mlmodel/v1/mlmodel_pb.js +++ b/gen/js/service/mlmodel/v1/mlmodel_pb.js @@ -15,6 +15,8 @@ var jspb = require('google-protobuf'); var goog = jspb; var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); +var common_v1_common_pb = require('../../../common/v1/common_pb.js'); +goog.object.extend(proto, common_v1_common_pb); var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); goog.object.extend(proto, google_api_annotations_pb); var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js'); diff --git a/gen/js/service/mlmodel/v1/mlmodel_pb_service.d.ts b/gen/js/service/mlmodel/v1/mlmodel_pb_service.d.ts index 47a9bd3a4a..f38bfce4ae 100644 --- a/gen/js/service/mlmodel/v1/mlmodel_pb_service.d.ts +++ b/gen/js/service/mlmodel/v1/mlmodel_pb_service.d.ts @@ -2,6 +2,7 @@ // file: service/mlmodel/v1/mlmodel.proto import * as service_mlmodel_v1_mlmodel_pb from "../../../service/mlmodel/v1/mlmodel_pb"; +import * as common_v1_common_pb from "../../../common/v1/common_pb"; import {grpc} from "@improbable-eng/grpc-web"; type MLModelServiceInfer = { @@ -22,10 +23,20 @@ type MLModelServiceMetadata = { readonly responseType: typeof service_mlmodel_v1_mlmodel_pb.MetadataResponse; }; +type MLModelServiceGetStatus = { + readonly methodName: string; + readonly service: typeof MLModelService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof common_v1_common_pb.GetStatusRequest; + readonly responseType: typeof common_v1_common_pb.GetStatusResponse; +}; + export class MLModelService { static readonly serviceName: string; static readonly Infer: MLModelServiceInfer; static readonly Metadata: MLModelServiceMetadata; + static readonly GetStatus: MLModelServiceGetStatus; } export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } @@ -78,5 +89,14 @@ export class MLModelServiceClient { requestMessage: service_mlmodel_v1_mlmodel_pb.MetadataRequest, callback: (error: ServiceError|null, responseMessage: service_mlmodel_v1_mlmodel_pb.MetadataResponse|null) => void ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; } diff --git a/gen/js/service/mlmodel/v1/mlmodel_pb_service.js b/gen/js/service/mlmodel/v1/mlmodel_pb_service.js index b03b4916c8..a6ac7c3efb 100644 --- a/gen/js/service/mlmodel/v1/mlmodel_pb_service.js +++ b/gen/js/service/mlmodel/v1/mlmodel_pb_service.js @@ -2,6 +2,7 @@ // file: service/mlmodel/v1/mlmodel.proto var service_mlmodel_v1_mlmodel_pb = require("../../../service/mlmodel/v1/mlmodel_pb"); +var common_v1_common_pb = require("../../../common/v1/common_pb"); var grpc = require("@improbable-eng/grpc-web").grpc; var MLModelService = (function () { @@ -28,6 +29,15 @@ MLModelService.Metadata = { responseType: service_mlmodel_v1_mlmodel_pb.MetadataResponse }; +MLModelService.GetStatus = { + methodName: "GetStatus", + service: MLModelService, + requestStream: false, + responseStream: false, + requestType: common_v1_common_pb.GetStatusRequest, + responseType: common_v1_common_pb.GetStatusResponse +}; + exports.MLModelService = MLModelService; function MLModelServiceClient(serviceHost, options) { @@ -97,5 +107,36 @@ MLModelServiceClient.prototype.metadata = function metadata(requestMessage, meta }; }; +MLModelServiceClient.prototype.getStatus = function getStatus(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(MLModelService.GetStatus, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + exports.MLModelServiceClient = MLModelServiceClient; diff --git a/gen/js/service/motion/v1/motion_grpc_web_pb.js b/gen/js/service/motion/v1/motion_grpc_web_pb.js index 541b0bf411..8538115ed7 100644 --- a/gen/js/service/motion/v1/motion_grpc_web_pb.js +++ b/gen/js/service/motion/v1/motion_grpc_web_pb.js @@ -573,5 +573,66 @@ proto.viam.service.motion.v1.MotionServicePromiseClient.prototype.doCommand = }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.common.v1.GetStatusRequest, + * !proto.viam.common.v1.GetStatusResponse>} + */ +const methodDescriptor_MotionService_GetStatus = new grpc.web.MethodDescriptor( + '/viam.service.motion.v1.MotionService/GetStatus', + grpc.web.MethodType.UNARY, + common_v1_common_pb.GetStatusRequest, + common_v1_common_pb.GetStatusResponse, + /** + * @param {!proto.viam.common.v1.GetStatusRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + common_v1_common_pb.GetStatusResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.common.v1.GetStatusResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.service.motion.v1.MotionServiceClient.prototype.getStatus = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.service.motion.v1.MotionService/GetStatus', + request, + metadata || {}, + methodDescriptor_MotionService_GetStatus, + callback); +}; + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.service.motion.v1.MotionServicePromiseClient.prototype.getStatus = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.service.motion.v1.MotionService/GetStatus', + request, + metadata || {}, + methodDescriptor_MotionService_GetStatus); +}; + + module.exports = proto.viam.service.motion.v1; diff --git a/gen/js/service/motion/v1/motion_pb_service.d.ts b/gen/js/service/motion/v1/motion_pb_service.d.ts index 1fc7dc99a8..081e250bb7 100644 --- a/gen/js/service/motion/v1/motion_pb_service.d.ts +++ b/gen/js/service/motion/v1/motion_pb_service.d.ts @@ -77,6 +77,15 @@ type MotionServiceDoCommand = { readonly responseType: typeof common_v1_common_pb.DoCommandResponse; }; +type MotionServiceGetStatus = { + readonly methodName: string; + readonly service: typeof MotionService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof common_v1_common_pb.GetStatusRequest; + readonly responseType: typeof common_v1_common_pb.GetStatusResponse; +}; + export class MotionService { static readonly serviceName: string; static readonly Move: MotionServiceMove; @@ -87,6 +96,7 @@ export class MotionService { static readonly ListPlanStatuses: MotionServiceListPlanStatuses; static readonly GetPlan: MotionServiceGetPlan; static readonly DoCommand: MotionServiceDoCommand; + static readonly GetStatus: MotionServiceGetStatus; } export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } @@ -193,5 +203,14 @@ export class MotionServiceClient { requestMessage: common_v1_common_pb.DoCommandRequest, callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.DoCommandResponse|null) => void ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; } diff --git a/gen/js/service/motion/v1/motion_pb_service.js b/gen/js/service/motion/v1/motion_pb_service.js index 62c5b565de..c864425c1c 100644 --- a/gen/js/service/motion/v1/motion_pb_service.js +++ b/gen/js/service/motion/v1/motion_pb_service.js @@ -83,6 +83,15 @@ MotionService.DoCommand = { responseType: common_v1_common_pb.DoCommandResponse }; +MotionService.GetStatus = { + methodName: "GetStatus", + service: MotionService, + requestStream: false, + responseStream: false, + requestType: common_v1_common_pb.GetStatusRequest, + responseType: common_v1_common_pb.GetStatusResponse +}; + exports.MotionService = MotionService; function MotionServiceClient(serviceHost, options) { @@ -338,5 +347,36 @@ MotionServiceClient.prototype.doCommand = function doCommand(requestMessage, met }; }; +MotionServiceClient.prototype.getStatus = function getStatus(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(MotionService.GetStatus, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + exports.MotionServiceClient = MotionServiceClient; diff --git a/gen/js/service/navigation/v1/navigation_grpc_web_pb.js b/gen/js/service/navigation/v1/navigation_grpc_web_pb.js index 0fe2d78c38..b9b68334c3 100644 --- a/gen/js/service/navigation/v1/navigation_grpc_web_pb.js +++ b/gen/js/service/navigation/v1/navigation_grpc_web_pb.js @@ -693,5 +693,66 @@ proto.viam.service.navigation.v1.NavigationServicePromiseClient.prototype.doComm }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.common.v1.GetStatusRequest, + * !proto.viam.common.v1.GetStatusResponse>} + */ +const methodDescriptor_NavigationService_GetStatus = new grpc.web.MethodDescriptor( + '/viam.service.navigation.v1.NavigationService/GetStatus', + grpc.web.MethodType.UNARY, + common_v1_common_pb.GetStatusRequest, + common_v1_common_pb.GetStatusResponse, + /** + * @param {!proto.viam.common.v1.GetStatusRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + common_v1_common_pb.GetStatusResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.common.v1.GetStatusResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.service.navigation.v1.NavigationServiceClient.prototype.getStatus = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.service.navigation.v1.NavigationService/GetStatus', + request, + metadata || {}, + methodDescriptor_NavigationService_GetStatus, + callback); +}; + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.service.navigation.v1.NavigationServicePromiseClient.prototype.getStatus = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.service.navigation.v1.NavigationService/GetStatus', + request, + metadata || {}, + methodDescriptor_NavigationService_GetStatus); +}; + + module.exports = proto.viam.service.navigation.v1; diff --git a/gen/js/service/navigation/v1/navigation_pb_service.d.ts b/gen/js/service/navigation/v1/navigation_pb_service.d.ts index ff57146cac..4f24837c89 100644 --- a/gen/js/service/navigation/v1/navigation_pb_service.d.ts +++ b/gen/js/service/navigation/v1/navigation_pb_service.d.ts @@ -95,6 +95,15 @@ type NavigationServiceDoCommand = { readonly responseType: typeof common_v1_common_pb.DoCommandResponse; }; +type NavigationServiceGetStatus = { + readonly methodName: string; + readonly service: typeof NavigationService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof common_v1_common_pb.GetStatusRequest; + readonly responseType: typeof common_v1_common_pb.GetStatusResponse; +}; + export class NavigationService { static readonly serviceName: string; static readonly GetMode: NavigationServiceGetMode; @@ -107,6 +116,7 @@ export class NavigationService { static readonly GetPaths: NavigationServiceGetPaths; static readonly GetProperties: NavigationServiceGetProperties; static readonly DoCommand: NavigationServiceDoCommand; + static readonly GetStatus: NavigationServiceGetStatus; } export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } @@ -231,5 +241,14 @@ export class NavigationServiceClient { requestMessage: common_v1_common_pb.DoCommandRequest, callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.DoCommandResponse|null) => void ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; } diff --git a/gen/js/service/navigation/v1/navigation_pb_service.js b/gen/js/service/navigation/v1/navigation_pb_service.js index 39eea11ec0..344485c8de 100644 --- a/gen/js/service/navigation/v1/navigation_pb_service.js +++ b/gen/js/service/navigation/v1/navigation_pb_service.js @@ -101,6 +101,15 @@ NavigationService.DoCommand = { responseType: common_v1_common_pb.DoCommandResponse }; +NavigationService.GetStatus = { + methodName: "GetStatus", + service: NavigationService, + requestStream: false, + responseStream: false, + requestType: common_v1_common_pb.GetStatusRequest, + responseType: common_v1_common_pb.GetStatusResponse +}; + exports.NavigationService = NavigationService; function NavigationServiceClient(serviceHost, options) { @@ -418,5 +427,36 @@ NavigationServiceClient.prototype.doCommand = function doCommand(requestMessage, }; }; +NavigationServiceClient.prototype.getStatus = function getStatus(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(NavigationService.GetStatus, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + exports.NavigationServiceClient = NavigationServiceClient; diff --git a/gen/js/service/sensors/v1/sensors_grpc_web_pb.js b/gen/js/service/sensors/v1/sensors_grpc_web_pb.js index 4dd31bb9ba..eaa49b9660 100644 --- a/gen/js/service/sensors/v1/sensors_grpc_web_pb.js +++ b/gen/js/service/sensors/v1/sensors_grpc_web_pb.js @@ -266,5 +266,66 @@ proto.viam.service.sensors.v1.SensorsServicePromiseClient.prototype.doCommand = }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.common.v1.GetStatusRequest, + * !proto.viam.common.v1.GetStatusResponse>} + */ +const methodDescriptor_SensorsService_GetStatus = new grpc.web.MethodDescriptor( + '/viam.service.sensors.v1.SensorsService/GetStatus', + grpc.web.MethodType.UNARY, + common_v1_common_pb.GetStatusRequest, + common_v1_common_pb.GetStatusResponse, + /** + * @param {!proto.viam.common.v1.GetStatusRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + common_v1_common_pb.GetStatusResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.common.v1.GetStatusResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.service.sensors.v1.SensorsServiceClient.prototype.getStatus = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.service.sensors.v1.SensorsService/GetStatus', + request, + metadata || {}, + methodDescriptor_SensorsService_GetStatus, + callback); +}; + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.service.sensors.v1.SensorsServicePromiseClient.prototype.getStatus = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.service.sensors.v1.SensorsService/GetStatus', + request, + metadata || {}, + methodDescriptor_SensorsService_GetStatus); +}; + + module.exports = proto.viam.service.sensors.v1; diff --git a/gen/js/service/sensors/v1/sensors_pb_service.d.ts b/gen/js/service/sensors/v1/sensors_pb_service.d.ts index 93f95641f6..cfe4becffb 100644 --- a/gen/js/service/sensors/v1/sensors_pb_service.d.ts +++ b/gen/js/service/sensors/v1/sensors_pb_service.d.ts @@ -32,11 +32,21 @@ type SensorsServiceDoCommand = { readonly responseType: typeof common_v1_common_pb.DoCommandResponse; }; +type SensorsServiceGetStatus = { + readonly methodName: string; + readonly service: typeof SensorsService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof common_v1_common_pb.GetStatusRequest; + readonly responseType: typeof common_v1_common_pb.GetStatusResponse; +}; + export class SensorsService { static readonly serviceName: string; static readonly GetSensors: SensorsServiceGetSensors; static readonly GetReadings: SensorsServiceGetReadings; static readonly DoCommand: SensorsServiceDoCommand; + static readonly GetStatus: SensorsServiceGetStatus; } export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } @@ -98,5 +108,14 @@ export class SensorsServiceClient { requestMessage: common_v1_common_pb.DoCommandRequest, callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.DoCommandResponse|null) => void ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; } diff --git a/gen/js/service/sensors/v1/sensors_pb_service.js b/gen/js/service/sensors/v1/sensors_pb_service.js index 0996dcd139..c1949f5701 100644 --- a/gen/js/service/sensors/v1/sensors_pb_service.js +++ b/gen/js/service/sensors/v1/sensors_pb_service.js @@ -38,6 +38,15 @@ SensorsService.DoCommand = { responseType: common_v1_common_pb.DoCommandResponse }; +SensorsService.GetStatus = { + methodName: "GetStatus", + service: SensorsService, + requestStream: false, + responseStream: false, + requestType: common_v1_common_pb.GetStatusRequest, + responseType: common_v1_common_pb.GetStatusResponse +}; + exports.SensorsService = SensorsService; function SensorsServiceClient(serviceHost, options) { @@ -138,5 +147,36 @@ SensorsServiceClient.prototype.doCommand = function doCommand(requestMessage, me }; }; +SensorsServiceClient.prototype.getStatus = function getStatus(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(SensorsService.GetStatus, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + exports.SensorsServiceClient = SensorsServiceClient; diff --git a/gen/js/service/shell/v1/shell_grpc_web_pb.js b/gen/js/service/shell/v1/shell_grpc_web_pb.js index 35c10fc8df..f688210919 100644 --- a/gen/js/service/shell/v1/shell_grpc_web_pb.js +++ b/gen/js/service/shell/v1/shell_grpc_web_pb.js @@ -146,5 +146,66 @@ proto.viam.service.shell.v1.ShellServicePromiseClient.prototype.doCommand = }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.common.v1.GetStatusRequest, + * !proto.viam.common.v1.GetStatusResponse>} + */ +const methodDescriptor_ShellService_GetStatus = new grpc.web.MethodDescriptor( + '/viam.service.shell.v1.ShellService/GetStatus', + grpc.web.MethodType.UNARY, + common_v1_common_pb.GetStatusRequest, + common_v1_common_pb.GetStatusResponse, + /** + * @param {!proto.viam.common.v1.GetStatusRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + common_v1_common_pb.GetStatusResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.common.v1.GetStatusResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.service.shell.v1.ShellServiceClient.prototype.getStatus = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.service.shell.v1.ShellService/GetStatus', + request, + metadata || {}, + methodDescriptor_ShellService_GetStatus, + callback); +}; + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.service.shell.v1.ShellServicePromiseClient.prototype.getStatus = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.service.shell.v1.ShellService/GetStatus', + request, + metadata || {}, + methodDescriptor_ShellService_GetStatus); +}; + + module.exports = proto.viam.service.shell.v1; diff --git a/gen/js/service/shell/v1/shell_pb_service.d.ts b/gen/js/service/shell/v1/shell_pb_service.d.ts index 1c820a7f81..2ea60a5d6e 100644 --- a/gen/js/service/shell/v1/shell_pb_service.d.ts +++ b/gen/js/service/shell/v1/shell_pb_service.d.ts @@ -41,12 +41,22 @@ type ShellServiceDoCommand = { readonly responseType: typeof common_v1_common_pb.DoCommandResponse; }; +type ShellServiceGetStatus = { + readonly methodName: string; + readonly service: typeof ShellService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof common_v1_common_pb.GetStatusRequest; + readonly responseType: typeof common_v1_common_pb.GetStatusResponse; +}; + export class ShellService { static readonly serviceName: string; static readonly Shell: ShellServiceShell; static readonly CopyFilesToMachine: ShellServiceCopyFilesToMachine; static readonly CopyFilesFromMachine: ShellServiceCopyFilesFromMachine; static readonly DoCommand: ShellServiceDoCommand; + static readonly GetStatus: ShellServiceGetStatus; } export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } @@ -93,5 +103,14 @@ export class ShellServiceClient { requestMessage: common_v1_common_pb.DoCommandRequest, callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.DoCommandResponse|null) => void ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; } diff --git a/gen/js/service/shell/v1/shell_pb_service.js b/gen/js/service/shell/v1/shell_pb_service.js index 38b305b762..bbf2d84be6 100644 --- a/gen/js/service/shell/v1/shell_pb_service.js +++ b/gen/js/service/shell/v1/shell_pb_service.js @@ -47,6 +47,15 @@ ShellService.DoCommand = { responseType: common_v1_common_pb.DoCommandResponse }; +ShellService.GetStatus = { + methodName: "GetStatus", + service: ShellService, + requestStream: false, + responseStream: false, + requestType: common_v1_common_pb.GetStatusRequest, + responseType: common_v1_common_pb.GetStatusResponse +}; + exports.ShellService = ShellService; function ShellServiceClient(serviceHost, options) { @@ -220,5 +229,36 @@ ShellServiceClient.prototype.doCommand = function doCommand(requestMessage, meta }; }; +ShellServiceClient.prototype.getStatus = function getStatus(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(ShellService.GetStatus, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + exports.ShellServiceClient = ShellServiceClient; diff --git a/gen/js/service/slam/v1/slam_grpc_web_pb.js b/gen/js/service/slam/v1/slam_grpc_web_pb.js index 2fbea2c4af..b6110d3b58 100644 --- a/gen/js/service/slam/v1/slam_grpc_web_pb.js +++ b/gen/js/service/slam/v1/slam_grpc_web_pb.js @@ -376,5 +376,66 @@ proto.viam.service.slam.v1.SLAMServicePromiseClient.prototype.doCommand = }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.common.v1.GetStatusRequest, + * !proto.viam.common.v1.GetStatusResponse>} + */ +const methodDescriptor_SLAMService_GetStatus = new grpc.web.MethodDescriptor( + '/viam.service.slam.v1.SLAMService/GetStatus', + grpc.web.MethodType.UNARY, + common_v1_common_pb.GetStatusRequest, + common_v1_common_pb.GetStatusResponse, + /** + * @param {!proto.viam.common.v1.GetStatusRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + common_v1_common_pb.GetStatusResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.common.v1.GetStatusResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.service.slam.v1.SLAMServiceClient.prototype.getStatus = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.service.slam.v1.SLAMService/GetStatus', + request, + metadata || {}, + methodDescriptor_SLAMService_GetStatus, + callback); +}; + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.service.slam.v1.SLAMServicePromiseClient.prototype.getStatus = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.service.slam.v1.SLAMService/GetStatus', + request, + metadata || {}, + methodDescriptor_SLAMService_GetStatus); +}; + + module.exports = proto.viam.service.slam.v1; diff --git a/gen/js/service/slam/v1/slam_pb_service.d.ts b/gen/js/service/slam/v1/slam_pb_service.d.ts index a4d4de5825..49b996d8cd 100644 --- a/gen/js/service/slam/v1/slam_pb_service.d.ts +++ b/gen/js/service/slam/v1/slam_pb_service.d.ts @@ -50,6 +50,15 @@ type SLAMServiceDoCommand = { readonly responseType: typeof common_v1_common_pb.DoCommandResponse; }; +type SLAMServiceGetStatus = { + readonly methodName: string; + readonly service: typeof SLAMService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof common_v1_common_pb.GetStatusRequest; + readonly responseType: typeof common_v1_common_pb.GetStatusResponse; +}; + export class SLAMService { static readonly serviceName: string; static readonly GetPosition: SLAMServiceGetPosition; @@ -57,6 +66,7 @@ export class SLAMService { static readonly GetInternalState: SLAMServiceGetInternalState; static readonly GetProperties: SLAMServiceGetProperties; static readonly DoCommand: SLAMServiceDoCommand; + static readonly GetStatus: SLAMServiceGetStatus; } export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } @@ -120,5 +130,14 @@ export class SLAMServiceClient { requestMessage: common_v1_common_pb.DoCommandRequest, callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.DoCommandResponse|null) => void ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; } diff --git a/gen/js/service/slam/v1/slam_pb_service.js b/gen/js/service/slam/v1/slam_pb_service.js index 3080edf566..e3e2729e32 100644 --- a/gen/js/service/slam/v1/slam_pb_service.js +++ b/gen/js/service/slam/v1/slam_pb_service.js @@ -56,6 +56,15 @@ SLAMService.DoCommand = { responseType: common_v1_common_pb.DoCommandResponse }; +SLAMService.GetStatus = { + methodName: "GetStatus", + service: SLAMService, + requestStream: false, + responseStream: false, + requestType: common_v1_common_pb.GetStatusRequest, + responseType: common_v1_common_pb.GetStatusResponse +}; + exports.SLAMService = SLAMService; function SLAMServiceClient(serviceHost, options) { @@ -234,5 +243,36 @@ SLAMServiceClient.prototype.doCommand = function doCommand(requestMessage, metad }; }; +SLAMServiceClient.prototype.getStatus = function getStatus(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(SLAMService.GetStatus, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + exports.SLAMServiceClient = SLAMServiceClient; diff --git a/gen/js/service/video/v1/video_grpc_web_pb.js b/gen/js/service/video/v1/video_grpc_web_pb.js index ce8847c924..1982cecf9f 100644 --- a/gen/js/service/video/v1/video_grpc_web_pb.js +++ b/gen/js/service/video/v1/video_grpc_web_pb.js @@ -202,5 +202,66 @@ proto.viam.service.video.v1.VideoServicePromiseClient.prototype.doCommand = }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.common.v1.GetStatusRequest, + * !proto.viam.common.v1.GetStatusResponse>} + */ +const methodDescriptor_VideoService_GetStatus = new grpc.web.MethodDescriptor( + '/viam.service.video.v1.VideoService/GetStatus', + grpc.web.MethodType.UNARY, + common_v1_common_pb.GetStatusRequest, + common_v1_common_pb.GetStatusResponse, + /** + * @param {!proto.viam.common.v1.GetStatusRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + common_v1_common_pb.GetStatusResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.common.v1.GetStatusResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.service.video.v1.VideoServiceClient.prototype.getStatus = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.service.video.v1.VideoService/GetStatus', + request, + metadata || {}, + methodDescriptor_VideoService_GetStatus, + callback); +}; + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.service.video.v1.VideoServicePromiseClient.prototype.getStatus = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.service.video.v1.VideoService/GetStatus', + request, + metadata || {}, + methodDescriptor_VideoService_GetStatus); +}; + + module.exports = proto.viam.service.video.v1; diff --git a/gen/js/service/video/v1/video_pb_service.d.ts b/gen/js/service/video/v1/video_pb_service.d.ts index 1a59b2d6e7..43647d8120 100644 --- a/gen/js/service/video/v1/video_pb_service.d.ts +++ b/gen/js/service/video/v1/video_pb_service.d.ts @@ -23,10 +23,20 @@ type VideoServiceDoCommand = { readonly responseType: typeof common_v1_common_pb.DoCommandResponse; }; +type VideoServiceGetStatus = { + readonly methodName: string; + readonly service: typeof VideoService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof common_v1_common_pb.GetStatusRequest; + readonly responseType: typeof common_v1_common_pb.GetStatusResponse; +}; + export class VideoService { static readonly serviceName: string; static readonly GetVideo: VideoServiceGetVideo; static readonly DoCommand: VideoServiceDoCommand; + static readonly GetStatus: VideoServiceGetStatus; } export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } @@ -71,5 +81,14 @@ export class VideoServiceClient { requestMessage: common_v1_common_pb.DoCommandRequest, callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.DoCommandResponse|null) => void ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; } diff --git a/gen/js/service/video/v1/video_pb_service.js b/gen/js/service/video/v1/video_pb_service.js index bc5b719f91..331534cebc 100644 --- a/gen/js/service/video/v1/video_pb_service.js +++ b/gen/js/service/video/v1/video_pb_service.js @@ -29,6 +29,15 @@ VideoService.DoCommand = { responseType: common_v1_common_pb.DoCommandResponse }; +VideoService.GetStatus = { + methodName: "GetStatus", + service: VideoService, + requestStream: false, + responseStream: false, + requestType: common_v1_common_pb.GetStatusRequest, + responseType: common_v1_common_pb.GetStatusResponse +}; + exports.VideoService = VideoService; function VideoServiceClient(serviceHost, options) { @@ -106,5 +115,36 @@ VideoServiceClient.prototype.doCommand = function doCommand(requestMessage, meta }; }; +VideoServiceClient.prototype.getStatus = function getStatus(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(VideoService.GetStatus, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + exports.VideoServiceClient = VideoServiceClient; diff --git a/gen/js/service/vision/v1/vision_grpc_web_pb.js b/gen/js/service/vision/v1/vision_grpc_web_pb.js index 2453f4e3db..6406be7591 100644 --- a/gen/js/service/vision/v1/vision_grpc_web_pb.js +++ b/gen/js/service/vision/v1/vision_grpc_web_pb.js @@ -573,5 +573,66 @@ proto.viam.service.vision.v1.VisionServicePromiseClient.prototype.doCommand = }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.common.v1.GetStatusRequest, + * !proto.viam.common.v1.GetStatusResponse>} + */ +const methodDescriptor_VisionService_GetStatus = new grpc.web.MethodDescriptor( + '/viam.service.vision.v1.VisionService/GetStatus', + grpc.web.MethodType.UNARY, + common_v1_common_pb.GetStatusRequest, + common_v1_common_pb.GetStatusResponse, + /** + * @param {!proto.viam.common.v1.GetStatusRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + common_v1_common_pb.GetStatusResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.common.v1.GetStatusResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.service.vision.v1.VisionServiceClient.prototype.getStatus = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.service.vision.v1.VisionService/GetStatus', + request, + metadata || {}, + methodDescriptor_VisionService_GetStatus, + callback); +}; + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.service.vision.v1.VisionServicePromiseClient.prototype.getStatus = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.service.vision.v1.VisionService/GetStatus', + request, + metadata || {}, + methodDescriptor_VisionService_GetStatus); +}; + + module.exports = proto.viam.service.vision.v1; diff --git a/gen/js/service/vision/v1/vision_pb_service.d.ts b/gen/js/service/vision/v1/vision_pb_service.d.ts index b2c2d59c99..aa5c42b940 100644 --- a/gen/js/service/vision/v1/vision_pb_service.d.ts +++ b/gen/js/service/vision/v1/vision_pb_service.d.ts @@ -77,6 +77,15 @@ type VisionServiceDoCommand = { readonly responseType: typeof common_v1_common_pb.DoCommandResponse; }; +type VisionServiceGetStatus = { + readonly methodName: string; + readonly service: typeof VisionService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof common_v1_common_pb.GetStatusRequest; + readonly responseType: typeof common_v1_common_pb.GetStatusResponse; +}; + export class VisionService { static readonly serviceName: string; static readonly GetDetectionsFromCamera: VisionServiceGetDetectionsFromCamera; @@ -87,6 +96,7 @@ export class VisionService { static readonly GetProperties: VisionServiceGetProperties; static readonly CaptureAllFromCamera: VisionServiceCaptureAllFromCamera; static readonly DoCommand: VisionServiceDoCommand; + static readonly GetStatus: VisionServiceGetStatus; } export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } @@ -193,5 +203,14 @@ export class VisionServiceClient { requestMessage: common_v1_common_pb.DoCommandRequest, callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.DoCommandResponse|null) => void ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; } diff --git a/gen/js/service/vision/v1/vision_pb_service.js b/gen/js/service/vision/v1/vision_pb_service.js index ee8122e933..9d652fbef5 100644 --- a/gen/js/service/vision/v1/vision_pb_service.js +++ b/gen/js/service/vision/v1/vision_pb_service.js @@ -83,6 +83,15 @@ VisionService.DoCommand = { responseType: common_v1_common_pb.DoCommandResponse }; +VisionService.GetStatus = { + methodName: "GetStatus", + service: VisionService, + requestStream: false, + responseStream: false, + requestType: common_v1_common_pb.GetStatusRequest, + responseType: common_v1_common_pb.GetStatusResponse +}; + exports.VisionService = VisionService; function VisionServiceClient(serviceHost, options) { @@ -338,5 +347,36 @@ VisionServiceClient.prototype.doCommand = function doCommand(requestMessage, met }; }; +VisionServiceClient.prototype.getStatus = function getStatus(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(VisionService.GetStatus, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + exports.VisionServiceClient = VisionServiceClient; diff --git a/gen/js/service/worldstatestore/v1/world_state_store_grpc_web_pb.js b/gen/js/service/worldstatestore/v1/world_state_store_grpc_web_pb.js index 01c1f2d62e..5d517b65d3 100644 --- a/gen/js/service/worldstatestore/v1/world_state_store_grpc_web_pb.js +++ b/gen/js/service/worldstatestore/v1/world_state_store_grpc_web_pb.js @@ -324,5 +324,66 @@ proto.viam.service.worldstatestore.v1.WorldStateStoreServicePromiseClient.protot }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.common.v1.GetStatusRequest, + * !proto.viam.common.v1.GetStatusResponse>} + */ +const methodDescriptor_WorldStateStoreService_GetStatus = new grpc.web.MethodDescriptor( + '/viam.service.worldstatestore.v1.WorldStateStoreService/GetStatus', + grpc.web.MethodType.UNARY, + common_v1_common_pb.GetStatusRequest, + common_v1_common_pb.GetStatusResponse, + /** + * @param {!proto.viam.common.v1.GetStatusRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + common_v1_common_pb.GetStatusResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.common.v1.GetStatusResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.service.worldstatestore.v1.WorldStateStoreServiceClient.prototype.getStatus = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.service.worldstatestore.v1.WorldStateStoreService/GetStatus', + request, + metadata || {}, + methodDescriptor_WorldStateStoreService_GetStatus, + callback); +}; + + +/** + * @param {!proto.viam.common.v1.GetStatusRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.service.worldstatestore.v1.WorldStateStoreServicePromiseClient.prototype.getStatus = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.service.worldstatestore.v1.WorldStateStoreService/GetStatus', + request, + metadata || {}, + methodDescriptor_WorldStateStoreService_GetStatus); +}; + + module.exports = proto.viam.service.worldstatestore.v1; diff --git a/gen/js/service/worldstatestore/v1/world_state_store_pb_service.d.ts b/gen/js/service/worldstatestore/v1/world_state_store_pb_service.d.ts index 4f54b5e557..857bf04e92 100644 --- a/gen/js/service/worldstatestore/v1/world_state_store_pb_service.d.ts +++ b/gen/js/service/worldstatestore/v1/world_state_store_pb_service.d.ts @@ -41,12 +41,22 @@ type WorldStateStoreServiceDoCommand = { readonly responseType: typeof common_v1_common_pb.DoCommandResponse; }; +type WorldStateStoreServiceGetStatus = { + readonly methodName: string; + readonly service: typeof WorldStateStoreService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof common_v1_common_pb.GetStatusRequest; + readonly responseType: typeof common_v1_common_pb.GetStatusResponse; +}; + export class WorldStateStoreService { static readonly serviceName: string; static readonly ListUUIDs: WorldStateStoreServiceListUUIDs; static readonly GetTransform: WorldStateStoreServiceGetTransform; static readonly StreamTransformChanges: WorldStateStoreServiceStreamTransformChanges; static readonly DoCommand: WorldStateStoreServiceDoCommand; + static readonly GetStatus: WorldStateStoreServiceGetStatus; } export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } @@ -109,5 +119,14 @@ export class WorldStateStoreServiceClient { requestMessage: common_v1_common_pb.DoCommandRequest, callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.DoCommandResponse|null) => void ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; + getStatus( + requestMessage: common_v1_common_pb.GetStatusRequest, + callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetStatusResponse|null) => void + ): UnaryResponse; } diff --git a/gen/js/service/worldstatestore/v1/world_state_store_pb_service.js b/gen/js/service/worldstatestore/v1/world_state_store_pb_service.js index af9b6b4da8..692326931a 100644 --- a/gen/js/service/worldstatestore/v1/world_state_store_pb_service.js +++ b/gen/js/service/worldstatestore/v1/world_state_store_pb_service.js @@ -47,6 +47,15 @@ WorldStateStoreService.DoCommand = { responseType: common_v1_common_pb.DoCommandResponse }; +WorldStateStoreService.GetStatus = { + methodName: "GetStatus", + service: WorldStateStoreService, + requestStream: false, + responseStream: false, + requestType: common_v1_common_pb.GetStatusRequest, + responseType: common_v1_common_pb.GetStatusResponse +}; + exports.WorldStateStoreService = WorldStateStoreService; function WorldStateStoreServiceClient(serviceHost, options) { @@ -186,5 +195,36 @@ WorldStateStoreServiceClient.prototype.doCommand = function doCommand(requestMes }; }; +WorldStateStoreServiceClient.prototype.getStatus = function getStatus(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(WorldStateStoreService.GetStatus, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + exports.WorldStateStoreServiceClient = WorldStateStoreServiceClient; diff --git a/proto/viam/common/v1/common.proto b/proto/viam/common/v1/common.proto index ccfc79ae2b..9a6b380201 100644 --- a/proto/viam/common/v1/common.proto +++ b/proto/viam/common/v1/common.proto @@ -206,6 +206,16 @@ message DoCommandResponse { google.protobuf.Struct result = 1; } +// GetStatusRequest represents a generic GetStatus input +message GetStatusRequest { + string name = 1; +} + +// GetStatusResponse represents a generic GetStatus output +message GetStatusResponse { + google.protobuf.Struct result = 1; +} + message GetKinematicsRequest { // The component name string name = 1; diff --git a/proto/viam/component/arm/v1/arm.proto b/proto/viam/component/arm/v1/arm.proto index e6939b114c..f38a6f9f0f 100644 --- a/proto/viam/component/arm/v1/arm.proto +++ b/proto/viam/component/arm/v1/arm.proto @@ -58,6 +58,11 @@ service ArmService { option (google.api.http) = {post: "/viam/api/v1/component/arm/{name}/do_command"}; } + // GetStatus returns the status of the resource + rpc GetStatus(common.v1.GetStatusRequest) returns (common.v1.GetStatusResponse) { + option (google.api.http) = {get: "/viam/api/v1/component/arm/{name}/get_status"}; + } + // GetKinematics returns the kinematics file for the component rpc GetKinematics(common.v1.GetKinematicsRequest) returns (common.v1.GetKinematicsResponse) { option (google.api.http) = {get: "/viam/api/v1/component/arm/{name}/kinematics"}; diff --git a/proto/viam/component/audioin/v1/audioin.proto b/proto/viam/component/audioin/v1/audioin.proto index c839a9effe..b9913504e2 100644 --- a/proto/viam/component/audioin/v1/audioin.proto +++ b/proto/viam/component/audioin/v1/audioin.proto @@ -25,6 +25,11 @@ service AudioInService { option (google.api.http) = {post: "/viam/api/v1/service/audioin/{name}/do_command"}; } + // GetStatus returns the status of the resource + rpc GetStatus(common.v1.GetStatusRequest) returns (common.v1.GetStatusResponse) { + option (google.api.http) = {get: "/viam/api/v1/service/audioin/{name}/get_status"}; + } + // GetGeometries returns the geometries of the component in their current configuration rpc GetGeometries(common.v1.GetGeometriesRequest) returns (common.v1.GetGeometriesResponse) { option (google.api.http) = {get: "/viam/api/v1/component/audioin/{name}/geometries"}; diff --git a/proto/viam/component/audioout/v1/audioout.proto b/proto/viam/component/audioout/v1/audioout.proto index 9a382e29ba..bf77d3e111 100644 --- a/proto/viam/component/audioout/v1/audioout.proto +++ b/proto/viam/component/audioout/v1/audioout.proto @@ -25,6 +25,11 @@ service AudioOutService { option (google.api.http) = {post: "/viam/api/v1/service/audioout/{name}/do_command"}; } + // GetStatus returns the status of the resource + rpc GetStatus(common.v1.GetStatusRequest) returns (common.v1.GetStatusResponse) { + option (google.api.http) = {get: "/viam/api/v1/service/audioout/{name}/get_status"}; + } + // GetGeometries returns the geometries of the component in their current configuration rpc GetGeometries(common.v1.GetGeometriesRequest) returns (common.v1.GetGeometriesResponse) { option (google.api.http) = {get: "/viam/api/v1/component/audioout/{name}/geometries"}; diff --git a/proto/viam/component/base/v1/base.proto b/proto/viam/component/base/v1/base.proto index 33cf605674..9c78feb1f8 100644 --- a/proto/viam/component/base/v1/base.proto +++ b/proto/viam/component/base/v1/base.proto @@ -54,6 +54,11 @@ service BaseService { option (google.api.http) = {post: "/viam/api/v1/component/base/{name}/do_command"}; } + // GetStatus returns the status of the resource + rpc GetStatus(common.v1.GetStatusRequest) returns (common.v1.GetStatusResponse) { + option (google.api.http) = {get: "/viam/api/v1/component/base/{name}/get_status"}; + } + // GetGeometries returns the geometries of the component in their current configuration rpc GetGeometries(common.v1.GetGeometriesRequest) returns (common.v1.GetGeometriesResponse) { option (google.api.http) = {get: "/viam/api/v1/component/base/{name}/geometries"}; diff --git a/proto/viam/component/board/v1/board.proto b/proto/viam/component/board/v1/board.proto index 6c2fabb85e..0a504da8e4 100644 --- a/proto/viam/component/board/v1/board.proto +++ b/proto/viam/component/board/v1/board.proto @@ -46,6 +46,11 @@ service BoardService { option (google.api.http) = {post: "/viam/api/v1/component/board/{name}/do_command"}; } + // GetStatus returns the status of the resource + rpc GetStatus(common.v1.GetStatusRequest) returns (common.v1.GetStatusResponse) { + option (google.api.http) = {get: "/viam/api/v1/component/board/{name}/get_status"}; + } + // Analog Reader // ReadAnalogReader reads off the current value of an analog reader of a board of the underlying robot. diff --git a/proto/viam/component/button/v1/button.proto b/proto/viam/component/button/v1/button.proto index 5bcaed4d66..a7e7222dfd 100644 --- a/proto/viam/component/button/v1/button.proto +++ b/proto/viam/component/button/v1/button.proto @@ -21,6 +21,11 @@ service ButtonService { rpc DoCommand(common.v1.DoCommandRequest) returns (common.v1.DoCommandResponse) { option (google.api.http) = {post: "/viam/api/v1/component/button/{name}/do_command"}; } + + // GetStatus returns the status of the resource + rpc GetStatus(common.v1.GetStatusRequest) returns (common.v1.GetStatusResponse) { + option (google.api.http) = {get: "/viam/api/v1/component/button/{name}/get_status"}; + } } message PushRequest { diff --git a/proto/viam/component/camera/v1/camera.proto b/proto/viam/component/camera/v1/camera.proto index e59713d28d..3dbba97893 100644 --- a/proto/viam/component/camera/v1/camera.proto +++ b/proto/viam/component/camera/v1/camera.proto @@ -45,6 +45,11 @@ service CameraService { option (google.api.http) = {post: "/viam/api/v1/component/camera/{name}/do_command"}; } + // GetStatus returns the status of the resource + rpc GetStatus(common.v1.GetStatusRequest) returns (common.v1.GetStatusResponse) { + option (google.api.http) = {get: "/viam/api/v1/component/camera/{name}/get_status"}; + } + // GetGeometries returns the geometries of the component in their current configuration rpc GetGeometries(common.v1.GetGeometriesRequest) returns (common.v1.GetGeometriesResponse) { option (google.api.http) = {get: "/viam/api/v1/component/camera/{name}/geometries"}; diff --git a/proto/viam/component/encoder/v1/encoder.proto b/proto/viam/component/encoder/v1/encoder.proto index 32cf6923ac..13e34ba241 100644 --- a/proto/viam/component/encoder/v1/encoder.proto +++ b/proto/viam/component/encoder/v1/encoder.proto @@ -30,6 +30,11 @@ service EncoderService { option (google.api.http) = {post: "/viam/api/v1/component/encoder/{name}/do_command"}; } + // GetStatus returns the status of the resource + rpc GetStatus(common.v1.GetStatusRequest) returns (common.v1.GetStatusResponse) { + option (google.api.http) = {get: "/viam/api/v1/component/encoder/{name}/get_status"}; + } + // GetGeometries returns the geometries of the component in their current configuration rpc GetGeometries(common.v1.GetGeometriesRequest) returns (common.v1.GetGeometriesResponse) { option (google.api.http) = {get: "/viam/api/v1/component/encoder/{name}/geometries"}; diff --git a/proto/viam/component/gantry/v1/gantry.proto b/proto/viam/component/gantry/v1/gantry.proto index 55429c41f4..92adf3b706 100644 --- a/proto/viam/component/gantry/v1/gantry.proto +++ b/proto/viam/component/gantry/v1/gantry.proto @@ -47,6 +47,11 @@ service GantryService { option (google.api.http) = {post: "/viam/api/v1/component/gantry/{name}/do_command"}; } + // GetStatus returns the status of the resource + rpc GetStatus(common.v1.GetStatusRequest) returns (common.v1.GetStatusResponse) { + option (google.api.http) = {get: "/viam/api/v1/component/gantry/{name}/get_status"}; + } + rpc GetKinematics(common.v1.GetKinematicsRequest) returns (common.v1.GetKinematicsResponse) { option (google.api.http) = {get: "/viam/api/v1/component/gantry/{name}/kinematics"}; } diff --git a/proto/viam/component/generic/v1/generic.proto b/proto/viam/component/generic/v1/generic.proto index ad34dacaeb..1c4edaca07 100644 --- a/proto/viam/component/generic/v1/generic.proto +++ b/proto/viam/component/generic/v1/generic.proto @@ -15,6 +15,11 @@ service GenericService { option (google.api.http) = {post: "/viam/api/v1/component/generic/{name}/do_command"}; } + // GetStatus returns the status of the resource + rpc GetStatus(common.v1.GetStatusRequest) returns (common.v1.GetStatusResponse) { + option (google.api.http) = {get: "/viam/api/v1/component/generic/{name}/get_status"}; + } + // GetGeometries returns the geometries of the component in their current configuration rpc GetGeometries(common.v1.GetGeometriesRequest) returns (common.v1.GetGeometriesResponse) { option (google.api.http) = {get: "/viam/api/v1/component/generic/{name}/geometries"}; diff --git a/proto/viam/component/gripper/v1/gripper.proto b/proto/viam/component/gripper/v1/gripper.proto index f128d0a409..d843a81e9f 100644 --- a/proto/viam/component/gripper/v1/gripper.proto +++ b/proto/viam/component/gripper/v1/gripper.proto @@ -43,6 +43,11 @@ service GripperService { option (google.api.http) = {post: "/viam/api/v1/component/gripper/{name}/do_command"}; } + // GetStatus returns the status of the resource + rpc GetStatus(common.v1.GetStatusRequest) returns (common.v1.GetStatusResponse) { + option (google.api.http) = {get: "/viam/api/v1/component/gripper/{name}/get_status"}; + } + // GetGeometries returns the geometries of the component in their current configuration rpc GetGeometries(common.v1.GetGeometriesRequest) returns (common.v1.GetGeometriesResponse) { option (google.api.http) = {get: "/viam/api/v1/component/gripper/{name}/geometries"}; diff --git a/proto/viam/component/inputcontroller/v1/input_controller.proto b/proto/viam/component/inputcontroller/v1/input_controller.proto index 2260c7cbe0..d4cece9a60 100644 --- a/proto/viam/component/inputcontroller/v1/input_controller.proto +++ b/proto/viam/component/inputcontroller/v1/input_controller.proto @@ -38,6 +38,11 @@ service InputControllerService { option (google.api.http) = {post: "/viam/api/v1/component/input/{name}/do_command"}; } + // GetStatus returns the status of the resource + rpc GetStatus(common.v1.GetStatusRequest) returns (common.v1.GetStatusResponse) { + option (google.api.http) = {get: "/viam/api/v1/component/input/{name}/get_status"}; + } + // GetGeometries returns the geometries of the component in their current configuration rpc GetGeometries(common.v1.GetGeometriesRequest) returns (common.v1.GetGeometriesResponse) { option (google.api.http) = {get: "/viam/api/v1/component/input/{name}/geometries"}; diff --git a/proto/viam/component/motor/v1/motor.proto b/proto/viam/component/motor/v1/motor.proto index 8adad93b73..a2c733bae1 100644 --- a/proto/viam/component/motor/v1/motor.proto +++ b/proto/viam/component/motor/v1/motor.proto @@ -80,6 +80,11 @@ service MotorService { option (google.api.http) = {post: "/viam/api/v1/component/motor/{name}/do_command"}; } + // GetStatus returns the status of the resource + rpc GetStatus(common.v1.GetStatusRequest) returns (common.v1.GetStatusResponse) { + option (google.api.http) = {get: "/viam/api/v1/component/motor/{name}/get_status"}; + } + // GetGeometries returns the geometries of the component in their current configuration rpc GetGeometries(common.v1.GetGeometriesRequest) returns (common.v1.GetGeometriesResponse) { option (google.api.http) = {get: "/viam/api/v1/component/motor/{name}/geometries"}; diff --git a/proto/viam/component/movementsensor/v1/movementsensor.proto b/proto/viam/component/movementsensor/v1/movementsensor.proto index 998c528257..c884a7c3f0 100644 --- a/proto/viam/component/movementsensor/v1/movementsensor.proto +++ b/proto/viam/component/movementsensor/v1/movementsensor.proto @@ -46,6 +46,11 @@ service MovementSensorService { option (google.api.http) = {post: "/viam/api/v1/component/movementsensor/{name}/do_command"}; } + // GetStatus returns the status of the resource + rpc GetStatus(common.v1.GetStatusRequest) returns (common.v1.GetStatusResponse) { + option (google.api.http) = {get: "/viam/api/v1/component/movementsensor/{name}/get_status"}; + } + // GetGeometries returns the geometries of the component in their current configuration rpc GetGeometries(common.v1.GetGeometriesRequest) returns (common.v1.GetGeometriesResponse) { option (google.api.http) = {get: "/viam/api/v1/component/movementsensor/{name}/geometries"}; diff --git a/proto/viam/component/posetracker/v1/pose_tracker.proto b/proto/viam/component/posetracker/v1/pose_tracker.proto index 424e463bcf..7587980337 100644 --- a/proto/viam/component/posetracker/v1/pose_tracker.proto +++ b/proto/viam/component/posetracker/v1/pose_tracker.proto @@ -21,6 +21,11 @@ service PoseTrackerService { option (google.api.http) = {post: "/viam/api/v1/component/pose_tracker/{name}/do_command"}; } + // GetStatus returns the status of the resource + rpc GetStatus(common.v1.GetStatusRequest) returns (common.v1.GetStatusResponse) { + option (google.api.http) = {get: "/viam/api/v1/component/pose_tracker/{name}/get_status"}; + } + // GetGeometries returns the geometries of the component in their current configuration rpc GetGeometries(common.v1.GetGeometriesRequest) returns (common.v1.GetGeometriesResponse) { option (google.api.http) = {get: "/viam/api/v1/component/pose_tracker/{name}/geometries"}; diff --git a/proto/viam/component/powersensor/v1/powersensor.proto b/proto/viam/component/powersensor/v1/powersensor.proto index fcd29fe813..69da358af4 100644 --- a/proto/viam/component/powersensor/v1/powersensor.proto +++ b/proto/viam/component/powersensor/v1/powersensor.proto @@ -35,6 +35,11 @@ service PowerSensorService { rpc DoCommand(common.v1.DoCommandRequest) returns (common.v1.DoCommandResponse) { option (google.api.http) = {post: "/viam/api/v1/component/power_sensor/{name}/do_command"}; } + + // GetStatus returns the status of the resource + rpc GetStatus(common.v1.GetStatusRequest) returns (common.v1.GetStatusResponse) { + option (google.api.http) = {get: "/viam/api/v1/component/power_sensor/{name}/get_status"}; + } } message GetVoltageRequest { diff --git a/proto/viam/component/sensor/v1/sensor.proto b/proto/viam/component/sensor/v1/sensor.proto index ba598e24e7..b641e61361 100644 --- a/proto/viam/component/sensor/v1/sensor.proto +++ b/proto/viam/component/sensor/v1/sensor.proto @@ -20,6 +20,11 @@ service SensorService { option (google.api.http) = {post: "/viam/api/v1/component/sensor/{name}/do_command"}; } + // GetStatus returns the status of the resource + rpc GetStatus(common.v1.GetStatusRequest) returns (common.v1.GetStatusResponse) { + option (google.api.http) = {get: "/viam/api/v1/component/sensor/{name}/get_status"}; + } + // GetGeometries returns the geometries of the component in their current configuration rpc GetGeometries(common.v1.GetGeometriesRequest) returns (common.v1.GetGeometriesResponse) { option (google.api.http) = {get: "/viam/api/v1/component/sensor/{name}/geometries"}; diff --git a/proto/viam/component/servo/v1/servo.proto b/proto/viam/component/servo/v1/servo.proto index fafdfc326c..9954421bad 100644 --- a/proto/viam/component/servo/v1/servo.proto +++ b/proto/viam/component/servo/v1/servo.proto @@ -38,6 +38,11 @@ service ServoService { option (google.api.http) = {post: "/viam/api/v1/component/servo/{name}/do_command"}; } + // GetStatus returns the status of the resource + rpc GetStatus(common.v1.GetStatusRequest) returns (common.v1.GetStatusResponse) { + option (google.api.http) = {get: "/viam/api/v1/component/servo/{name}/get_status"}; + } + // GetGeometries returns the geometries of the component in their current configuration rpc GetGeometries(common.v1.GetGeometriesRequest) returns (common.v1.GetGeometriesResponse) { option (google.api.http) = {get: "/viam/api/v1/component/servo/{name}/geometries"}; diff --git a/proto/viam/component/switch/v1/switch.proto b/proto/viam/component/switch/v1/switch.proto index 4bf57468b3..9f42abf90a 100644 --- a/proto/viam/component/switch/v1/switch.proto +++ b/proto/viam/component/switch/v1/switch.proto @@ -33,6 +33,11 @@ service SwitchService { rpc DoCommand(common.v1.DoCommandRequest) returns (common.v1.DoCommandResponse) { option (google.api.http) = {post: "/viam/api/v1/component/switch/{name}/do_command"}; } + + // GetStatus returns the status of the resource + rpc GetStatus(common.v1.GetStatusRequest) returns (common.v1.GetStatusResponse) { + option (google.api.http) = {get: "/viam/api/v1/component/switch/{name}/get_status"}; + } } message SetPositionRequest { diff --git a/proto/viam/service/datamanager/v1/data_manager.proto b/proto/viam/service/datamanager/v1/data_manager.proto index d596402fd9..fdf7578fd1 100644 --- a/proto/viam/service/datamanager/v1/data_manager.proto +++ b/proto/viam/service/datamanager/v1/data_manager.proto @@ -22,6 +22,11 @@ service DataManagerService { option (google.api.http) = {post: "/viam/api/v1/service/datamanager/{name}/do_command"}; } + // GetStatus returns the status of the resource + rpc GetStatus(common.v1.GetStatusRequest) returns (common.v1.GetStatusResponse) { + option (google.api.http) = {get: "/viam/api/v1/service/datamanager/{name}/get_status"}; + } + // UploadBinaryDataToDatasets uploads binary data to specified datasets. rpc UploadBinaryDataToDatasets(UploadBinaryDataToDatasetsRequest) returns (UploadBinaryDataToDatasetsResponse) { option (google.api.http) = {post: "/viam/api/v1/service/datamanager/{name}/upload_binary_data_to_datasets"}; diff --git a/proto/viam/service/discovery/v1/discovery.proto b/proto/viam/service/discovery/v1/discovery.proto index 4cda611460..377f2e00dd 100644 --- a/proto/viam/service/discovery/v1/discovery.proto +++ b/proto/viam/service/discovery/v1/discovery.proto @@ -20,6 +20,11 @@ service DiscoveryService { rpc DoCommand(common.v1.DoCommandRequest) returns (common.v1.DoCommandResponse) { option (google.api.http) = {post: "/viam/api/v1/service/discovery/{name}/do_command"}; } + + // GetStatus returns the status of the resource + rpc GetStatus(common.v1.GetStatusRequest) returns (common.v1.GetStatusResponse) { + option (google.api.http) = {get: "/viam/api/v1/service/discovery/{name}/get_status"}; + } } message DiscoverResourcesRequest { diff --git a/proto/viam/service/generic/v1/generic.proto b/proto/viam/service/generic/v1/generic.proto index 1b7903c6f7..d87be6faa6 100644 --- a/proto/viam/service/generic/v1/generic.proto +++ b/proto/viam/service/generic/v1/generic.proto @@ -14,4 +14,9 @@ service GenericService { rpc DoCommand(common.v1.DoCommandRequest) returns (common.v1.DoCommandResponse) { option (google.api.http) = {post: "/viam/api/v1/service/generic/{name}/do_command"}; } + + // GetStatus returns the status of the resource + rpc GetStatus(common.v1.GetStatusRequest) returns (common.v1.GetStatusResponse) { + option (google.api.http) = {get: "/viam/api/v1/service/generic/{name}/get_status"}; + } } diff --git a/proto/viam/service/mlmodel/v1/mlmodel.proto b/proto/viam/service/mlmodel/v1/mlmodel.proto index 60e3cf9829..2d6546dbcf 100644 --- a/proto/viam/service/mlmodel/v1/mlmodel.proto +++ b/proto/viam/service/mlmodel/v1/mlmodel.proto @@ -2,6 +2,7 @@ syntax = "proto3"; package viam.service.mlmodel.v1; +import "common/v1/common.proto"; import "google/api/annotations.proto"; import "google/protobuf/struct.proto"; @@ -19,6 +20,11 @@ service MLModelService { rpc Metadata(MetadataRequest) returns (MetadataResponse) { option (google.api.http) = {get: "/viam/api/v1/service/mlmodel/{name}/metadata"}; } + + // GetStatus returns the status of the resource + rpc GetStatus(common.v1.GetStatusRequest) returns (common.v1.GetStatusResponse) { + option (google.api.http) = {get: "/viam/api/v1/service/mlmodel/{name}/get_status"}; + } } message InferRequest { diff --git a/proto/viam/service/motion/v1/motion.proto b/proto/viam/service/motion/v1/motion.proto index 0ecdea9959..576030327e 100644 --- a/proto/viam/service/motion/v1/motion.proto +++ b/proto/viam/service/motion/v1/motion.proto @@ -64,6 +64,11 @@ service MotionService { rpc DoCommand(common.v1.DoCommandRequest) returns (common.v1.DoCommandResponse) { option (google.api.http) = {post: "/viam/api/v1/service/motion/{name}/do_command"}; } + + // GetStatus returns the status of the resource + rpc GetStatus(common.v1.GetStatusRequest) returns (common.v1.GetStatusResponse) { + option (google.api.http) = {get: "/viam/api/v1/service/motion/{name}/get_status"}; + } } // Moves any component on the robot to a specified destination which can be from the reference frame of any other component on the robot. diff --git a/proto/viam/service/navigation/v1/navigation.proto b/proto/viam/service/navigation/v1/navigation.proto index e57c324661..e16757d88a 100644 --- a/proto/viam/service/navigation/v1/navigation.proto +++ b/proto/viam/service/navigation/v1/navigation.proto @@ -53,6 +53,11 @@ service NavigationService { rpc DoCommand(common.v1.DoCommandRequest) returns (common.v1.DoCommandResponse) { option (google.api.http) = {post: "/viam/api/v1/service/navigation/{name}/do_command"}; } + + // GetStatus returns the status of the resource + rpc GetStatus(common.v1.GetStatusRequest) returns (common.v1.GetStatusResponse) { + option (google.api.http) = {get: "/viam/api/v1/service/navigation/{name}/get_status"}; + } } // MapType represents the various types of maps the navigation service can ingest. diff --git a/proto/viam/service/sensors/v1/sensors.proto b/proto/viam/service/sensors/v1/sensors.proto index af33f00c2f..7e8d375a5a 100644 --- a/proto/viam/service/sensors/v1/sensors.proto +++ b/proto/viam/service/sensors/v1/sensors.proto @@ -30,6 +30,11 @@ service SensorsService { option (google.api.http) = {post: "/viam/api/v1/service/sensors/{name}/do_command"}; option deprecated = true; } + + // GetStatus returns the status of the resource + rpc GetStatus(common.v1.GetStatusRequest) returns (common.v1.GetStatusResponse) { + option (google.api.http) = {get: "/viam/api/v1/service/sensors/{name}/get_status"}; + } } // The sensors service messages are deprecated diff --git a/proto/viam/service/shell/v1/shell.proto b/proto/viam/service/shell/v1/shell.proto index 0fe732f374..76bb18cdb9 100644 --- a/proto/viam/service/shell/v1/shell.proto +++ b/proto/viam/service/shell/v1/shell.proto @@ -39,6 +39,11 @@ service ShellService { rpc DoCommand(common.v1.DoCommandRequest) returns (common.v1.DoCommandResponse) { option (google.api.http) = {post: "/viam/api/v1/service/shell/{name}/do_command"}; } + + // GetStatus returns the status of the resource + rpc GetStatus(common.v1.GetStatusRequest) returns (common.v1.GetStatusResponse) { + option (google.api.http) = {get: "/viam/api/v1/service/shell/{name}/get_status"}; + } } message ShellRequest { diff --git a/proto/viam/service/slam/v1/slam.proto b/proto/viam/service/slam/v1/slam.proto index dd882b1b49..44f7a82812 100644 --- a/proto/viam/service/slam/v1/slam.proto +++ b/proto/viam/service/slam/v1/slam.proto @@ -40,6 +40,11 @@ service SLAMService { rpc DoCommand(common.v1.DoCommandRequest) returns (common.v1.DoCommandResponse) { option (google.api.http) = {post: "/viam/api/v1/service/slam/{name}/do_command"}; } + + // GetStatus returns the status of the resource + rpc GetStatus(common.v1.GetStatusRequest) returns (common.v1.GetStatusResponse) { + option (google.api.http) = {get: "/viam/api/v1/service/slam/{name}/get_status"}; + } } // MappingMode represnts the various form of mapping and localizing SLAM can perform. diff --git a/proto/viam/service/video/v1/video.proto b/proto/viam/service/video/v1/video.proto index 3c48162c63..cc00a13dbb 100644 --- a/proto/viam/service/video/v1/video.proto +++ b/proto/viam/service/video/v1/video.proto @@ -20,6 +20,11 @@ service VideoService { rpc DoCommand(common.v1.DoCommandRequest) returns (common.v1.DoCommandResponse) { option (google.api.http) = {post: "/viam/api/v1/service/video/{name}/do_command"}; } + + // GetStatus returns the status of the resource + rpc GetStatus(common.v1.GetStatusRequest) returns (common.v1.GetStatusResponse) { + option (google.api.http) = {get: "/viam/api/v1/service/video/{name}/get_status"}; + } } message GetVideoRequest { diff --git a/proto/viam/service/vision/v1/vision.proto b/proto/viam/service/vision/v1/vision.proto index f23ea9f37f..0db06d7556 100644 --- a/proto/viam/service/vision/v1/vision.proto +++ b/proto/viam/service/vision/v1/vision.proto @@ -52,6 +52,11 @@ service VisionService { rpc DoCommand(common.v1.DoCommandRequest) returns (common.v1.DoCommandResponse) { option (google.api.http) = {post: "/viam/api/v1/service/vision/{name}/do_command"}; } + + // GetStatus returns the status of the resource + rpc GetStatus(common.v1.GetStatusRequest) returns (common.v1.GetStatusResponse) { + option (google.api.http) = {get: "/viam/api/v1/service/vision/{name}/get_status"}; + } } message GetDetectionsRequest { diff --git a/proto/viam/service/worldstatestore/v1/world_state_store.proto b/proto/viam/service/worldstatestore/v1/world_state_store.proto index 5fd3022ea8..6be25aa6e3 100644 --- a/proto/viam/service/worldstatestore/v1/world_state_store.proto +++ b/proto/viam/service/worldstatestore/v1/world_state_store.proto @@ -26,6 +26,11 @@ service WorldStateStoreService { rpc DoCommand(common.v1.DoCommandRequest) returns (common.v1.DoCommandResponse) { option (google.api.http) = {post: "/viam/api/v1/service/worldstatestore/{name}/do_command"}; } + + // GetStatus returns the status of the resource + rpc GetStatus(common.v1.GetStatusRequest) returns (common.v1.GetStatusResponse) { + option (google.api.http) = {get: "/viam/api/v1/service/worldstatestore/{name}/get_status"}; + } } message ListUUIDsRequest { diff --git a/service/datamanager/v1/data_manager.pb.go b/service/datamanager/v1/data_manager.pb.go index cb61e03e2f..12854ef726 100644 --- a/service/datamanager/v1/data_manager.pb.go +++ b/service/datamanager/v1/data_manager.pb.go @@ -275,7 +275,7 @@ var file_service_datamanager_v1_data_manager_proto_rawDesc = []byte{ 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, 0x24, 0x0a, 0x22, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x54, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x32, 0xab, 0x04, 0x0a, 0x12, 0x44, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x65, 0x32, 0xba, 0x05, 0x0a, 0x12, 0x44, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x95, 0x01, 0x0a, 0x04, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x28, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, @@ -295,27 +295,36 @@ var file_service_datamanager_v1_data_manager_proto_rawDesc = []byte{ 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x64, 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, - 0xed, 0x01, 0x0a, 0x1a, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, - 0x44, 0x61, 0x74, 0x61, 0x54, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x12, 0x3e, - 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x61, - 0x74, 0x61, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x6c, - 0x6f, 0x61, 0x64, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x54, 0x6f, 0x44, - 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3f, - 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x61, - 0x74, 0x61, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x6c, - 0x6f, 0x61, 0x64, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x54, 0x6f, 0x44, - 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x4e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x48, 0x22, 0x46, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x64, 0x61, - 0x74, 0x61, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, - 0x2f, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x5f, 0x64, - 0x61, 0x74, 0x61, 0x5f, 0x74, 0x6f, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x42, - 0x49, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, - 0x76, 0x31, 0x5a, 0x26, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x64, 0x61, 0x74, 0x61, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x8c, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x2e, + 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x21, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x3a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x12, 0x32, 0x2f, 0x76, 0x69, 0x61, + 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2f, 0x64, 0x61, 0x74, 0x61, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2f, 0x7b, 0x6e, 0x61, + 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0xed, + 0x01, 0x0a, 0x1a, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x44, + 0x61, 0x74, 0x61, 0x54, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x12, 0x3e, 0x2e, + 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x6c, 0x6f, + 0x61, 0x64, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x54, 0x6f, 0x44, 0x61, + 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3f, 0x2e, + 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x6c, 0x6f, + 0x61, 0x64, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x54, 0x6f, 0x44, 0x61, + 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4e, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x48, 0x22, 0x46, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x64, 0x61, 0x74, + 0x61, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, + 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x5f, 0x64, 0x61, + 0x74, 0x61, 0x5f, 0x74, 0x6f, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x42, 0x49, + 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, + 0x31, 0x5a, 0x26, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -339,7 +348,9 @@ var file_service_datamanager_v1_data_manager_proto_goTypes = []any{ (*structpb.Struct)(nil), // 4: google.protobuf.Struct (v1.MimeType)(0), // 5: viam.app.datasync.v1.MimeType (*v11.DoCommandRequest)(nil), // 6: viam.common.v1.DoCommandRequest - (*v11.DoCommandResponse)(nil), // 7: viam.common.v1.DoCommandResponse + (*v11.GetStatusRequest)(nil), // 7: viam.common.v1.GetStatusRequest + (*v11.DoCommandResponse)(nil), // 8: viam.common.v1.DoCommandResponse + (*v11.GetStatusResponse)(nil), // 9: viam.common.v1.GetStatusResponse } var file_service_datamanager_v1_data_manager_proto_depIdxs = []int32{ 4, // 0: viam.service.datamanager.v1.SyncRequest.extra:type_name -> google.protobuf.Struct @@ -347,12 +358,14 @@ var file_service_datamanager_v1_data_manager_proto_depIdxs = []int32{ 4, // 2: viam.service.datamanager.v1.UploadBinaryDataToDatasetsRequest.extra:type_name -> google.protobuf.Struct 0, // 3: viam.service.datamanager.v1.DataManagerService.Sync:input_type -> viam.service.datamanager.v1.SyncRequest 6, // 4: viam.service.datamanager.v1.DataManagerService.DoCommand:input_type -> viam.common.v1.DoCommandRequest - 2, // 5: viam.service.datamanager.v1.DataManagerService.UploadBinaryDataToDatasets:input_type -> viam.service.datamanager.v1.UploadBinaryDataToDatasetsRequest - 1, // 6: viam.service.datamanager.v1.DataManagerService.Sync:output_type -> viam.service.datamanager.v1.SyncResponse - 7, // 7: viam.service.datamanager.v1.DataManagerService.DoCommand:output_type -> viam.common.v1.DoCommandResponse - 3, // 8: viam.service.datamanager.v1.DataManagerService.UploadBinaryDataToDatasets:output_type -> viam.service.datamanager.v1.UploadBinaryDataToDatasetsResponse - 6, // [6:9] is the sub-list for method output_type - 3, // [3:6] is the sub-list for method input_type + 7, // 5: viam.service.datamanager.v1.DataManagerService.GetStatus:input_type -> viam.common.v1.GetStatusRequest + 2, // 6: viam.service.datamanager.v1.DataManagerService.UploadBinaryDataToDatasets:input_type -> viam.service.datamanager.v1.UploadBinaryDataToDatasetsRequest + 1, // 7: viam.service.datamanager.v1.DataManagerService.Sync:output_type -> viam.service.datamanager.v1.SyncResponse + 8, // 8: viam.service.datamanager.v1.DataManagerService.DoCommand:output_type -> viam.common.v1.DoCommandResponse + 9, // 9: viam.service.datamanager.v1.DataManagerService.GetStatus:output_type -> viam.common.v1.GetStatusResponse + 3, // 10: viam.service.datamanager.v1.DataManagerService.UploadBinaryDataToDatasets:output_type -> viam.service.datamanager.v1.UploadBinaryDataToDatasetsResponse + 7, // [7:11] is the sub-list for method output_type + 3, // [3:7] is the sub-list for method input_type 3, // [3:3] is the sub-list for extension type_name 3, // [3:3] is the sub-list for extension extendee 0, // [0:3] is the sub-list for field type_name diff --git a/service/datamanager/v1/data_manager.pb.gw.go b/service/datamanager/v1/data_manager.pb.gw.go index 1c838e55d1..0deb8418d5 100644 --- a/service/datamanager/v1/data_manager.pb.gw.go +++ b/service/datamanager/v1/data_manager.pb.gw.go @@ -172,6 +172,58 @@ func local_request_DataManagerService_DoCommand_0(ctx context.Context, marshaler } +func request_DataManagerService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, client DataManagerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1_1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_DataManagerService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, server DataManagerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1_1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetStatus(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_DataManagerService_UploadBinaryDataToDatasets_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) @@ -298,6 +350,31 @@ func RegisterDataManagerServiceHandlerServer(ctx context.Context, mux *runtime.S }) + mux.Handle("GET", pattern_DataManagerService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.service.datamanager.v1.DataManagerService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/service/datamanager/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_DataManagerService_GetStatus_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_DataManagerService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("POST", pattern_DataManagerService_UploadBinaryDataToDatasets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -408,6 +485,28 @@ func RegisterDataManagerServiceHandlerClient(ctx context.Context, mux *runtime.S }) + mux.Handle("GET", pattern_DataManagerService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.datamanager.v1.DataManagerService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/service/datamanager/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_DataManagerService_GetStatus_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_DataManagerService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("POST", pattern_DataManagerService_UploadBinaryDataToDatasets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -438,6 +537,8 @@ var ( pattern_DataManagerService_DoCommand_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "datamanager", "name", "do_command"}, "")) + pattern_DataManagerService_GetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "datamanager", "name", "get_status"}, "")) + pattern_DataManagerService_UploadBinaryDataToDatasets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "datamanager", "name", "upload_binary_data_to_datasets"}, "")) ) @@ -446,5 +547,7 @@ var ( forward_DataManagerService_DoCommand_0 = runtime.ForwardResponseMessage + forward_DataManagerService_GetStatus_0 = runtime.ForwardResponseMessage + forward_DataManagerService_UploadBinaryDataToDatasets_0 = runtime.ForwardResponseMessage ) diff --git a/service/datamanager/v1/data_manager_grpc.pb.go b/service/datamanager/v1/data_manager_grpc.pb.go index 9bac68e35b..7e9126a506 100644 --- a/service/datamanager/v1/data_manager_grpc.pb.go +++ b/service/datamanager/v1/data_manager_grpc.pb.go @@ -27,6 +27,8 @@ type DataManagerServiceClient interface { Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(ctx context.Context, in *v1.DoCommandRequest, opts ...grpc.CallOption) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) // UploadBinaryDataToDatasets uploads binary data to specified datasets. UploadBinaryDataToDatasets(ctx context.Context, in *UploadBinaryDataToDatasetsRequest, opts ...grpc.CallOption) (*UploadBinaryDataToDatasetsResponse, error) } @@ -57,6 +59,15 @@ func (c *dataManagerServiceClient) DoCommand(ctx context.Context, in *v1.DoComma return out, nil } +func (c *dataManagerServiceClient) GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) { + out := new(v1.GetStatusResponse) + err := c.cc.Invoke(ctx, "/viam.service.datamanager.v1.DataManagerService/GetStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *dataManagerServiceClient) UploadBinaryDataToDatasets(ctx context.Context, in *UploadBinaryDataToDatasetsRequest, opts ...grpc.CallOption) (*UploadBinaryDataToDatasetsResponse, error) { out := new(UploadBinaryDataToDatasetsResponse) err := c.cc.Invoke(ctx, "/viam.service.datamanager.v1.DataManagerService/UploadBinaryDataToDatasets", in, out, opts...) @@ -74,6 +85,8 @@ type DataManagerServiceServer interface { Sync(context.Context, *SyncRequest) (*SyncResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) // UploadBinaryDataToDatasets uploads binary data to specified datasets. UploadBinaryDataToDatasets(context.Context, *UploadBinaryDataToDatasetsRequest) (*UploadBinaryDataToDatasetsResponse, error) mustEmbedUnimplementedDataManagerServiceServer() @@ -89,6 +102,9 @@ func (UnimplementedDataManagerServiceServer) Sync(context.Context, *SyncRequest) func (UnimplementedDataManagerServiceServer) DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DoCommand not implemented") } +func (UnimplementedDataManagerServiceServer) GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented") +} func (UnimplementedDataManagerServiceServer) UploadBinaryDataToDatasets(context.Context, *UploadBinaryDataToDatasetsRequest) (*UploadBinaryDataToDatasetsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UploadBinaryDataToDatasets not implemented") } @@ -141,6 +157,24 @@ func _DataManagerService_DoCommand_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _DataManagerService_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataManagerServiceServer).GetStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.service.datamanager.v1.DataManagerService/GetStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataManagerServiceServer).GetStatus(ctx, req.(*v1.GetStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _DataManagerService_UploadBinaryDataToDatasets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UploadBinaryDataToDatasetsRequest) if err := dec(in); err != nil { @@ -174,6 +208,10 @@ var DataManagerService_ServiceDesc = grpc.ServiceDesc{ MethodName: "DoCommand", Handler: _DataManagerService_DoCommand_Handler, }, + { + MethodName: "GetStatus", + Handler: _DataManagerService_GetStatus_Handler, + }, { MethodName: "UploadBinaryDataToDatasets", Handler: _DataManagerService_UploadBinaryDataToDatasets_Handler, diff --git a/service/discovery/v1/discovery.pb.go b/service/discovery/v1/discovery.pb.go index 5bb66b1fec..2c4ca34b19 100644 --- a/service/discovery/v1/discovery.pb.go +++ b/service/discovery/v1/discovery.pb.go @@ -150,7 +150,7 @@ var file_service_discovery_v1_discovery_proto_rawDesc = []byte{ 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, - 0x65, 0x72, 0x69, 0x65, 0x73, 0x32, 0xcf, 0x02, 0x0a, 0x10, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x69, 0x65, 0x73, 0x32, 0xdc, 0x03, 0x0a, 0x10, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xad, 0x01, 0x0a, 0x11, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x33, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, @@ -171,12 +171,21 @@ var file_service_discovery_v1_discovery_proto_rawDesc = []byte{ 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x22, 0x30, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x64, 0x6f, 0x5f, - 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x42, 0x44, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x76, - 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x5a, 0x23, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, - 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x8a, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x32, 0x12, 0x30, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, + 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, + 0x72, 0x79, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x42, 0x44, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x5a, 0x23, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x64, + 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -198,17 +207,21 @@ var file_service_discovery_v1_discovery_proto_goTypes = []any{ (*structpb.Struct)(nil), // 2: google.protobuf.Struct (*v1.ComponentConfig)(nil), // 3: viam.app.v1.ComponentConfig (*v11.DoCommandRequest)(nil), // 4: viam.common.v1.DoCommandRequest - (*v11.DoCommandResponse)(nil), // 5: viam.common.v1.DoCommandResponse + (*v11.GetStatusRequest)(nil), // 5: viam.common.v1.GetStatusRequest + (*v11.DoCommandResponse)(nil), // 6: viam.common.v1.DoCommandResponse + (*v11.GetStatusResponse)(nil), // 7: viam.common.v1.GetStatusResponse } var file_service_discovery_v1_discovery_proto_depIdxs = []int32{ 2, // 0: viam.service.discovery.v1.DiscoverResourcesRequest.extra:type_name -> google.protobuf.Struct 3, // 1: viam.service.discovery.v1.DiscoverResourcesResponse.discoveries:type_name -> viam.app.v1.ComponentConfig 0, // 2: viam.service.discovery.v1.DiscoveryService.DiscoverResources:input_type -> viam.service.discovery.v1.DiscoverResourcesRequest 4, // 3: viam.service.discovery.v1.DiscoveryService.DoCommand:input_type -> viam.common.v1.DoCommandRequest - 1, // 4: viam.service.discovery.v1.DiscoveryService.DiscoverResources:output_type -> viam.service.discovery.v1.DiscoverResourcesResponse - 5, // 5: viam.service.discovery.v1.DiscoveryService.DoCommand:output_type -> viam.common.v1.DoCommandResponse - 4, // [4:6] is the sub-list for method output_type - 2, // [2:4] is the sub-list for method input_type + 5, // 4: viam.service.discovery.v1.DiscoveryService.GetStatus:input_type -> viam.common.v1.GetStatusRequest + 1, // 5: viam.service.discovery.v1.DiscoveryService.DiscoverResources:output_type -> viam.service.discovery.v1.DiscoverResourcesResponse + 6, // 6: viam.service.discovery.v1.DiscoveryService.DoCommand:output_type -> viam.common.v1.DoCommandResponse + 7, // 7: viam.service.discovery.v1.DiscoveryService.GetStatus:output_type -> viam.common.v1.GetStatusResponse + 5, // [5:8] is the sub-list for method output_type + 2, // [2:5] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name 2, // [2:2] is the sub-list for extension extendee 0, // [0:2] is the sub-list for field type_name diff --git a/service/discovery/v1/discovery.pb.gw.go b/service/discovery/v1/discovery.pb.gw.go index cf603e4715..8e967dabfd 100644 --- a/service/discovery/v1/discovery.pb.gw.go +++ b/service/discovery/v1/discovery.pb.gw.go @@ -172,6 +172,58 @@ func local_request_DiscoveryService_DoCommand_0(ctx context.Context, marshaler r } +func request_DiscoveryService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, client DiscoveryServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1_0.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_DiscoveryService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, server DiscoveryServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1_0.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetStatus(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterDiscoveryServiceHandlerServer registers the http handlers for service DiscoveryService to "mux". // UnaryRPC :call DiscoveryServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -228,6 +280,31 @@ func RegisterDiscoveryServiceHandlerServer(ctx context.Context, mux *runtime.Ser }) + mux.Handle("GET", pattern_DiscoveryService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.service.discovery.v1.DiscoveryService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/service/discovery/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_DiscoveryService_GetStatus_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_DiscoveryService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -313,6 +390,28 @@ func RegisterDiscoveryServiceHandlerClient(ctx context.Context, mux *runtime.Ser }) + mux.Handle("GET", pattern_DiscoveryService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.discovery.v1.DiscoveryService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/service/discovery/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_DiscoveryService_GetStatus_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_DiscoveryService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -320,10 +419,14 @@ var ( pattern_DiscoveryService_DiscoverResources_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"viam", "api", "v1", "service", "name", "discovery"}, "")) pattern_DiscoveryService_DoCommand_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "discovery", "name", "do_command"}, "")) + + pattern_DiscoveryService_GetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "discovery", "name", "get_status"}, "")) ) var ( forward_DiscoveryService_DiscoverResources_0 = runtime.ForwardResponseMessage forward_DiscoveryService_DoCommand_0 = runtime.ForwardResponseMessage + + forward_DiscoveryService_GetStatus_0 = runtime.ForwardResponseMessage ) diff --git a/service/discovery/v1/discovery_grpc.pb.go b/service/discovery/v1/discovery_grpc.pb.go index be0238dfe6..f6a7808656 100644 --- a/service/discovery/v1/discovery_grpc.pb.go +++ b/service/discovery/v1/discovery_grpc.pb.go @@ -27,6 +27,8 @@ type DiscoveryServiceClient interface { DiscoverResources(ctx context.Context, in *DiscoverResourcesRequest, opts ...grpc.CallOption) (*DiscoverResourcesResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(ctx context.Context, in *v1.DoCommandRequest, opts ...grpc.CallOption) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) } type discoveryServiceClient struct { @@ -55,6 +57,15 @@ func (c *discoveryServiceClient) DoCommand(ctx context.Context, in *v1.DoCommand return out, nil } +func (c *discoveryServiceClient) GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) { + out := new(v1.GetStatusResponse) + err := c.cc.Invoke(ctx, "/viam.service.discovery.v1.DiscoveryService/GetStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // DiscoveryServiceServer is the server API for DiscoveryService service. // All implementations must embed UnimplementedDiscoveryServiceServer // for forward compatibility @@ -63,6 +74,8 @@ type DiscoveryServiceServer interface { DiscoverResources(context.Context, *DiscoverResourcesRequest) (*DiscoverResourcesResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) mustEmbedUnimplementedDiscoveryServiceServer() } @@ -76,6 +89,9 @@ func (UnimplementedDiscoveryServiceServer) DiscoverResources(context.Context, *D func (UnimplementedDiscoveryServiceServer) DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DoCommand not implemented") } +func (UnimplementedDiscoveryServiceServer) GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented") +} func (UnimplementedDiscoveryServiceServer) mustEmbedUnimplementedDiscoveryServiceServer() {} // UnsafeDiscoveryServiceServer may be embedded to opt out of forward compatibility for this service. @@ -125,6 +141,24 @@ func _DiscoveryService_DoCommand_Handler(srv interface{}, ctx context.Context, d return interceptor(ctx, in, info, handler) } +func _DiscoveryService_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DiscoveryServiceServer).GetStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.service.discovery.v1.DiscoveryService/GetStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DiscoveryServiceServer).GetStatus(ctx, req.(*v1.GetStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + // DiscoveryService_ServiceDesc is the grpc.ServiceDesc for DiscoveryService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -140,6 +174,10 @@ var DiscoveryService_ServiceDesc = grpc.ServiceDesc{ MethodName: "DoCommand", Handler: _DiscoveryService_DoCommand_Handler, }, + { + MethodName: "GetStatus", + Handler: _DiscoveryService_GetStatus_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "service/discovery/v1/discovery.proto", diff --git a/service/generic/v1/generic.pb.go b/service/generic/v1/generic.pb.go index ce76e04a61..815e7ec52b 100644 --- a/service/generic/v1/generic.pb.go +++ b/service/generic/v1/generic.pb.go @@ -31,7 +31,7 @@ var file_service_generic_v1_generic_proto_rawDesc = []byte{ 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x32, 0x9b, 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, + 0x6f, 0x32, 0xa6, 0x02, 0x0a, 0x0e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x88, 0x01, 0x0a, 0x09, 0x44, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x20, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, @@ -40,23 +40,36 @@ var file_service_generic_v1_generic_proto_rawDesc = []byte{ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x22, 0x2e, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x2f, 0x7b, 0x6e, - 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x64, 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x42, - 0x41, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x2e, 0x76, 0x31, 0x5a, 0x22, - 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x2f, - 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x64, 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, + 0x88, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x2e, + 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x21, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x12, 0x2e, 0x2f, 0x76, 0x69, 0x61, + 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, + 0x67, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x41, 0x0a, 0x1b, 0x63, 0x6f, + 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x2e, 0x76, 0x31, 0x5a, 0x22, 0x67, 0x6f, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var file_service_generic_v1_generic_proto_goTypes = []any{ (*v1.DoCommandRequest)(nil), // 0: viam.common.v1.DoCommandRequest - (*v1.DoCommandResponse)(nil), // 1: viam.common.v1.DoCommandResponse + (*v1.GetStatusRequest)(nil), // 1: viam.common.v1.GetStatusRequest + (*v1.DoCommandResponse)(nil), // 2: viam.common.v1.DoCommandResponse + (*v1.GetStatusResponse)(nil), // 3: viam.common.v1.GetStatusResponse } var file_service_generic_v1_generic_proto_depIdxs = []int32{ 0, // 0: viam.service.generic.v1.GenericService.DoCommand:input_type -> viam.common.v1.DoCommandRequest - 1, // 1: viam.service.generic.v1.GenericService.DoCommand:output_type -> viam.common.v1.DoCommandResponse - 1, // [1:2] is the sub-list for method output_type - 0, // [0:1] is the sub-list for method input_type + 1, // 1: viam.service.generic.v1.GenericService.GetStatus:input_type -> viam.common.v1.GetStatusRequest + 2, // 2: viam.service.generic.v1.GenericService.DoCommand:output_type -> viam.common.v1.DoCommandResponse + 3, // 3: viam.service.generic.v1.GenericService.GetStatus:output_type -> viam.common.v1.GetStatusResponse + 2, // [2:4] is the sub-list for method output_type + 0, // [0:2] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name diff --git a/service/generic/v1/generic.pb.gw.go b/service/generic/v1/generic.pb.gw.go index b7719337e9..bb14633d2f 100644 --- a/service/generic/v1/generic.pb.gw.go +++ b/service/generic/v1/generic.pb.gw.go @@ -102,6 +102,58 @@ func local_request_GenericService_DoCommand_0(ctx context.Context, marshaler run } +func request_GenericService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, client GenericServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_GenericService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, server GenericServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetStatus(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterGenericServiceHandlerServer registers the http handlers for service GenericService to "mux". // UnaryRPC :call GenericServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -133,6 +185,31 @@ func RegisterGenericServiceHandlerServer(ctx context.Context, mux *runtime.Serve }) + mux.Handle("GET", pattern_GenericService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.service.generic.v1.GenericService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/service/generic/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_GenericService_GetStatus_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_GenericService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -196,13 +273,39 @@ func RegisterGenericServiceHandlerClient(ctx context.Context, mux *runtime.Serve }) + mux.Handle("GET", pattern_GenericService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.generic.v1.GenericService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/service/generic/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_GenericService_GetStatus_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_GenericService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } var ( pattern_GenericService_DoCommand_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "generic", "name", "do_command"}, "")) + + pattern_GenericService_GetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "generic", "name", "get_status"}, "")) ) var ( forward_GenericService_DoCommand_0 = runtime.ForwardResponseMessage + + forward_GenericService_GetStatus_0 = runtime.ForwardResponseMessage ) diff --git a/service/generic/v1/generic_grpc.pb.go b/service/generic/v1/generic_grpc.pb.go index b562a3897f..02aeb6e623 100644 --- a/service/generic/v1/generic_grpc.pb.go +++ b/service/generic/v1/generic_grpc.pb.go @@ -25,6 +25,8 @@ const _ = grpc.SupportPackageIsVersion7 type GenericServiceClient interface { // DoCommand sends/receives arbitrary commands DoCommand(ctx context.Context, in *v1.DoCommandRequest, opts ...grpc.CallOption) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) } type genericServiceClient struct { @@ -44,12 +46,23 @@ func (c *genericServiceClient) DoCommand(ctx context.Context, in *v1.DoCommandRe return out, nil } +func (c *genericServiceClient) GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) { + out := new(v1.GetStatusResponse) + err := c.cc.Invoke(ctx, "/viam.service.generic.v1.GenericService/GetStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // GenericServiceServer is the server API for GenericService service. // All implementations must embed UnimplementedGenericServiceServer // for forward compatibility type GenericServiceServer interface { // DoCommand sends/receives arbitrary commands DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) mustEmbedUnimplementedGenericServiceServer() } @@ -60,6 +73,9 @@ type UnimplementedGenericServiceServer struct { func (UnimplementedGenericServiceServer) DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DoCommand not implemented") } +func (UnimplementedGenericServiceServer) GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented") +} func (UnimplementedGenericServiceServer) mustEmbedUnimplementedGenericServiceServer() {} // UnsafeGenericServiceServer may be embedded to opt out of forward compatibility for this service. @@ -91,6 +107,24 @@ func _GenericService_DoCommand_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _GenericService_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GenericServiceServer).GetStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.service.generic.v1.GenericService/GetStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GenericServiceServer).GetStatus(ctx, req.(*v1.GetStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + // GenericService_ServiceDesc is the grpc.ServiceDesc for GenericService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -102,6 +136,10 @@ var GenericService_ServiceDesc = grpc.ServiceDesc{ MethodName: "DoCommand", Handler: _GenericService_DoCommand_Handler, }, + { + MethodName: "GetStatus", + Handler: _GenericService_GetStatus_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "service/generic/v1/generic.proto", diff --git a/service/mlmodel/v1/mlmodel.pb.go b/service/mlmodel/v1/mlmodel.pb.go index ae7c2aa112..fac15b9b4d 100644 --- a/service/mlmodel/v1/mlmodel.pb.go +++ b/service/mlmodel/v1/mlmodel.pb.go @@ -7,6 +7,7 @@ package v1 import ( + v1 "go.viam.com/api/common/v1" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -1229,204 +1230,214 @@ var file_service_mlmodel_v1_mlmodel_proto_rawDesc = []byte{ 0x0a, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, - 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xae, 0x01, 0x0a, 0x0c, 0x49, 0x6e, 0x66, 0x65, - 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x49, 0x0a, 0x0d, - 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x74, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6c, - 0x61, 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x52, 0x0c, 0x69, 0x6e, 0x70, 0x75, 0x74, - 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, - 0x18, 0x63, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, - 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x0a, 0x69, 0x6e, - 0x70, 0x75, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x22, 0x7b, 0x0a, 0x0d, 0x49, 0x6e, 0x66, 0x65, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0e, 0x6f, 0x75, 0x74, - 0x70, 0x75, 0x74, 0x5f, 0x74, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6c, 0x61, 0x74, - 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x52, 0x0d, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x54, - 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x02, - 0x10, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x5f, 0x64, 0x61, 0x74, 0x61, 0x22, 0x54, 0x0a, 0x0f, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x05, - 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x63, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, - 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, 0x51, 0x0a, 0x10, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x3d, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0xde, - 0x01, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x0a, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x69, - 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x69, 0x61, 0x6d, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, - 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, - 0x69, 0x6e, 0x70, 0x75, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x44, 0x0a, 0x0b, 0x6f, 0x75, 0x74, - 0x70, 0x75, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, - 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x6c, - 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x22, - 0xee, 0x01, 0x0a, 0x0a, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x70, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, - 0x52, 0x05, 0x73, 0x68, 0x61, 0x70, 0x65, 0x12, 0x48, 0x0a, 0x10, 0x61, 0x73, 0x73, 0x6f, 0x63, - 0x69, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, - 0x52, 0x0f, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x65, - 0x73, 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x63, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, - 0x22, 0x7f, 0x0a, 0x04, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, - 0x0a, 0x0a, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, - 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x54, 0x79, 0x70, - 0x65, 0x22, 0x28, 0x0a, 0x12, 0x46, 0x6c, 0x61, 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x44, - 0x61, 0x74, 0x61, 0x49, 0x6e, 0x74, 0x38, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x29, 0x0a, 0x13, 0x46, - 0x6c, 0x61, 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x44, 0x61, 0x74, 0x61, 0x55, 0x49, 0x6e, - 0x74, 0x38, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2d, 0x0a, 0x13, 0x46, 0x6c, 0x61, 0x74, 0x54, 0x65, - 0x6e, 0x73, 0x6f, 0x72, 0x44, 0x61, 0x74, 0x61, 0x49, 0x6e, 0x74, 0x31, 0x36, 0x12, 0x16, 0x0a, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x07, 0x42, 0x02, 0x10, 0x01, 0x52, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2e, 0x0a, 0x14, 0x46, 0x6c, 0x61, 0x74, 0x54, 0x65, 0x6e, - 0x73, 0x6f, 0x72, 0x44, 0x61, 0x74, 0x61, 0x55, 0x49, 0x6e, 0x74, 0x31, 0x36, 0x12, 0x16, 0x0a, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x07, 0x42, 0x02, 0x10, 0x01, 0x52, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2d, 0x0a, 0x13, 0x46, 0x6c, 0x61, 0x74, 0x54, 0x65, 0x6e, - 0x73, 0x6f, 0x72, 0x44, 0x61, 0x74, 0x61, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x16, 0x0a, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0f, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x22, 0x2e, 0x0a, 0x14, 0x46, 0x6c, 0x61, 0x74, 0x54, 0x65, 0x6e, 0x73, - 0x6f, 0x72, 0x44, 0x61, 0x74, 0x61, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x16, 0x0a, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x07, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x22, 0x2d, 0x0a, 0x13, 0x46, 0x6c, 0x61, 0x74, 0x54, 0x65, 0x6e, 0x73, - 0x6f, 0x72, 0x44, 0x61, 0x74, 0x61, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x16, 0x0a, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x10, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x22, 0x2e, 0x0a, 0x14, 0x46, 0x6c, 0x61, 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, - 0x72, 0x44, 0x61, 0x74, 0x61, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x16, 0x0a, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x06, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x22, 0x2d, 0x0a, 0x13, 0x46, 0x6c, 0x61, 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, - 0x72, 0x44, 0x61, 0x74, 0x61, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x16, 0x0a, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x02, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x22, 0x2e, 0x0a, 0x14, 0x46, 0x6c, 0x61, 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, - 0x44, 0x61, 0x74, 0x61, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x01, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x22, 0xf3, 0x06, 0x0a, 0x0a, 0x46, 0x6c, 0x61, 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, - 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x70, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x06, - 0x52, 0x05, 0x73, 0x68, 0x61, 0x70, 0x65, 0x12, 0x4e, 0x0a, 0x0b, 0x69, 0x6e, 0x74, 0x38, 0x5f, - 0x74, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x76, - 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x6c, 0x6d, 0x6f, - 0x64, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6c, 0x61, 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, - 0x72, 0x44, 0x61, 0x74, 0x61, 0x49, 0x6e, 0x74, 0x38, 0x48, 0x00, 0x52, 0x0a, 0x69, 0x6e, 0x74, - 0x38, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x12, 0x51, 0x0a, 0x0c, 0x75, 0x69, 0x6e, 0x74, 0x38, - 0x5f, 0x74, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, - 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x6c, 0x6d, - 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6c, 0x61, 0x74, 0x54, 0x65, 0x6e, 0x73, - 0x6f, 0x72, 0x44, 0x61, 0x74, 0x61, 0x55, 0x49, 0x6e, 0x74, 0x38, 0x48, 0x00, 0x52, 0x0b, 0x75, - 0x69, 0x6e, 0x74, 0x38, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x12, 0x51, 0x0a, 0x0c, 0x69, 0x6e, - 0x74, 0x31, 0x36, 0x5f, 0x74, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2c, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6c, 0x61, 0x74, 0x54, - 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x44, 0x61, 0x74, 0x61, 0x49, 0x6e, 0x74, 0x31, 0x36, 0x48, 0x00, - 0x52, 0x0b, 0x69, 0x6e, 0x74, 0x31, 0x36, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x12, 0x54, 0x0a, - 0x0d, 0x75, 0x69, 0x6e, 0x74, 0x31, 0x36, 0x5f, 0x74, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x46, - 0x6c, 0x61, 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x44, 0x61, 0x74, 0x61, 0x55, 0x49, 0x6e, - 0x74, 0x31, 0x36, 0x48, 0x00, 0x52, 0x0c, 0x75, 0x69, 0x6e, 0x74, 0x31, 0x36, 0x54, 0x65, 0x6e, - 0x73, 0x6f, 0x72, 0x12, 0x51, 0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x74, 0x65, 0x6e, - 0x73, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x76, 0x69, 0x61, 0x6d, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, - 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6c, 0x61, 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x44, 0x61, - 0x74, 0x61, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x48, 0x00, 0x52, 0x0b, 0x69, 0x6e, 0x74, 0x33, 0x32, - 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x12, 0x54, 0x0a, 0x0d, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, - 0x5f, 0x74, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, - 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x6c, 0x6d, - 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6c, 0x61, 0x74, 0x54, 0x65, 0x6e, 0x73, - 0x6f, 0x72, 0x44, 0x61, 0x74, 0x61, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x48, 0x00, 0x52, 0x0c, - 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x12, 0x51, 0x0a, 0x0c, - 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x74, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6c, 0x61, - 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x44, 0x61, 0x74, 0x61, 0x49, 0x6e, 0x74, 0x36, 0x34, - 0x48, 0x00, 0x52, 0x0b, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x12, - 0x54, 0x0a, 0x0d, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x74, 0x65, 0x6e, 0x73, 0x6f, 0x72, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x76, 0x31, - 0x2e, 0x46, 0x6c, 0x61, 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x44, 0x61, 0x74, 0x61, 0x55, - 0x49, 0x6e, 0x74, 0x36, 0x34, 0x48, 0x00, 0x52, 0x0c, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x54, - 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x12, 0x51, 0x0a, 0x0c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x5f, 0x74, - 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x76, 0x69, + 0x2e, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x1a, 0x16, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0xae, 0x01, 0x0a, 0x0c, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x49, 0x0a, 0x0d, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x74, 0x65, + 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6c, 0x61, 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, - 0x44, 0x61, 0x74, 0x61, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x66, 0x6c, 0x6f, - 0x61, 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x12, 0x54, 0x0a, 0x0d, 0x64, 0x6f, 0x75, 0x62, - 0x6c, 0x65, 0x5f, 0x74, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, - 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6c, 0x61, 0x74, 0x54, 0x65, - 0x6e, 0x73, 0x6f, 0x72, 0x44, 0x61, 0x74, 0x61, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x48, 0x00, - 0x52, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x42, 0x08, - 0x0a, 0x06, 0x74, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x22, 0xbb, 0x01, 0x0a, 0x0b, 0x46, 0x6c, 0x61, - 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x12, 0x4b, 0x0a, 0x07, 0x74, 0x65, 0x6e, 0x73, - 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x76, 0x69, 0x61, 0x6d, + 0x73, 0x52, 0x0c, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x12, + 0x2d, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x63, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x4a, 0x04, + 0x08, 0x02, 0x10, 0x03, 0x52, 0x0a, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, + 0x22, 0x7b, 0x0a, 0x0d, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x4b, 0x0a, 0x0e, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x74, 0x65, 0x6e, 0x73, + 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, - 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6c, 0x61, 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x2e, - 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x74, 0x65, - 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x1a, 0x5f, 0x0a, 0x0c, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 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, 0x39, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6c, 0x61, 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x52, + 0x0d, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x4a, 0x04, + 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x52, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x22, 0x54, 0x0a, + 0x0f, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x63, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x65, 0x78, + 0x74, 0x72, 0x61, 0x22, 0x51, 0x0a, 0x10, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x69, 0x61, 0x6d, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0xde, 0x01, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, + 0x0a, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x6e, 0x73, + 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x44, 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, + 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x76, 0x31, - 0x2e, 0x46, 0x6c, 0x61, 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, 0x60, 0x0a, 0x09, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x1b, 0x0a, 0x17, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x45, - 0x4e, 0x53, 0x4f, 0x52, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, - 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x45, 0x4e, 0x53, 0x4f, - 0x52, 0x5f, 0x41, 0x58, 0x49, 0x53, 0x10, 0x02, 0x32, 0xb4, 0x02, 0x0a, 0x0e, 0x4d, 0x4c, 0x4d, - 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x89, 0x01, 0x0a, 0x05, - 0x49, 0x6e, 0x66, 0x65, 0x72, 0x12, 0x25, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, + 0x2e, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x6f, 0x75, 0x74, + 0x70, 0x75, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xee, 0x01, 0x0a, 0x0a, 0x54, 0x65, 0x6e, 0x73, + 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, + 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x64, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, + 0x70, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, 0x05, 0x73, 0x68, 0x61, 0x70, 0x65, 0x12, + 0x48, 0x0a, 0x10, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, + 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x69, 0x61, 0x6d, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, + 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x0f, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, + 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x78, 0x74, + 0x72, 0x61, 0x18, 0x63, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, 0x7f, 0x0a, 0x04, 0x46, 0x69, 0x6c, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0a, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x76, 0x69, 0x61, + 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, + 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x22, 0x28, 0x0a, 0x12, 0x46, 0x6c, 0x61, + 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x44, 0x61, 0x74, 0x61, 0x49, 0x6e, 0x74, 0x38, 0x12, + 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x22, 0x29, 0x0a, 0x13, 0x46, 0x6c, 0x61, 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, + 0x72, 0x44, 0x61, 0x74, 0x61, 0x55, 0x49, 0x6e, 0x74, 0x38, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2d, + 0x0a, 0x13, 0x46, 0x6c, 0x61, 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x44, 0x61, 0x74, 0x61, + 0x49, 0x6e, 0x74, 0x31, 0x36, 0x12, 0x16, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x07, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2e, 0x0a, + 0x14, 0x46, 0x6c, 0x61, 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x44, 0x61, 0x74, 0x61, 0x55, + 0x49, 0x6e, 0x74, 0x31, 0x36, 0x12, 0x16, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x07, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2d, 0x0a, + 0x13, 0x46, 0x6c, 0x61, 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x44, 0x61, 0x74, 0x61, 0x49, + 0x6e, 0x74, 0x33, 0x32, 0x12, 0x16, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0f, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2e, 0x0a, 0x14, + 0x46, 0x6c, 0x61, 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x44, 0x61, 0x74, 0x61, 0x55, 0x49, + 0x6e, 0x74, 0x33, 0x32, 0x12, 0x16, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x07, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2d, 0x0a, 0x13, + 0x46, 0x6c, 0x61, 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x44, 0x61, 0x74, 0x61, 0x49, 0x6e, + 0x74, 0x36, 0x34, 0x12, 0x16, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x10, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2e, 0x0a, 0x14, 0x46, + 0x6c, 0x61, 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x44, 0x61, 0x74, 0x61, 0x55, 0x49, 0x6e, + 0x74, 0x36, 0x34, 0x12, 0x16, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x06, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2d, 0x0a, 0x13, 0x46, + 0x6c, 0x61, 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x44, 0x61, 0x74, 0x61, 0x46, 0x6c, 0x6f, + 0x61, 0x74, 0x12, 0x16, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x02, + 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2e, 0x0a, 0x14, 0x46, 0x6c, + 0x61, 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x44, 0x61, 0x74, 0x61, 0x44, 0x6f, 0x75, 0x62, + 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x01, + 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xf3, 0x06, 0x0a, 0x0a, 0x46, + 0x6c, 0x61, 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, + 0x70, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x06, 0x52, 0x05, 0x73, 0x68, 0x61, 0x70, 0x65, 0x12, + 0x4e, 0x0a, 0x0b, 0x69, 0x6e, 0x74, 0x38, 0x5f, 0x74, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x46, + 0x6c, 0x61, 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x44, 0x61, 0x74, 0x61, 0x49, 0x6e, 0x74, + 0x38, 0x48, 0x00, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x38, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x12, + 0x51, 0x0a, 0x0c, 0x75, 0x69, 0x6e, 0x74, 0x38, 0x5f, 0x74, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x2e, - 0x49, 0x6e, 0x66, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x76, + 0x46, 0x6c, 0x61, 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x44, 0x61, 0x74, 0x61, 0x55, 0x49, + 0x6e, 0x74, 0x38, 0x48, 0x00, 0x52, 0x0b, 0x75, 0x69, 0x6e, 0x74, 0x38, 0x54, 0x65, 0x6e, 0x73, + 0x6f, 0x72, 0x12, 0x51, 0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x31, 0x36, 0x5f, 0x74, 0x65, 0x6e, 0x73, + 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, + 0x76, 0x31, 0x2e, 0x46, 0x6c, 0x61, 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x44, 0x61, 0x74, + 0x61, 0x49, 0x6e, 0x74, 0x31, 0x36, 0x48, 0x00, 0x52, 0x0b, 0x69, 0x6e, 0x74, 0x31, 0x36, 0x54, + 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x12, 0x54, 0x0a, 0x0d, 0x75, 0x69, 0x6e, 0x74, 0x31, 0x36, 0x5f, + 0x74, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x6c, 0x6d, 0x6f, - 0x64, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x22, 0x29, 0x2f, 0x76, - 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2f, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, - 0x7d, 0x2f, 0x69, 0x6e, 0x66, 0x65, 0x72, 0x12, 0x95, 0x01, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x12, 0x28, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, + 0x64, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6c, 0x61, 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, + 0x72, 0x44, 0x61, 0x74, 0x61, 0x55, 0x49, 0x6e, 0x74, 0x31, 0x36, 0x48, 0x00, 0x52, 0x0c, 0x75, + 0x69, 0x6e, 0x74, 0x31, 0x36, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x12, 0x51, 0x0a, 0x0c, 0x69, + 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x74, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2c, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6c, 0x61, 0x74, + 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x44, 0x61, 0x74, 0x61, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x48, + 0x00, 0x52, 0x0b, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x12, 0x54, + 0x0a, 0x0d, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x74, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x2e, + 0x46, 0x6c, 0x61, 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x44, 0x61, 0x74, 0x61, 0x55, 0x49, + 0x6e, 0x74, 0x33, 0x32, 0x48, 0x00, 0x52, 0x0c, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x54, 0x65, + 0x6e, 0x73, 0x6f, 0x72, 0x12, 0x51, 0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x74, 0x65, + 0x6e, 0x73, 0x6f, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x76, 0x69, 0x61, + 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, + 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6c, 0x61, 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x44, + 0x61, 0x74, 0x61, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x48, 0x00, 0x52, 0x0b, 0x69, 0x6e, 0x74, 0x36, + 0x34, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x12, 0x54, 0x0a, 0x0d, 0x75, 0x69, 0x6e, 0x74, 0x36, + 0x34, 0x5f, 0x74, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x6c, - 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x2e, 0x12, 0x2c, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, - 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, - 0x41, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x5a, 0x22, - 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, - 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6c, 0x61, 0x74, 0x54, 0x65, 0x6e, + 0x73, 0x6f, 0x72, 0x44, 0x61, 0x74, 0x61, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x48, 0x00, 0x52, + 0x0c, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x12, 0x51, 0x0a, + 0x0c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x5f, 0x74, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6c, + 0x61, 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x44, 0x61, 0x74, 0x61, 0x46, 0x6c, 0x6f, 0x61, + 0x74, 0x48, 0x00, 0x52, 0x0b, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, + 0x12, 0x54, 0x0a, 0x0d, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x74, 0x65, 0x6e, 0x73, 0x6f, + 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x76, + 0x31, 0x2e, 0x46, 0x6c, 0x61, 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x44, 0x61, 0x74, 0x61, + 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, + 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x42, 0x08, 0x0a, 0x06, 0x74, 0x65, 0x6e, 0x73, 0x6f, 0x72, + 0x22, 0xbb, 0x01, 0x0a, 0x0b, 0x46, 0x6c, 0x61, 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, + 0x12, 0x4b, 0x0a, 0x07, 0x74, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x31, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6c, 0x61, 0x74, + 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x2e, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x74, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x1a, 0x5f, 0x0a, + 0x0c, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 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, + 0x39, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, + 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x6c, + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6c, 0x61, 0x74, 0x54, 0x65, 0x6e, + 0x73, 0x6f, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, 0x60, + 0x0a, 0x09, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x4c, + 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x4c, 0x41, 0x42, 0x45, 0x4c, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x45, 0x4e, 0x53, 0x4f, 0x52, 0x5f, 0x56, 0x41, 0x4c, + 0x55, 0x45, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x54, 0x45, 0x4e, 0x53, 0x4f, 0x52, 0x5f, 0x41, 0x58, 0x49, 0x53, 0x10, 0x02, + 0x32, 0xbf, 0x03, 0x0a, 0x0e, 0x4d, 0x4c, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x89, 0x01, 0x0a, 0x05, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x12, 0x25, 0x2e, + 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x6c, 0x6d, + 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x49, + 0x6e, 0x66, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x2b, 0x22, 0x29, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, + 0x65, 0x6c, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x69, 0x6e, 0x66, 0x65, 0x72, 0x12, + 0x95, 0x01, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x28, 0x2e, 0x76, + 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x6c, 0x6d, 0x6f, + 0x64, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x76, 0x69, 0x61, 0x6d, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, + 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x88, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x30, 0x12, 0x2e, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, + 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, + 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x42, 0x41, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x76, + 0x31, 0x5a, 0x22, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, + 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1466,6 +1477,8 @@ var file_service_mlmodel_v1_mlmodel_proto_goTypes = []any{ (*FlatTensors)(nil), // 19: viam.service.mlmodel.v1.FlatTensors nil, // 20: viam.service.mlmodel.v1.FlatTensors.TensorsEntry (*structpb.Struct)(nil), // 21: google.protobuf.Struct + (*v1.GetStatusRequest)(nil), // 22: viam.common.v1.GetStatusRequest + (*v1.GetStatusResponse)(nil), // 23: viam.common.v1.GetStatusResponse } var file_service_mlmodel_v1_mlmodel_proto_depIdxs = []int32{ 19, // 0: viam.service.mlmodel.v1.InferRequest.input_tensors:type_name -> viam.service.mlmodel.v1.FlatTensors @@ -1492,10 +1505,12 @@ var file_service_mlmodel_v1_mlmodel_proto_depIdxs = []int32{ 18, // 21: viam.service.mlmodel.v1.FlatTensors.TensorsEntry.value:type_name -> viam.service.mlmodel.v1.FlatTensor 1, // 22: viam.service.mlmodel.v1.MLModelService.Infer:input_type -> viam.service.mlmodel.v1.InferRequest 3, // 23: viam.service.mlmodel.v1.MLModelService.Metadata:input_type -> viam.service.mlmodel.v1.MetadataRequest - 2, // 24: viam.service.mlmodel.v1.MLModelService.Infer:output_type -> viam.service.mlmodel.v1.InferResponse - 4, // 25: viam.service.mlmodel.v1.MLModelService.Metadata:output_type -> viam.service.mlmodel.v1.MetadataResponse - 24, // [24:26] is the sub-list for method output_type - 22, // [22:24] is the sub-list for method input_type + 22, // 24: viam.service.mlmodel.v1.MLModelService.GetStatus:input_type -> viam.common.v1.GetStatusRequest + 2, // 25: viam.service.mlmodel.v1.MLModelService.Infer:output_type -> viam.service.mlmodel.v1.InferResponse + 4, // 26: viam.service.mlmodel.v1.MLModelService.Metadata:output_type -> viam.service.mlmodel.v1.MetadataResponse + 23, // 27: viam.service.mlmodel.v1.MLModelService.GetStatus:output_type -> viam.common.v1.GetStatusResponse + 25, // [25:28] is the sub-list for method output_type + 22, // [22:25] is the sub-list for method input_type 22, // [22:22] is the sub-list for extension type_name 22, // [22:22] is the sub-list for extension extendee 0, // [0:22] is the sub-list for field type_name diff --git a/service/mlmodel/v1/mlmodel.pb.gw.go b/service/mlmodel/v1/mlmodel.pb.gw.go index 73adc0a08d..0b5db5736f 100644 --- a/service/mlmodel/v1/mlmodel.pb.gw.go +++ b/service/mlmodel/v1/mlmodel.pb.gw.go @@ -15,6 +15,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "go.viam.com/api/common/v1" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" @@ -171,6 +172,58 @@ func local_request_MLModelService_Metadata_0(ctx context.Context, marshaler runt } +func request_MLModelService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, client MLModelServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_MLModelService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, server MLModelServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetStatus(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterMLModelServiceHandlerServer registers the http handlers for service MLModelService to "mux". // UnaryRPC :call MLModelServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -227,6 +280,31 @@ func RegisterMLModelServiceHandlerServer(ctx context.Context, mux *runtime.Serve }) + mux.Handle("GET", pattern_MLModelService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.service.mlmodel.v1.MLModelService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/service/mlmodel/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_MLModelService_GetStatus_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MLModelService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -312,6 +390,28 @@ func RegisterMLModelServiceHandlerClient(ctx context.Context, mux *runtime.Serve }) + mux.Handle("GET", pattern_MLModelService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.mlmodel.v1.MLModelService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/service/mlmodel/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MLModelService_GetStatus_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MLModelService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -319,10 +419,14 @@ var ( pattern_MLModelService_Infer_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "mlmodel", "name", "infer"}, "")) pattern_MLModelService_Metadata_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "mlmodel", "name", "metadata"}, "")) + + pattern_MLModelService_GetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "mlmodel", "name", "get_status"}, "")) ) var ( forward_MLModelService_Infer_0 = runtime.ForwardResponseMessage forward_MLModelService_Metadata_0 = runtime.ForwardResponseMessage + + forward_MLModelService_GetStatus_0 = runtime.ForwardResponseMessage ) diff --git a/service/mlmodel/v1/mlmodel_grpc.pb.go b/service/mlmodel/v1/mlmodel_grpc.pb.go index e21bdccbf5..7ca62bbb32 100644 --- a/service/mlmodel/v1/mlmodel_grpc.pb.go +++ b/service/mlmodel/v1/mlmodel_grpc.pb.go @@ -8,6 +8,7 @@ package v1 import ( context "context" + v1 "go.viam.com/api/common/v1" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -26,6 +27,8 @@ type MLModelServiceClient interface { Infer(ctx context.Context, in *InferRequest, opts ...grpc.CallOption) (*InferResponse, error) // Metadata returns the metadata associated with the ML model. Metadata(ctx context.Context, in *MetadataRequest, opts ...grpc.CallOption) (*MetadataResponse, error) + // GetStatus returns the status of the resource + GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) } type mLModelServiceClient struct { @@ -54,6 +57,15 @@ func (c *mLModelServiceClient) Metadata(ctx context.Context, in *MetadataRequest return out, nil } +func (c *mLModelServiceClient) GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) { + out := new(v1.GetStatusResponse) + err := c.cc.Invoke(ctx, "/viam.service.mlmodel.v1.MLModelService/GetStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MLModelServiceServer is the server API for MLModelService service. // All implementations must embed UnimplementedMLModelServiceServer // for forward compatibility @@ -62,6 +74,8 @@ type MLModelServiceServer interface { Infer(context.Context, *InferRequest) (*InferResponse, error) // Metadata returns the metadata associated with the ML model. Metadata(context.Context, *MetadataRequest) (*MetadataResponse, error) + // GetStatus returns the status of the resource + GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) mustEmbedUnimplementedMLModelServiceServer() } @@ -75,6 +89,9 @@ func (UnimplementedMLModelServiceServer) Infer(context.Context, *InferRequest) ( func (UnimplementedMLModelServiceServer) Metadata(context.Context, *MetadataRequest) (*MetadataResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Metadata not implemented") } +func (UnimplementedMLModelServiceServer) GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented") +} func (UnimplementedMLModelServiceServer) mustEmbedUnimplementedMLModelServiceServer() {} // UnsafeMLModelServiceServer may be embedded to opt out of forward compatibility for this service. @@ -124,6 +141,24 @@ func _MLModelService_Metadata_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _MLModelService_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MLModelServiceServer).GetStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.service.mlmodel.v1.MLModelService/GetStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MLModelServiceServer).GetStatus(ctx, req.(*v1.GetStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + // MLModelService_ServiceDesc is the grpc.ServiceDesc for MLModelService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -139,6 +174,10 @@ var MLModelService_ServiceDesc = grpc.ServiceDesc{ MethodName: "Metadata", Handler: _MLModelService_Metadata_Handler, }, + { + MethodName: "GetStatus", + Handler: _MLModelService_GetStatus_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "service/mlmodel/v1/mlmodel.proto", diff --git a/service/motion/v1/motion.pb.go b/service/motion/v1/motion.pb.go index 0cd59dff38..4a2b0a271c 100644 --- a/service/motion/v1/motion.pb.go +++ b/service/motion/v1/motion.pb.go @@ -2452,8 +2452,8 @@ var file_service_motion_v1_motion_proto_rawDesc = []byte{ 0x41, 0x54, 0x45, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, 0x50, 0x4c, 0x41, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x4c, 0x41, 0x4e, 0x5f, - 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x32, 0xcc, - 0x09, 0x0a, 0x0d, 0x4d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x32, 0xd6, + 0x0a, 0x0a, 0x0d, 0x4d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x82, 0x01, 0x0a, 0x04, 0x4d, 0x6f, 0x76, 0x65, 0x12, 0x23, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, @@ -2529,12 +2529,20 @@ var file_service_motion_v1_motion_proto_rawDesc = []byte{ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x22, 0x2d, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, - 0x65, 0x7d, 0x2f, 0x64, 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x42, 0x3f, 0x0a, - 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x5a, 0x21, 0x67, 0x6f, 0x2e, - 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x7d, 0x2f, 0x64, 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x87, 0x01, + 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, + 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6d, + 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x74, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x3f, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x76, + 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x6f, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x5a, 0x21, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6d, + 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2593,7 +2601,9 @@ var file_service_motion_v1_motion_proto_goTypes = []any{ (*v1.Transform)(nil), // 38: viam.common.v1.Transform (*timestamppb.Timestamp)(nil), // 39: google.protobuf.Timestamp (*v1.DoCommandRequest)(nil), // 40: viam.common.v1.DoCommandRequest - (*v1.DoCommandResponse)(nil), // 41: viam.common.v1.DoCommandResponse + (*v1.GetStatusRequest)(nil), // 41: viam.common.v1.GetStatusRequest + (*v1.DoCommandResponse)(nil), // 42: viam.common.v1.DoCommandResponse + (*v1.GetStatusResponse)(nil), // 43: viam.common.v1.GetStatusResponse } var file_service_motion_v1_motion_proto_depIdxs = []int32{ 30, // 0: viam.service.motion.v1.MoveRequest.destination:type_name -> viam.common.v1.PoseInFrame @@ -2654,16 +2664,18 @@ var file_service_motion_v1_motion_proto_depIdxs = []int32{ 13, // 55: viam.service.motion.v1.MotionService.ListPlanStatuses:input_type -> viam.service.motion.v1.ListPlanStatusesRequest 15, // 56: viam.service.motion.v1.MotionService.GetPlan:input_type -> viam.service.motion.v1.GetPlanRequest 40, // 57: viam.service.motion.v1.MotionService.DoCommand:input_type -> viam.common.v1.DoCommandRequest - 2, // 58: viam.service.motion.v1.MotionService.Move:output_type -> viam.service.motion.v1.MoveResponse - 4, // 59: viam.service.motion.v1.MotionService.MoveOnMap:output_type -> viam.service.motion.v1.MoveOnMapResponse - 8, // 60: viam.service.motion.v1.MotionService.MoveOnGlobe:output_type -> viam.service.motion.v1.MoveOnGlobeResponse - 10, // 61: viam.service.motion.v1.MotionService.GetPose:output_type -> viam.service.motion.v1.GetPoseResponse - 12, // 62: viam.service.motion.v1.MotionService.StopPlan:output_type -> viam.service.motion.v1.StopPlanResponse - 14, // 63: viam.service.motion.v1.MotionService.ListPlanStatuses:output_type -> viam.service.motion.v1.ListPlanStatusesResponse - 16, // 64: viam.service.motion.v1.MotionService.GetPlan:output_type -> viam.service.motion.v1.GetPlanResponse - 41, // 65: viam.service.motion.v1.MotionService.DoCommand:output_type -> viam.common.v1.DoCommandResponse - 58, // [58:66] is the sub-list for method output_type - 50, // [50:58] is the sub-list for method input_type + 41, // 58: viam.service.motion.v1.MotionService.GetStatus:input_type -> viam.common.v1.GetStatusRequest + 2, // 59: viam.service.motion.v1.MotionService.Move:output_type -> viam.service.motion.v1.MoveResponse + 4, // 60: viam.service.motion.v1.MotionService.MoveOnMap:output_type -> viam.service.motion.v1.MoveOnMapResponse + 8, // 61: viam.service.motion.v1.MotionService.MoveOnGlobe:output_type -> viam.service.motion.v1.MoveOnGlobeResponse + 10, // 62: viam.service.motion.v1.MotionService.GetPose:output_type -> viam.service.motion.v1.GetPoseResponse + 12, // 63: viam.service.motion.v1.MotionService.StopPlan:output_type -> viam.service.motion.v1.StopPlanResponse + 14, // 64: viam.service.motion.v1.MotionService.ListPlanStatuses:output_type -> viam.service.motion.v1.ListPlanStatusesResponse + 16, // 65: viam.service.motion.v1.MotionService.GetPlan:output_type -> viam.service.motion.v1.GetPlanResponse + 42, // 66: viam.service.motion.v1.MotionService.DoCommand:output_type -> viam.common.v1.DoCommandResponse + 43, // 67: viam.service.motion.v1.MotionService.GetStatus:output_type -> viam.common.v1.GetStatusResponse + 59, // [59:68] is the sub-list for method output_type + 50, // [50:59] is the sub-list for method input_type 50, // [50:50] is the sub-list for extension type_name 50, // [50:50] is the sub-list for extension extendee 0, // [0:50] is the sub-list for field type_name diff --git a/service/motion/v1/motion.pb.gw.go b/service/motion/v1/motion.pb.gw.go index 6ddcb824da..aba7c3cfcd 100644 --- a/service/motion/v1/motion.pb.gw.go +++ b/service/motion/v1/motion.pb.gw.go @@ -592,6 +592,58 @@ func local_request_MotionService_DoCommand_0(ctx context.Context, marshaler runt } +func request_MotionService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, client MotionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_MotionService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, server MotionServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetStatus(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterMotionServiceHandlerServer registers the http handlers for service MotionService to "mux". // UnaryRPC :call MotionServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -798,6 +850,31 @@ func RegisterMotionServiceHandlerServer(ctx context.Context, mux *runtime.ServeM }) + mux.Handle("GET", pattern_MotionService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.service.motion.v1.MotionService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/service/motion/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_MotionService_GetStatus_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MotionService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1015,6 +1092,28 @@ func RegisterMotionServiceHandlerClient(ctx context.Context, mux *runtime.ServeM }) + mux.Handle("GET", pattern_MotionService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.motion.v1.MotionService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/service/motion/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MotionService_GetStatus_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MotionService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1034,6 +1133,8 @@ var ( pattern_MotionService_GetPlan_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "motion", "name", "get_plan"}, "")) pattern_MotionService_DoCommand_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "motion", "name", "do_command"}, "")) + + pattern_MotionService_GetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "motion", "name", "get_status"}, "")) ) var ( @@ -1052,4 +1153,6 @@ var ( forward_MotionService_GetPlan_0 = runtime.ForwardResponseMessage forward_MotionService_DoCommand_0 = runtime.ForwardResponseMessage + + forward_MotionService_GetStatus_0 = runtime.ForwardResponseMessage ) diff --git a/service/motion/v1/motion_grpc.pb.go b/service/motion/v1/motion_grpc.pb.go index d1b06c1923..f9e27cf11c 100644 --- a/service/motion/v1/motion_grpc.pb.go +++ b/service/motion/v1/motion_grpc.pb.go @@ -52,6 +52,8 @@ type MotionServiceClient interface { GetPlan(ctx context.Context, in *GetPlanRequest, opts ...grpc.CallOption) (*GetPlanResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(ctx context.Context, in *v1.DoCommandRequest, opts ...grpc.CallOption) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) } type motionServiceClient struct { @@ -135,6 +137,15 @@ func (c *motionServiceClient) DoCommand(ctx context.Context, in *v1.DoCommandReq return out, nil } +func (c *motionServiceClient) GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) { + out := new(v1.GetStatusResponse) + err := c.cc.Invoke(ctx, "/viam.service.motion.v1.MotionService/GetStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MotionServiceServer is the server API for MotionService service. // All implementations must embed UnimplementedMotionServiceServer // for forward compatibility @@ -168,6 +179,8 @@ type MotionServiceServer interface { GetPlan(context.Context, *GetPlanRequest) (*GetPlanResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) mustEmbedUnimplementedMotionServiceServer() } @@ -199,6 +212,9 @@ func (UnimplementedMotionServiceServer) GetPlan(context.Context, *GetPlanRequest func (UnimplementedMotionServiceServer) DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DoCommand not implemented") } +func (UnimplementedMotionServiceServer) GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented") +} func (UnimplementedMotionServiceServer) mustEmbedUnimplementedMotionServiceServer() {} // UnsafeMotionServiceServer may be embedded to opt out of forward compatibility for this service. @@ -356,6 +372,24 @@ func _MotionService_DoCommand_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _MotionService_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MotionServiceServer).GetStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.service.motion.v1.MotionService/GetStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MotionServiceServer).GetStatus(ctx, req.(*v1.GetStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + // MotionService_ServiceDesc is the grpc.ServiceDesc for MotionService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -395,6 +429,10 @@ var MotionService_ServiceDesc = grpc.ServiceDesc{ MethodName: "DoCommand", Handler: _MotionService_DoCommand_Handler, }, + { + MethodName: "GetStatus", + Handler: _MotionService_GetStatus_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "service/motion/v1/motion.proto", diff --git a/service/navigation/v1/navigation.pb.go b/service/navigation/v1/navigation.pb.go index 2472e1e2bf..a18ddcb9cf 100644 --- a/service/navigation/v1/navigation.pb.go +++ b/service/navigation/v1/navigation.pb.go @@ -1260,7 +1260,7 @@ var file_service_navigation_v1_navigation_proto_rawDesc = []byte{ 0x0b, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x4d, 0x41, 0x4e, 0x55, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x57, 0x41, 0x59, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x45, 0x58, 0x50, 0x4c, 0x4f, 0x52, - 0x45, 0x10, 0x03, 0x32, 0x97, 0x0d, 0x0a, 0x11, 0x4e, 0x61, 0x76, 0x69, 0x67, 0x61, 0x74, 0x69, + 0x45, 0x10, 0x03, 0x32, 0xa5, 0x0e, 0x0a, 0x11, 0x4e, 0x61, 0x76, 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x97, 0x01, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x2a, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6e, 0x61, 0x76, 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, @@ -1365,12 +1365,21 @@ var file_service_navigation_v1_navigation_proto_rawDesc = []byte{ 0x73, 0x65, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x22, 0x31, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6e, 0x61, 0x76, 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, - 0x65, 0x7d, 0x2f, 0x64, 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x42, 0x47, 0x0a, - 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x6e, 0x61, 0x76, 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x5a, - 0x25, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6e, 0x61, 0x76, 0x69, 0x67, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x7d, 0x2f, 0x64, 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x8b, 0x01, + 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, + 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x12, 0x31, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6e, + 0x61, 0x76, 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, + 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x47, 0x0a, 0x1e, 0x63, + 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x6e, 0x61, 0x76, 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x5a, 0x25, 0x67, + 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6e, 0x61, 0x76, 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1414,7 +1423,9 @@ var file_service_navigation_v1_navigation_proto_goTypes = []any{ (*v1.GeoPoint)(nil), // 23: viam.common.v1.GeoPoint (*v1.GeoGeometry)(nil), // 24: viam.common.v1.GeoGeometry (*v1.DoCommandRequest)(nil), // 25: viam.common.v1.DoCommandRequest - (*v1.DoCommandResponse)(nil), // 26: viam.common.v1.DoCommandResponse + (*v1.GetStatusRequest)(nil), // 26: viam.common.v1.GetStatusRequest + (*v1.DoCommandResponse)(nil), // 27: viam.common.v1.DoCommandResponse + (*v1.GetStatusResponse)(nil), // 28: viam.common.v1.GetStatusResponse } var file_service_navigation_v1_navigation_proto_depIdxs = []int32{ 22, // 0: viam.service.navigation.v1.GetModeRequest.extra:type_name -> google.protobuf.Struct @@ -1445,18 +1456,20 @@ var file_service_navigation_v1_navigation_proto_depIdxs = []int32{ 18, // 25: viam.service.navigation.v1.NavigationService.GetPaths:input_type -> viam.service.navigation.v1.GetPathsRequest 20, // 26: viam.service.navigation.v1.NavigationService.GetProperties:input_type -> viam.service.navigation.v1.GetPropertiesRequest 25, // 27: viam.service.navigation.v1.NavigationService.DoCommand:input_type -> viam.common.v1.DoCommandRequest - 3, // 28: viam.service.navigation.v1.NavigationService.GetMode:output_type -> viam.service.navigation.v1.GetModeResponse - 5, // 29: viam.service.navigation.v1.NavigationService.SetMode:output_type -> viam.service.navigation.v1.SetModeResponse - 8, // 30: viam.service.navigation.v1.NavigationService.GetLocation:output_type -> viam.service.navigation.v1.GetLocationResponse - 10, // 31: viam.service.navigation.v1.NavigationService.GetWaypoints:output_type -> viam.service.navigation.v1.GetWaypointsResponse - 12, // 32: viam.service.navigation.v1.NavigationService.AddWaypoint:output_type -> viam.service.navigation.v1.AddWaypointResponse - 14, // 33: viam.service.navigation.v1.NavigationService.RemoveWaypoint:output_type -> viam.service.navigation.v1.RemoveWaypointResponse - 16, // 34: viam.service.navigation.v1.NavigationService.GetObstacles:output_type -> viam.service.navigation.v1.GetObstaclesResponse - 19, // 35: viam.service.navigation.v1.NavigationService.GetPaths:output_type -> viam.service.navigation.v1.GetPathsResponse - 21, // 36: viam.service.navigation.v1.NavigationService.GetProperties:output_type -> viam.service.navigation.v1.GetPropertiesResponse - 26, // 37: viam.service.navigation.v1.NavigationService.DoCommand:output_type -> viam.common.v1.DoCommandResponse - 28, // [28:38] is the sub-list for method output_type - 18, // [18:28] is the sub-list for method input_type + 26, // 28: viam.service.navigation.v1.NavigationService.GetStatus:input_type -> viam.common.v1.GetStatusRequest + 3, // 29: viam.service.navigation.v1.NavigationService.GetMode:output_type -> viam.service.navigation.v1.GetModeResponse + 5, // 30: viam.service.navigation.v1.NavigationService.SetMode:output_type -> viam.service.navigation.v1.SetModeResponse + 8, // 31: viam.service.navigation.v1.NavigationService.GetLocation:output_type -> viam.service.navigation.v1.GetLocationResponse + 10, // 32: viam.service.navigation.v1.NavigationService.GetWaypoints:output_type -> viam.service.navigation.v1.GetWaypointsResponse + 12, // 33: viam.service.navigation.v1.NavigationService.AddWaypoint:output_type -> viam.service.navigation.v1.AddWaypointResponse + 14, // 34: viam.service.navigation.v1.NavigationService.RemoveWaypoint:output_type -> viam.service.navigation.v1.RemoveWaypointResponse + 16, // 35: viam.service.navigation.v1.NavigationService.GetObstacles:output_type -> viam.service.navigation.v1.GetObstaclesResponse + 19, // 36: viam.service.navigation.v1.NavigationService.GetPaths:output_type -> viam.service.navigation.v1.GetPathsResponse + 21, // 37: viam.service.navigation.v1.NavigationService.GetProperties:output_type -> viam.service.navigation.v1.GetPropertiesResponse + 27, // 38: viam.service.navigation.v1.NavigationService.DoCommand:output_type -> viam.common.v1.DoCommandResponse + 28, // 39: viam.service.navigation.v1.NavigationService.GetStatus:output_type -> viam.common.v1.GetStatusResponse + 29, // [29:40] is the sub-list for method output_type + 18, // [18:29] is the sub-list for method input_type 18, // [18:18] is the sub-list for extension type_name 18, // [18:18] is the sub-list for extension extendee 0, // [0:18] is the sub-list for field type_name diff --git a/service/navigation/v1/navigation.pb.gw.go b/service/navigation/v1/navigation.pb.gw.go index 7c54c601f6..46afeb7609 100644 --- a/service/navigation/v1/navigation.pb.gw.go +++ b/service/navigation/v1/navigation.pb.gw.go @@ -734,6 +734,58 @@ func local_request_NavigationService_DoCommand_0(ctx context.Context, marshaler } +func request_NavigationService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, client NavigationServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_NavigationService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, server NavigationServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetStatus(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterNavigationServiceHandlerServer registers the http handlers for service NavigationService to "mux". // UnaryRPC :call NavigationServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -990,6 +1042,31 @@ func RegisterNavigationServiceHandlerServer(ctx context.Context, mux *runtime.Se }) + mux.Handle("GET", pattern_NavigationService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.service.navigation.v1.NavigationService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/service/navigation/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_NavigationService_GetStatus_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_NavigationService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1251,6 +1328,28 @@ func RegisterNavigationServiceHandlerClient(ctx context.Context, mux *runtime.Se }) + mux.Handle("GET", pattern_NavigationService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.navigation.v1.NavigationService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/service/navigation/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_NavigationService_GetStatus_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_NavigationService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1274,6 +1373,8 @@ var ( pattern_NavigationService_GetProperties_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "navigation", "name", "properties"}, "")) pattern_NavigationService_DoCommand_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "navigation", "name", "do_command"}, "")) + + pattern_NavigationService_GetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "navigation", "name", "get_status"}, "")) ) var ( @@ -1296,4 +1397,6 @@ var ( forward_NavigationService_GetProperties_0 = runtime.ForwardResponseMessage forward_NavigationService_DoCommand_0 = runtime.ForwardResponseMessage + + forward_NavigationService_GetStatus_0 = runtime.ForwardResponseMessage ) diff --git a/service/navigation/v1/navigation_grpc.pb.go b/service/navigation/v1/navigation_grpc.pb.go index d29f120497..1bc1d11d8c 100644 --- a/service/navigation/v1/navigation_grpc.pb.go +++ b/service/navigation/v1/navigation_grpc.pb.go @@ -36,6 +36,8 @@ type NavigationServiceClient interface { GetProperties(ctx context.Context, in *GetPropertiesRequest, opts ...grpc.CallOption) (*GetPropertiesResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(ctx context.Context, in *v1.DoCommandRequest, opts ...grpc.CallOption) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) } type navigationServiceClient struct { @@ -136,6 +138,15 @@ func (c *navigationServiceClient) DoCommand(ctx context.Context, in *v1.DoComman return out, nil } +func (c *navigationServiceClient) GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) { + out := new(v1.GetStatusResponse) + err := c.cc.Invoke(ctx, "/viam.service.navigation.v1.NavigationService/GetStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // NavigationServiceServer is the server API for NavigationService service. // All implementations must embed UnimplementedNavigationServiceServer // for forward compatibility @@ -153,6 +164,8 @@ type NavigationServiceServer interface { GetProperties(context.Context, *GetPropertiesRequest) (*GetPropertiesResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) mustEmbedUnimplementedNavigationServiceServer() } @@ -190,6 +203,9 @@ func (UnimplementedNavigationServiceServer) GetProperties(context.Context, *GetP func (UnimplementedNavigationServiceServer) DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DoCommand not implemented") } +func (UnimplementedNavigationServiceServer) GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented") +} func (UnimplementedNavigationServiceServer) mustEmbedUnimplementedNavigationServiceServer() {} // UnsafeNavigationServiceServer may be embedded to opt out of forward compatibility for this service. @@ -383,6 +399,24 @@ func _NavigationService_DoCommand_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _NavigationService_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NavigationServiceServer).GetStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.service.navigation.v1.NavigationService/GetStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NavigationServiceServer).GetStatus(ctx, req.(*v1.GetStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + // NavigationService_ServiceDesc is the grpc.ServiceDesc for NavigationService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -430,6 +464,10 @@ var NavigationService_ServiceDesc = grpc.ServiceDesc{ MethodName: "DoCommand", Handler: _NavigationService_DoCommand_Handler, }, + { + MethodName: "GetStatus", + Handler: _NavigationService_GetStatus_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "service/navigation/v1/navigation.proto", diff --git a/service/sensors/v1/sensors.pb.go b/service/sensors/v1/sensors.pb.go index fe7a02e0c9..3f47637f41 100644 --- a/service/sensors/v1/sensors.pb.go +++ b/service/sensors/v1/sensors.pb.go @@ -364,7 +364,7 @@ var file_service_sensors_v1_sensors_proto_rawDesc = []byte{ 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x02, 0x18, 0x01, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, - 0x69, 0x6e, 0x67, 0x73, 0x3a, 0x02, 0x18, 0x01, 0x32, 0xda, 0x03, 0x0a, 0x0e, 0x53, 0x65, 0x6e, + 0x69, 0x6e, 0x67, 0x73, 0x3a, 0x02, 0x18, 0x01, 0x32, 0xe5, 0x04, 0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x95, 0x01, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x12, 0x2a, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, @@ -394,12 +394,20 @@ var file_service_sensors_v1_sensors_proto_rawDesc = []byte{ 0x02, 0x30, 0x22, 0x2e, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x64, 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, - 0x6e, 0x64, 0x88, 0x02, 0x01, 0x42, 0x44, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, - 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, - 0x73, 0x2e, 0x76, 0x31, 0x5a, 0x22, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, 0x65, - 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x2f, 0x76, 0x31, 0xb8, 0x01, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x6e, 0x64, 0x88, 0x02, 0x01, 0x12, 0x88, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x20, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, + 0x12, 0x2e, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x2f, 0x7b, + 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x42, 0x44, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x2e, 0x76, 0x31, 0x5a, + 0x22, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, + 0x2f, 0x76, 0x31, 0xb8, 0x01, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -426,7 +434,9 @@ var file_service_sensors_v1_sensors_proto_goTypes = []any{ (*v1.ResourceName)(nil), // 7: viam.common.v1.ResourceName (*structpb.Value)(nil), // 8: google.protobuf.Value (*v1.DoCommandRequest)(nil), // 9: viam.common.v1.DoCommandRequest - (*v1.DoCommandResponse)(nil), // 10: viam.common.v1.DoCommandResponse + (*v1.GetStatusRequest)(nil), // 10: viam.common.v1.GetStatusRequest + (*v1.DoCommandResponse)(nil), // 11: viam.common.v1.DoCommandResponse + (*v1.GetStatusResponse)(nil), // 12: viam.common.v1.GetStatusResponse } var file_service_sensors_v1_sensors_proto_depIdxs = []int32{ 6, // 0: viam.service.sensors.v1.GetSensorsRequest.extra:type_name -> google.protobuf.Struct @@ -440,11 +450,13 @@ var file_service_sensors_v1_sensors_proto_depIdxs = []int32{ 0, // 8: viam.service.sensors.v1.SensorsService.GetSensors:input_type -> viam.service.sensors.v1.GetSensorsRequest 2, // 9: viam.service.sensors.v1.SensorsService.GetReadings:input_type -> viam.service.sensors.v1.GetReadingsRequest 9, // 10: viam.service.sensors.v1.SensorsService.DoCommand:input_type -> viam.common.v1.DoCommandRequest - 1, // 11: viam.service.sensors.v1.SensorsService.GetSensors:output_type -> viam.service.sensors.v1.GetSensorsResponse - 4, // 12: viam.service.sensors.v1.SensorsService.GetReadings:output_type -> viam.service.sensors.v1.GetReadingsResponse - 10, // 13: viam.service.sensors.v1.SensorsService.DoCommand:output_type -> viam.common.v1.DoCommandResponse - 11, // [11:14] is the sub-list for method output_type - 8, // [8:11] is the sub-list for method input_type + 10, // 11: viam.service.sensors.v1.SensorsService.GetStatus:input_type -> viam.common.v1.GetStatusRequest + 1, // 12: viam.service.sensors.v1.SensorsService.GetSensors:output_type -> viam.service.sensors.v1.GetSensorsResponse + 4, // 13: viam.service.sensors.v1.SensorsService.GetReadings:output_type -> viam.service.sensors.v1.GetReadingsResponse + 11, // 14: viam.service.sensors.v1.SensorsService.DoCommand:output_type -> viam.common.v1.DoCommandResponse + 12, // 15: viam.service.sensors.v1.SensorsService.GetStatus:output_type -> viam.common.v1.GetStatusResponse + 12, // [12:16] is the sub-list for method output_type + 8, // [8:12] is the sub-list for method input_type 8, // [8:8] is the sub-list for extension type_name 8, // [8:8] is the sub-list for extension extendee 0, // [0:8] is the sub-list for field type_name diff --git a/service/sensors/v1/sensors.pb.gw.go b/service/sensors/v1/sensors.pb.gw.go index ef72102e0d..e0e785dd73 100644 --- a/service/sensors/v1/sensors.pb.gw.go +++ b/service/sensors/v1/sensors.pb.gw.go @@ -242,6 +242,58 @@ func local_request_SensorsService_DoCommand_0(ctx context.Context, marshaler run } +func request_SensorsService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, client SensorsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SensorsService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, server SensorsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetStatus(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterSensorsServiceHandlerServer registers the http handlers for service SensorsService to "mux". // UnaryRPC :call SensorsServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -323,6 +375,31 @@ func RegisterSensorsServiceHandlerServer(ctx context.Context, mux *runtime.Serve }) + mux.Handle("GET", pattern_SensorsService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.service.sensors.v1.SensorsService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/service/sensors/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SensorsService_GetStatus_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SensorsService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -430,6 +507,28 @@ func RegisterSensorsServiceHandlerClient(ctx context.Context, mux *runtime.Serve }) + mux.Handle("GET", pattern_SensorsService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.sensors.v1.SensorsService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/service/sensors/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SensorsService_GetStatus_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SensorsService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -439,6 +538,8 @@ var ( pattern_SensorsService_GetReadings_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "sensors", "name", "readings"}, "")) pattern_SensorsService_DoCommand_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "sensors", "name", "do_command"}, "")) + + pattern_SensorsService_GetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "sensors", "name", "get_status"}, "")) ) var ( @@ -447,4 +548,6 @@ var ( forward_SensorsService_GetReadings_0 = runtime.ForwardResponseMessage forward_SensorsService_DoCommand_0 = runtime.ForwardResponseMessage + + forward_SensorsService_GetStatus_0 = runtime.ForwardResponseMessage ) diff --git a/service/sensors/v1/sensors_grpc.pb.go b/service/sensors/v1/sensors_grpc.pb.go index fe173ab43e..4b8c71ce07 100644 --- a/service/sensors/v1/sensors_grpc.pb.go +++ b/service/sensors/v1/sensors_grpc.pb.go @@ -32,6 +32,8 @@ type SensorsServiceClient interface { // Deprecated: Do not use. // DoCommand sends/receives arbitrary commands DoCommand(ctx context.Context, in *v1.DoCommandRequest, opts ...grpc.CallOption) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) } type sensorsServiceClient struct { @@ -72,6 +74,15 @@ func (c *sensorsServiceClient) DoCommand(ctx context.Context, in *v1.DoCommandRe return out, nil } +func (c *sensorsServiceClient) GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) { + out := new(v1.GetStatusResponse) + err := c.cc.Invoke(ctx, "/viam.service.sensors.v1.SensorsService/GetStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // SensorsServiceServer is the server API for SensorsService service. // All implementations must embed UnimplementedSensorsServiceServer // for forward compatibility @@ -85,6 +96,8 @@ type SensorsServiceServer interface { // Deprecated: Do not use. // DoCommand sends/receives arbitrary commands DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) mustEmbedUnimplementedSensorsServiceServer() } @@ -101,6 +114,9 @@ func (UnimplementedSensorsServiceServer) GetReadings(context.Context, *GetReadin func (UnimplementedSensorsServiceServer) DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DoCommand not implemented") } +func (UnimplementedSensorsServiceServer) GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented") +} func (UnimplementedSensorsServiceServer) mustEmbedUnimplementedSensorsServiceServer() {} // UnsafeSensorsServiceServer may be embedded to opt out of forward compatibility for this service. @@ -168,6 +184,24 @@ func _SensorsService_DoCommand_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _SensorsService_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SensorsServiceServer).GetStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.service.sensors.v1.SensorsService/GetStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SensorsServiceServer).GetStatus(ctx, req.(*v1.GetStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + // SensorsService_ServiceDesc is the grpc.ServiceDesc for SensorsService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -187,6 +221,10 @@ var SensorsService_ServiceDesc = grpc.ServiceDesc{ MethodName: "DoCommand", Handler: _SensorsService_DoCommand_Handler, }, + { + MethodName: "GetStatus", + Handler: _SensorsService_GetStatus_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "service/sensors/v1/sensors.proto", diff --git a/service/shell/v1/shell.pb.go b/service/shell/v1/shell.pb.go index 109c10c604..e26255c3c0 100644 --- a/service/shell/v1/shell.pb.go +++ b/service/shell/v1/shell.pb.go @@ -940,7 +940,7 @@ var file_service_shell_v1_shell_proto_rawDesc = []byte{ 0x54, 0x4f, 0x52, 0x59, 0x10, 0x02, 0x12, 0x29, 0x0a, 0x25, 0x43, 0x4f, 0x50, 0x59, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x53, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x55, 0x4c, 0x54, 0x49, 0x50, 0x4c, 0x45, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x53, 0x10, - 0x03, 0x32, 0xf4, 0x03, 0x0a, 0x0c, 0x53, 0x68, 0x65, 0x6c, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x03, 0x32, 0xfd, 0x04, 0x0a, 0x0c, 0x53, 0x68, 0x65, 0x6c, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x56, 0x0a, 0x05, 0x53, 0x68, 0x65, 0x6c, 0x6c, 0x12, 0x23, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, @@ -971,11 +971,20 @@ var file_service_shell_v1_shell_proto_rawDesc = []byte{ 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x22, 0x2c, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x64, 0x6f, - 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x42, 0x3d, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, - 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x68, 0x65, - 0x6c, 0x6c, 0x2e, 0x76, 0x31, 0x5a, 0x20, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, - 0x68, 0x65, 0x6c, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x86, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x2f, + 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x42, 0x3d, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x2e, 0x76, 0x31, 0x5a, 0x20, + 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x2f, 0x76, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1007,7 +1016,9 @@ var file_service_shell_v1_shell_proto_goTypes = []any{ (*structpb.Struct)(nil), // 11: google.protobuf.Struct (*timestamppb.Timestamp)(nil), // 12: google.protobuf.Timestamp (*v1.DoCommandRequest)(nil), // 13: viam.common.v1.DoCommandRequest - (*v1.DoCommandResponse)(nil), // 14: viam.common.v1.DoCommandResponse + (*v1.GetStatusRequest)(nil), // 14: viam.common.v1.GetStatusRequest + (*v1.DoCommandResponse)(nil), // 15: viam.common.v1.DoCommandResponse + (*v1.GetStatusResponse)(nil), // 16: viam.common.v1.GetStatusResponse } var file_service_shell_v1_shell_proto_depIdxs = []int32{ 11, // 0: viam.service.shell.v1.ShellRequest.extra:type_name -> google.protobuf.Struct @@ -1025,12 +1036,14 @@ var file_service_shell_v1_shell_proto_depIdxs = []int32{ 5, // 12: viam.service.shell.v1.ShellService.CopyFilesToMachine:input_type -> viam.service.shell.v1.CopyFilesToMachineRequest 8, // 13: viam.service.shell.v1.ShellService.CopyFilesFromMachine:input_type -> viam.service.shell.v1.CopyFilesFromMachineRequest 13, // 14: viam.service.shell.v1.ShellService.DoCommand:input_type -> viam.common.v1.DoCommandRequest - 2, // 15: viam.service.shell.v1.ShellService.Shell:output_type -> viam.service.shell.v1.ShellResponse - 6, // 16: viam.service.shell.v1.ShellService.CopyFilesToMachine:output_type -> viam.service.shell.v1.CopyFilesToMachineResponse - 10, // 17: viam.service.shell.v1.ShellService.CopyFilesFromMachine:output_type -> viam.service.shell.v1.CopyFilesFromMachineResponse - 14, // 18: viam.service.shell.v1.ShellService.DoCommand:output_type -> viam.common.v1.DoCommandResponse - 15, // [15:19] is the sub-list for method output_type - 11, // [11:15] is the sub-list for method input_type + 14, // 15: viam.service.shell.v1.ShellService.GetStatus:input_type -> viam.common.v1.GetStatusRequest + 2, // 16: viam.service.shell.v1.ShellService.Shell:output_type -> viam.service.shell.v1.ShellResponse + 6, // 17: viam.service.shell.v1.ShellService.CopyFilesToMachine:output_type -> viam.service.shell.v1.CopyFilesToMachineResponse + 10, // 18: viam.service.shell.v1.ShellService.CopyFilesFromMachine:output_type -> viam.service.shell.v1.CopyFilesFromMachineResponse + 15, // 19: viam.service.shell.v1.ShellService.DoCommand:output_type -> viam.common.v1.DoCommandResponse + 16, // 20: viam.service.shell.v1.ShellService.GetStatus:output_type -> viam.common.v1.GetStatusResponse + 16, // [16:21] is the sub-list for method output_type + 11, // [11:16] is the sub-list for method input_type 11, // [11:11] is the sub-list for extension type_name 11, // [11:11] is the sub-list for extension extendee 0, // [0:11] is the sub-list for field type_name diff --git a/service/shell/v1/shell.pb.gw.go b/service/shell/v1/shell.pb.gw.go index ef031f8619..b46b2801cc 100644 --- a/service/shell/v1/shell.pb.gw.go +++ b/service/shell/v1/shell.pb.gw.go @@ -231,6 +231,58 @@ func local_request_ShellService_DoCommand_0(ctx context.Context, marshaler runti } +func request_ShellService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, client ShellServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_ShellService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, server ShellServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetStatus(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterShellServiceHandlerServer registers the http handlers for service ShellService to "mux". // UnaryRPC :call ShellServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -283,6 +335,31 @@ func RegisterShellServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu }) + mux.Handle("GET", pattern_ShellService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.service.shell.v1.ShellService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/service/shell/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ShellService_GetStatus_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_ShellService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -412,6 +489,28 @@ func RegisterShellServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu }) + mux.Handle("GET", pattern_ShellService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.shell.v1.ShellService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/service/shell/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ShellService_GetStatus_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_ShellService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -423,6 +522,8 @@ var ( pattern_ShellService_CopyFilesFromMachine_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"viam.service.shell.v1.ShellService", "CopyFilesFromMachine"}, "")) pattern_ShellService_DoCommand_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "shell", "name", "do_command"}, "")) + + pattern_ShellService_GetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "shell", "name", "get_status"}, "")) ) var ( @@ -433,4 +534,6 @@ var ( forward_ShellService_CopyFilesFromMachine_0 = runtime.ForwardResponseStream forward_ShellService_DoCommand_0 = runtime.ForwardResponseMessage + + forward_ShellService_GetStatus_0 = runtime.ForwardResponseMessage ) diff --git a/service/shell/v1/shell_grpc.pb.go b/service/shell/v1/shell_grpc.pb.go index 509c2b697b..bfcf47c06f 100644 --- a/service/shell/v1/shell_grpc.pb.go +++ b/service/shell/v1/shell_grpc.pb.go @@ -44,6 +44,8 @@ type ShellServiceClient interface { CopyFilesFromMachine(ctx context.Context, opts ...grpc.CallOption) (ShellService_CopyFilesFromMachineClient, error) // DoCommand sends/receives arbitrary commands DoCommand(ctx context.Context, in *v1.DoCommandRequest, opts ...grpc.CallOption) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) } type shellServiceClient struct { @@ -156,6 +158,15 @@ func (c *shellServiceClient) DoCommand(ctx context.Context, in *v1.DoCommandRequ return out, nil } +func (c *shellServiceClient) GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) { + out := new(v1.GetStatusResponse) + err := c.cc.Invoke(ctx, "/viam.service.shell.v1.ShellService/GetStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // ShellServiceServer is the server API for ShellService service. // All implementations must embed UnimplementedShellServiceServer // for forward compatibility @@ -181,6 +192,8 @@ type ShellServiceServer interface { CopyFilesFromMachine(ShellService_CopyFilesFromMachineServer) error // DoCommand sends/receives arbitrary commands DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) mustEmbedUnimplementedShellServiceServer() } @@ -200,6 +213,9 @@ func (UnimplementedShellServiceServer) CopyFilesFromMachine(ShellService_CopyFil func (UnimplementedShellServiceServer) DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DoCommand not implemented") } +func (UnimplementedShellServiceServer) GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented") +} func (UnimplementedShellServiceServer) mustEmbedUnimplementedShellServiceServer() {} // UnsafeShellServiceServer may be embedded to opt out of forward compatibility for this service. @@ -309,6 +325,24 @@ func _ShellService_DoCommand_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } +func _ShellService_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ShellServiceServer).GetStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.service.shell.v1.ShellService/GetStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ShellServiceServer).GetStatus(ctx, req.(*v1.GetStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + // ShellService_ServiceDesc is the grpc.ServiceDesc for ShellService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -320,6 +354,10 @@ var ShellService_ServiceDesc = grpc.ServiceDesc{ MethodName: "DoCommand", Handler: _ShellService_DoCommand_Handler, }, + { + MethodName: "GetStatus", + Handler: _ShellService_GetStatus_Handler, + }, }, Streams: []grpc.StreamDesc{ { diff --git a/service/slam/v1/slam.pb.go b/service/slam/v1/slam.pb.go index 683b8fb13b..61d72458a5 100644 --- a/service/slam/v1/slam.pb.go +++ b/service/slam/v1/slam.pb.go @@ -678,7 +678,7 @@ var file_service_slam_v1_slam_proto_rawDesc = []byte{ 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x41, 0x4d, 0x45, 0x52, 0x41, 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x53, 0x45, 0x4e, 0x53, 0x4f, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x4f, 0x56, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x53, 0x45, 0x4e, 0x53, 0x4f, 0x52, 0x10, 0x02, 0x32, - 0xac, 0x06, 0x0a, 0x0b, 0x53, 0x4c, 0x41, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0xb4, 0x07, 0x0a, 0x0b, 0x53, 0x4c, 0x41, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x95, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x6c, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, @@ -728,12 +728,20 @@ var file_service_slam_v1_slam_proto_rawDesc = []byte{ 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x22, 0x2b, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, 0x6c, 0x61, 0x6d, 0x2f, 0x7b, 0x6e, 0x61, - 0x6d, 0x65, 0x7d, 0x2f, 0x64, 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x42, 0x3b, - 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x73, 0x6c, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x5a, 0x1f, 0x67, 0x6f, 0x2e, 0x76, - 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2f, 0x73, 0x6c, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x6d, 0x65, 0x7d, 0x2f, 0x64, 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x85, + 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x2e, 0x76, + 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, + 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x76, 0x69, 0x61, 0x6d, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, + 0x73, 0x6c, 0x61, 0x6d, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x74, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x3b, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x6c, 0x61, 0x6d, 0x2e, + 0x76, 0x31, 0x5a, 0x1f, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, 0x6c, 0x61, 0x6d, + 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -764,7 +772,9 @@ var file_service_slam_v1_slam_proto_goTypes = []any{ (*SensorInfo)(nil), // 10: viam.service.slam.v1.SensorInfo (*v1.Pose)(nil), // 11: viam.common.v1.Pose (*v1.DoCommandRequest)(nil), // 12: viam.common.v1.DoCommandRequest - (*v1.DoCommandResponse)(nil), // 13: viam.common.v1.DoCommandResponse + (*v1.GetStatusRequest)(nil), // 13: viam.common.v1.GetStatusRequest + (*v1.DoCommandResponse)(nil), // 14: viam.common.v1.DoCommandResponse + (*v1.GetStatusResponse)(nil), // 15: viam.common.v1.GetStatusResponse } var file_service_slam_v1_slam_proto_depIdxs = []int32{ 11, // 0: viam.service.slam.v1.GetPositionResponse.pose:type_name -> viam.common.v1.Pose @@ -776,13 +786,15 @@ var file_service_slam_v1_slam_proto_depIdxs = []int32{ 6, // 6: viam.service.slam.v1.SLAMService.GetInternalState:input_type -> viam.service.slam.v1.GetInternalStateRequest 8, // 7: viam.service.slam.v1.SLAMService.GetProperties:input_type -> viam.service.slam.v1.GetPropertiesRequest 12, // 8: viam.service.slam.v1.SLAMService.DoCommand:input_type -> viam.common.v1.DoCommandRequest - 3, // 9: viam.service.slam.v1.SLAMService.GetPosition:output_type -> viam.service.slam.v1.GetPositionResponse - 5, // 10: viam.service.slam.v1.SLAMService.GetPointCloudMap:output_type -> viam.service.slam.v1.GetPointCloudMapResponse - 7, // 11: viam.service.slam.v1.SLAMService.GetInternalState:output_type -> viam.service.slam.v1.GetInternalStateResponse - 9, // 12: viam.service.slam.v1.SLAMService.GetProperties:output_type -> viam.service.slam.v1.GetPropertiesResponse - 13, // 13: viam.service.slam.v1.SLAMService.DoCommand:output_type -> viam.common.v1.DoCommandResponse - 9, // [9:14] is the sub-list for method output_type - 4, // [4:9] is the sub-list for method input_type + 13, // 9: viam.service.slam.v1.SLAMService.GetStatus:input_type -> viam.common.v1.GetStatusRequest + 3, // 10: viam.service.slam.v1.SLAMService.GetPosition:output_type -> viam.service.slam.v1.GetPositionResponse + 5, // 11: viam.service.slam.v1.SLAMService.GetPointCloudMap:output_type -> viam.service.slam.v1.GetPointCloudMapResponse + 7, // 12: viam.service.slam.v1.SLAMService.GetInternalState:output_type -> viam.service.slam.v1.GetInternalStateResponse + 9, // 13: viam.service.slam.v1.SLAMService.GetProperties:output_type -> viam.service.slam.v1.GetPropertiesResponse + 14, // 14: viam.service.slam.v1.SLAMService.DoCommand:output_type -> viam.common.v1.DoCommandResponse + 15, // 15: viam.service.slam.v1.SLAMService.GetStatus:output_type -> viam.common.v1.GetStatusResponse + 10, // [10:16] is the sub-list for method output_type + 4, // [4:10] is the sub-list for method input_type 4, // [4:4] is the sub-list for extension type_name 4, // [4:4] is the sub-list for extension extendee 0, // [0:4] is the sub-list for field type_name diff --git a/service/slam/v1/slam.pb.gw.go b/service/slam/v1/slam.pb.gw.go index 99090f7efe..56fb242f8f 100644 --- a/service/slam/v1/slam.pb.gw.go +++ b/service/slam/v1/slam.pb.gw.go @@ -285,6 +285,58 @@ func local_request_SLAMService_DoCommand_0(ctx context.Context, marshaler runtim } +func request_SLAMService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, client SLAMServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SLAMService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, server SLAMServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetStatus(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterSLAMServiceHandlerServer registers the http handlers for service SLAMService to "mux". // UnaryRPC :call SLAMServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -380,6 +432,31 @@ func RegisterSLAMServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux }) + mux.Handle("GET", pattern_SLAMService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.service.slam.v1.SLAMService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/service/slam/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SLAMService_GetStatus_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SLAMService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -531,6 +608,28 @@ func RegisterSLAMServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux }) + mux.Handle("GET", pattern_SLAMService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.slam.v1.SLAMService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/service/slam/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SLAMService_GetStatus_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SLAMService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -544,6 +643,8 @@ var ( pattern_SLAMService_GetProperties_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "slam", "name", "properties"}, "")) pattern_SLAMService_DoCommand_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "slam", "name", "do_command"}, "")) + + pattern_SLAMService_GetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "slam", "name", "get_status"}, "")) ) var ( @@ -556,4 +657,6 @@ var ( forward_SLAMService_GetProperties_0 = runtime.ForwardResponseMessage forward_SLAMService_DoCommand_0 = runtime.ForwardResponseMessage + + forward_SLAMService_GetStatus_0 = runtime.ForwardResponseMessage ) diff --git a/service/slam/v1/slam_grpc.pb.go b/service/slam/v1/slam_grpc.pb.go index dd913fd1f5..a236d9eea8 100644 --- a/service/slam/v1/slam_grpc.pb.go +++ b/service/slam/v1/slam_grpc.pb.go @@ -39,6 +39,8 @@ type SLAMServiceClient interface { GetProperties(ctx context.Context, in *GetPropertiesRequest, opts ...grpc.CallOption) (*GetPropertiesResponse, error) // DoCommand sends/receives arbitrary commands. DoCommand(ctx context.Context, in *v1.DoCommandRequest, opts ...grpc.CallOption) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) } type sLAMServiceClient struct { @@ -140,6 +142,15 @@ func (c *sLAMServiceClient) DoCommand(ctx context.Context, in *v1.DoCommandReque return out, nil } +func (c *sLAMServiceClient) GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) { + out := new(v1.GetStatusResponse) + err := c.cc.Invoke(ctx, "/viam.service.slam.v1.SLAMService/GetStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // SLAMServiceServer is the server API for SLAMService service. // All implementations must embed UnimplementedSLAMServiceServer // for forward compatibility @@ -160,6 +171,8 @@ type SLAMServiceServer interface { GetProperties(context.Context, *GetPropertiesRequest) (*GetPropertiesResponse, error) // DoCommand sends/receives arbitrary commands. DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) mustEmbedUnimplementedSLAMServiceServer() } @@ -182,6 +195,9 @@ func (UnimplementedSLAMServiceServer) GetProperties(context.Context, *GetPropert func (UnimplementedSLAMServiceServer) DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DoCommand not implemented") } +func (UnimplementedSLAMServiceServer) GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented") +} func (UnimplementedSLAMServiceServer) mustEmbedUnimplementedSLAMServiceServer() {} // UnsafeSLAMServiceServer may be embedded to opt out of forward compatibility for this service. @@ -291,6 +307,24 @@ func _SLAMService_DoCommand_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } +func _SLAMService_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SLAMServiceServer).GetStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.service.slam.v1.SLAMService/GetStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SLAMServiceServer).GetStatus(ctx, req.(*v1.GetStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + // SLAMService_ServiceDesc is the grpc.ServiceDesc for SLAMService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -310,6 +344,10 @@ var SLAMService_ServiceDesc = grpc.ServiceDesc{ MethodName: "DoCommand", Handler: _SLAMService_DoCommand_Handler, }, + { + MethodName: "GetStatus", + Handler: _SLAMService_GetStatus_Handler, + }, }, Streams: []grpc.StreamDesc{ { diff --git a/service/video/v1/video.pb.go b/service/video/v1/video.pb.go index 5973714845..057ad91ef2 100644 --- a/service/video/v1/video.pb.go +++ b/service/video/v1/video.pb.go @@ -229,7 +229,7 @@ var file_service_video_v1_video_proto_rawDesc = []byte{ 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x32, 0xb3, 0x02, 0x0a, 0x0c, + 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x32, 0xbc, 0x03, 0x0a, 0x0c, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x99, 0x01, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x12, 0x26, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2e, 0x76, @@ -249,11 +249,20 @@ var file_service_video_v1_video_proto_rawDesc = []byte{ 0x93, 0x02, 0x2e, 0x22, 0x2c, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x64, 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, - 0x64, 0x42, 0x3d, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2e, 0x76, 0x31, 0x5a, 0x20, - 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f, 0x76, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x64, 0x12, 0x86, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x20, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x21, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x76, + 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2f, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, + 0x67, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x3d, 0x0a, 0x19, 0x63, 0x6f, + 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, + 0x69, 0x64, 0x65, 0x6f, 0x2e, 0x76, 0x31, 0x5a, 0x20, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2f, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -275,7 +284,9 @@ var file_service_video_v1_video_proto_goTypes = []any{ (*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp (*structpb.Struct)(nil), // 3: google.protobuf.Struct (*v1.DoCommandRequest)(nil), // 4: viam.common.v1.DoCommandRequest - (*v1.DoCommandResponse)(nil), // 5: viam.common.v1.DoCommandResponse + (*v1.GetStatusRequest)(nil), // 5: viam.common.v1.GetStatusRequest + (*v1.DoCommandResponse)(nil), // 6: viam.common.v1.DoCommandResponse + (*v1.GetStatusResponse)(nil), // 7: viam.common.v1.GetStatusResponse } var file_service_video_v1_video_proto_depIdxs = []int32{ 2, // 0: viam.service.video.v1.GetVideoRequest.start_timestamp:type_name -> google.protobuf.Timestamp @@ -283,10 +294,12 @@ var file_service_video_v1_video_proto_depIdxs = []int32{ 3, // 2: viam.service.video.v1.GetVideoRequest.extra:type_name -> google.protobuf.Struct 0, // 3: viam.service.video.v1.VideoService.GetVideo:input_type -> viam.service.video.v1.GetVideoRequest 4, // 4: viam.service.video.v1.VideoService.DoCommand:input_type -> viam.common.v1.DoCommandRequest - 1, // 5: viam.service.video.v1.VideoService.GetVideo:output_type -> viam.service.video.v1.GetVideoResponse - 5, // 6: viam.service.video.v1.VideoService.DoCommand:output_type -> viam.common.v1.DoCommandResponse - 5, // [5:7] is the sub-list for method output_type - 3, // [3:5] is the sub-list for method input_type + 5, // 5: viam.service.video.v1.VideoService.GetStatus:input_type -> viam.common.v1.GetStatusRequest + 1, // 6: viam.service.video.v1.VideoService.GetVideo:output_type -> viam.service.video.v1.GetVideoResponse + 6, // 7: viam.service.video.v1.VideoService.DoCommand:output_type -> viam.common.v1.DoCommandResponse + 7, // 8: viam.service.video.v1.VideoService.GetStatus:output_type -> viam.common.v1.GetStatusResponse + 6, // [6:9] is the sub-list for method output_type + 3, // [3:6] is the sub-list for method input_type 3, // [3:3] is the sub-list for extension type_name 3, // [3:3] is the sub-list for extension extendee 0, // [0:3] is the sub-list for field type_name diff --git a/service/video/v1/video.pb.gw.go b/service/video/v1/video.pb.gw.go index 7c7fe9c693..645b0112ae 100644 --- a/service/video/v1/video.pb.gw.go +++ b/service/video/v1/video.pb.gw.go @@ -147,6 +147,58 @@ func local_request_VideoService_DoCommand_0(ctx context.Context, marshaler runti } +func request_VideoService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, client VideoServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_VideoService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, server VideoServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetStatus(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterVideoServiceHandlerServer registers the http handlers for service VideoService to "mux". // UnaryRPC :call VideoServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -185,6 +237,31 @@ func RegisterVideoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu }) + mux.Handle("GET", pattern_VideoService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.service.video.v1.VideoService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/service/video/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_VideoService_GetStatus_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_VideoService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -270,6 +347,28 @@ func RegisterVideoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu }) + mux.Handle("GET", pattern_VideoService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.video.v1.VideoService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/service/video/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_VideoService_GetStatus_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_VideoService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -277,10 +376,14 @@ var ( pattern_VideoService_GetVideo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "video", "name", "get_video_stream"}, "")) pattern_VideoService_DoCommand_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "video", "name", "do_command"}, "")) + + pattern_VideoService_GetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "video", "name", "get_status"}, "")) ) var ( forward_VideoService_GetVideo_0 = runtime.ForwardResponseStream forward_VideoService_DoCommand_0 = runtime.ForwardResponseMessage + + forward_VideoService_GetStatus_0 = runtime.ForwardResponseMessage ) diff --git a/service/video/v1/video_grpc.pb.go b/service/video/v1/video_grpc.pb.go index 38d6f8fd84..3fa0668081 100644 --- a/service/video/v1/video_grpc.pb.go +++ b/service/video/v1/video_grpc.pb.go @@ -27,6 +27,8 @@ type VideoServiceClient interface { GetVideo(ctx context.Context, in *GetVideoRequest, opts ...grpc.CallOption) (VideoService_GetVideoClient, error) // DoCommand sends/receives arbitrary commands DoCommand(ctx context.Context, in *v1.DoCommandRequest, opts ...grpc.CallOption) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) } type videoServiceClient struct { @@ -78,6 +80,15 @@ func (c *videoServiceClient) DoCommand(ctx context.Context, in *v1.DoCommandRequ return out, nil } +func (c *videoServiceClient) GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) { + out := new(v1.GetStatusResponse) + err := c.cc.Invoke(ctx, "/viam.service.video.v1.VideoService/GetStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // VideoServiceServer is the server API for VideoService service. // All implementations must embed UnimplementedVideoServiceServer // for forward compatibility @@ -86,6 +97,8 @@ type VideoServiceServer interface { GetVideo(*GetVideoRequest, VideoService_GetVideoServer) error // DoCommand sends/receives arbitrary commands DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) mustEmbedUnimplementedVideoServiceServer() } @@ -99,6 +112,9 @@ func (UnimplementedVideoServiceServer) GetVideo(*GetVideoRequest, VideoService_G func (UnimplementedVideoServiceServer) DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DoCommand not implemented") } +func (UnimplementedVideoServiceServer) GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented") +} func (UnimplementedVideoServiceServer) mustEmbedUnimplementedVideoServiceServer() {} // UnsafeVideoServiceServer may be embedded to opt out of forward compatibility for this service. @@ -151,6 +167,24 @@ func _VideoService_DoCommand_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } +func _VideoService_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VideoServiceServer).GetStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.service.video.v1.VideoService/GetStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VideoServiceServer).GetStatus(ctx, req.(*v1.GetStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + // VideoService_ServiceDesc is the grpc.ServiceDesc for VideoService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -162,6 +196,10 @@ var VideoService_ServiceDesc = grpc.ServiceDesc{ MethodName: "DoCommand", Handler: _VideoService_DoCommand_Handler, }, + { + MethodName: "GetStatus", + Handler: _VideoService_GetStatus_Handler, + }, }, Streams: []grpc.StreamDesc{ { diff --git a/service/vision/v1/vision.pb.go b/service/vision/v1/vision.pb.go index 81055f4e8f..a418f36f6a 100644 --- a/service/vision/v1/vision.pb.go +++ b/service/vision/v1/vision.pb.go @@ -1329,7 +1329,7 @@ var file_service_vision_v1_vision_proto_rawDesc = []byte{ 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x73, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x73, 0x53, - 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x32, 0xcd, 0x0b, 0x0a, 0x0d, 0x56, 0x69, 0x73, + 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x32, 0xd7, 0x0c, 0x0a, 0x0d, 0x56, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xc8, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x43, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x12, 0x36, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, @@ -1422,12 +1422,20 @@ var file_service_vision_v1_vision_proto_rawDesc = []byte{ 0x65, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x22, 0x2d, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x64, 0x6f, - 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x42, 0x3f, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, - 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x69, 0x73, - 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x5a, 0x21, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, - 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x87, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x42, 0x3f, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x5a, 0x21, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1464,7 +1472,9 @@ var file_service_vision_v1_vision_proto_goTypes = []any{ (*v1.PointCloudObject)(nil), // 17: viam.common.v1.PointCloudObject (*v11.Image)(nil), // 18: viam.component.camera.v1.Image (*v1.DoCommandRequest)(nil), // 19: viam.common.v1.DoCommandRequest - (*v1.DoCommandResponse)(nil), // 20: viam.common.v1.DoCommandResponse + (*v1.GetStatusRequest)(nil), // 20: viam.common.v1.GetStatusRequest + (*v1.DoCommandResponse)(nil), // 21: viam.common.v1.DoCommandResponse + (*v1.GetStatusResponse)(nil), // 22: viam.common.v1.GetStatusResponse } var file_service_vision_v1_vision_proto_depIdxs = []int32{ 16, // 0: viam.service.vision.v1.GetDetectionsRequest.extra:type_name -> google.protobuf.Struct @@ -1492,16 +1502,18 @@ var file_service_vision_v1_vision_proto_depIdxs = []int32{ 12, // 22: viam.service.vision.v1.VisionService.GetProperties:input_type -> viam.service.vision.v1.GetPropertiesRequest 13, // 23: viam.service.vision.v1.VisionService.CaptureAllFromCamera:input_type -> viam.service.vision.v1.CaptureAllFromCameraRequest 19, // 24: viam.service.vision.v1.VisionService.DoCommand:input_type -> viam.common.v1.DoCommandRequest - 3, // 25: viam.service.vision.v1.VisionService.GetDetectionsFromCamera:output_type -> viam.service.vision.v1.GetDetectionsFromCameraResponse - 1, // 26: viam.service.vision.v1.VisionService.GetDetections:output_type -> viam.service.vision.v1.GetDetectionsResponse - 8, // 27: viam.service.vision.v1.VisionService.GetClassificationsFromCamera:output_type -> viam.service.vision.v1.GetClassificationsFromCameraResponse - 6, // 28: viam.service.vision.v1.VisionService.GetClassifications:output_type -> viam.service.vision.v1.GetClassificationsResponse - 11, // 29: viam.service.vision.v1.VisionService.GetObjectPointClouds:output_type -> viam.service.vision.v1.GetObjectPointCloudsResponse - 15, // 30: viam.service.vision.v1.VisionService.GetProperties:output_type -> viam.service.vision.v1.GetPropertiesResponse - 14, // 31: viam.service.vision.v1.VisionService.CaptureAllFromCamera:output_type -> viam.service.vision.v1.CaptureAllFromCameraResponse - 20, // 32: viam.service.vision.v1.VisionService.DoCommand:output_type -> viam.common.v1.DoCommandResponse - 25, // [25:33] is the sub-list for method output_type - 17, // [17:25] is the sub-list for method input_type + 20, // 25: viam.service.vision.v1.VisionService.GetStatus:input_type -> viam.common.v1.GetStatusRequest + 3, // 26: viam.service.vision.v1.VisionService.GetDetectionsFromCamera:output_type -> viam.service.vision.v1.GetDetectionsFromCameraResponse + 1, // 27: viam.service.vision.v1.VisionService.GetDetections:output_type -> viam.service.vision.v1.GetDetectionsResponse + 8, // 28: viam.service.vision.v1.VisionService.GetClassificationsFromCamera:output_type -> viam.service.vision.v1.GetClassificationsFromCameraResponse + 6, // 29: viam.service.vision.v1.VisionService.GetClassifications:output_type -> viam.service.vision.v1.GetClassificationsResponse + 11, // 30: viam.service.vision.v1.VisionService.GetObjectPointClouds:output_type -> viam.service.vision.v1.GetObjectPointCloudsResponse + 15, // 31: viam.service.vision.v1.VisionService.GetProperties:output_type -> viam.service.vision.v1.GetPropertiesResponse + 14, // 32: viam.service.vision.v1.VisionService.CaptureAllFromCamera:output_type -> viam.service.vision.v1.CaptureAllFromCameraResponse + 21, // 33: viam.service.vision.v1.VisionService.DoCommand:output_type -> viam.common.v1.DoCommandResponse + 22, // 34: viam.service.vision.v1.VisionService.GetStatus:output_type -> viam.common.v1.GetStatusResponse + 26, // [26:35] is the sub-list for method output_type + 17, // [17:26] is the sub-list for method input_type 17, // [17:17] is the sub-list for extension type_name 17, // [17:17] is the sub-list for extension extendee 0, // [0:17] is the sub-list for field type_name diff --git a/service/vision/v1/vision.pb.gw.go b/service/vision/v1/vision.pb.gw.go index 8c5a9df2db..78d5f289df 100644 --- a/service/vision/v1/vision.pb.gw.go +++ b/service/vision/v1/vision.pb.gw.go @@ -592,6 +592,58 @@ func local_request_VisionService_DoCommand_0(ctx context.Context, marshaler runt } +func request_VisionService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, client VisionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1_0.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_VisionService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, server VisionServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1_0.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetStatus(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterVisionServiceHandlerServer registers the http handlers for service VisionService to "mux". // UnaryRPC :call VisionServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -798,6 +850,31 @@ func RegisterVisionServiceHandlerServer(ctx context.Context, mux *runtime.ServeM }) + mux.Handle("GET", pattern_VisionService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.service.vision.v1.VisionService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/service/vision/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_VisionService_GetStatus_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_VisionService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1015,6 +1092,28 @@ func RegisterVisionServiceHandlerClient(ctx context.Context, mux *runtime.ServeM }) + mux.Handle("GET", pattern_VisionService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.vision.v1.VisionService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/service/vision/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_VisionService_GetStatus_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_VisionService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1034,6 +1133,8 @@ var ( pattern_VisionService_CaptureAllFromCamera_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "vision", "name", "capture_all"}, "")) pattern_VisionService_DoCommand_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "vision", "name", "do_command"}, "")) + + pattern_VisionService_GetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "vision", "name", "get_status"}, "")) ) var ( @@ -1052,4 +1153,6 @@ var ( forward_VisionService_CaptureAllFromCamera_0 = runtime.ForwardResponseMessage forward_VisionService_DoCommand_0 = runtime.ForwardResponseMessage + + forward_VisionService_GetStatus_0 = runtime.ForwardResponseMessage ) diff --git a/service/vision/v1/vision_grpc.pb.go b/service/vision/v1/vision_grpc.pb.go index 7d1075aa92..27ad34b77a 100644 --- a/service/vision/v1/vision_grpc.pb.go +++ b/service/vision/v1/vision_grpc.pb.go @@ -40,6 +40,8 @@ type VisionServiceClient interface { CaptureAllFromCamera(ctx context.Context, in *CaptureAllFromCameraRequest, opts ...grpc.CallOption) (*CaptureAllFromCameraResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(ctx context.Context, in *v1.DoCommandRequest, opts ...grpc.CallOption) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) } type visionServiceClient struct { @@ -122,6 +124,15 @@ func (c *visionServiceClient) DoCommand(ctx context.Context, in *v1.DoCommandReq return out, nil } +func (c *visionServiceClient) GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) { + out := new(v1.GetStatusResponse) + err := c.cc.Invoke(ctx, "/viam.service.vision.v1.VisionService/GetStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // VisionServiceServer is the server API for VisionService service. // All implementations must embed UnimplementedVisionServiceServer // for forward compatibility @@ -143,6 +154,8 @@ type VisionServiceServer interface { CaptureAllFromCamera(context.Context, *CaptureAllFromCameraRequest) (*CaptureAllFromCameraResponse, error) // DoCommand sends/receives arbitrary commands DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) mustEmbedUnimplementedVisionServiceServer() } @@ -174,6 +187,9 @@ func (UnimplementedVisionServiceServer) CaptureAllFromCamera(context.Context, *C func (UnimplementedVisionServiceServer) DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DoCommand not implemented") } +func (UnimplementedVisionServiceServer) GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented") +} func (UnimplementedVisionServiceServer) mustEmbedUnimplementedVisionServiceServer() {} // UnsafeVisionServiceServer may be embedded to opt out of forward compatibility for this service. @@ -331,6 +347,24 @@ func _VisionService_DoCommand_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _VisionService_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VisionServiceServer).GetStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.service.vision.v1.VisionService/GetStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VisionServiceServer).GetStatus(ctx, req.(*v1.GetStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + // VisionService_ServiceDesc is the grpc.ServiceDesc for VisionService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -370,6 +404,10 @@ var VisionService_ServiceDesc = grpc.ServiceDesc{ MethodName: "DoCommand", Handler: _VisionService_DoCommand_Handler, }, + { + MethodName: "GetStatus", + Handler: _VisionService_GetStatus_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "service/vision/v1/vision.proto", diff --git a/service/worldstatestore/v1/world_state_store.pb.go b/service/worldstatestore/v1/world_state_store.pb.go index 1883d36792..07c0e64953 100644 --- a/service/worldstatestore/v1/world_state_store.pb.go +++ b/service/worldstatestore/v1/world_state_store.pb.go @@ -470,7 +470,7 @@ var file_service_worldstatestore_v1_world_state_store_proto_rawDesc = []byte{ 0x4f, 0x52, 0x4d, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x44, 0x10, 0x02, 0x12, 0x21, 0x0a, 0x1d, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x4f, 0x52, 0x4d, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x03, 0x32, 0x8c, 0x05, 0x0a, + 0x50, 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x03, 0x32, 0x9f, 0x06, 0x0a, 0x16, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x74, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x55, 0x49, 0x44, 0x73, 0x12, 0x31, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, @@ -511,13 +511,22 @@ var file_service_worldstatestore_v1_world_state_store_proto_rawDesc = []byte{ 0x93, 0x02, 0x38, 0x22, 0x36, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, - 0x2f, 0x64, 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x42, 0x51, 0x0a, 0x23, 0x63, - 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x31, 0x5a, 0x2a, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x77, 0x6f, 0x72, 0x6c, - 0x64, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2f, 0x64, 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x90, 0x01, 0x0a, 0x09, + 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x2e, 0x76, 0x69, 0x61, 0x6d, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3e, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x12, 0x36, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x77, 0x6f, 0x72, + 0x6c, 0x64, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x7b, 0x6e, 0x61, + 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x51, + 0x0a, 0x23, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x2e, 0x76, 0x31, 0x5a, 0x2a, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x77, + 0x6f, 0x72, 0x6c, 0x64, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x76, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -546,7 +555,9 @@ var file_service_worldstatestore_v1_world_state_store_proto_goTypes = []any{ (*v1.Transform)(nil), // 8: viam.common.v1.Transform (*fieldmaskpb.FieldMask)(nil), // 9: google.protobuf.FieldMask (*v1.DoCommandRequest)(nil), // 10: viam.common.v1.DoCommandRequest - (*v1.DoCommandResponse)(nil), // 11: viam.common.v1.DoCommandResponse + (*v1.GetStatusRequest)(nil), // 11: viam.common.v1.GetStatusRequest + (*v1.DoCommandResponse)(nil), // 12: viam.common.v1.DoCommandResponse + (*v1.GetStatusResponse)(nil), // 13: viam.common.v1.GetStatusResponse } var file_service_worldstatestore_v1_world_state_store_proto_depIdxs = []int32{ 7, // 0: viam.service.worldstatestore.v1.ListUUIDsRequest.extra:type_name -> google.protobuf.Struct @@ -560,12 +571,14 @@ var file_service_worldstatestore_v1_world_state_store_proto_depIdxs = []int32{ 3, // 8: viam.service.worldstatestore.v1.WorldStateStoreService.GetTransform:input_type -> viam.service.worldstatestore.v1.GetTransformRequest 5, // 9: viam.service.worldstatestore.v1.WorldStateStoreService.StreamTransformChanges:input_type -> viam.service.worldstatestore.v1.StreamTransformChangesRequest 10, // 10: viam.service.worldstatestore.v1.WorldStateStoreService.DoCommand:input_type -> viam.common.v1.DoCommandRequest - 2, // 11: viam.service.worldstatestore.v1.WorldStateStoreService.ListUUIDs:output_type -> viam.service.worldstatestore.v1.ListUUIDsResponse - 4, // 12: viam.service.worldstatestore.v1.WorldStateStoreService.GetTransform:output_type -> viam.service.worldstatestore.v1.GetTransformResponse - 6, // 13: viam.service.worldstatestore.v1.WorldStateStoreService.StreamTransformChanges:output_type -> viam.service.worldstatestore.v1.StreamTransformChangesResponse - 11, // 14: viam.service.worldstatestore.v1.WorldStateStoreService.DoCommand:output_type -> viam.common.v1.DoCommandResponse - 11, // [11:15] is the sub-list for method output_type - 7, // [7:11] is the sub-list for method input_type + 11, // 11: viam.service.worldstatestore.v1.WorldStateStoreService.GetStatus:input_type -> viam.common.v1.GetStatusRequest + 2, // 12: viam.service.worldstatestore.v1.WorldStateStoreService.ListUUIDs:output_type -> viam.service.worldstatestore.v1.ListUUIDsResponse + 4, // 13: viam.service.worldstatestore.v1.WorldStateStoreService.GetTransform:output_type -> viam.service.worldstatestore.v1.GetTransformResponse + 6, // 14: viam.service.worldstatestore.v1.WorldStateStoreService.StreamTransformChanges:output_type -> viam.service.worldstatestore.v1.StreamTransformChangesResponse + 12, // 15: viam.service.worldstatestore.v1.WorldStateStoreService.DoCommand:output_type -> viam.common.v1.DoCommandResponse + 13, // 16: viam.service.worldstatestore.v1.WorldStateStoreService.GetStatus:output_type -> viam.common.v1.GetStatusResponse + 12, // [12:17] is the sub-list for method output_type + 7, // [7:12] is the sub-list for method input_type 7, // [7:7] is the sub-list for extension type_name 7, // [7:7] is the sub-list for extension extendee 0, // [0:7] is the sub-list for field type_name diff --git a/service/worldstatestore/v1/world_state_store.pb.gw.go b/service/worldstatestore/v1/world_state_store.pb.gw.go index b1ec5e10c2..ea8b63b581 100644 --- a/service/worldstatestore/v1/world_state_store.pb.gw.go +++ b/service/worldstatestore/v1/world_state_store.pb.gw.go @@ -199,6 +199,58 @@ func local_request_WorldStateStoreService_DoCommand_0(ctx context.Context, marsh } +func request_WorldStateStoreService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, client WorldStateStoreServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorldStateStoreService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, server WorldStateStoreServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.GetStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetStatus(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterWorldStateStoreServiceHandlerServer registers the http handlers for service WorldStateStoreService to "mux". // UnaryRPC :call WorldStateStoreServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -287,6 +339,31 @@ func RegisterWorldStateStoreServiceHandlerServer(ctx context.Context, mux *runti }) + mux.Handle("GET", pattern_WorldStateStoreService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.service.worldstatestore.v1.WorldStateStoreService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/service/worldstatestore/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorldStateStoreService_GetStatus_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorldStateStoreService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -416,6 +493,28 @@ func RegisterWorldStateStoreServiceHandlerClient(ctx context.Context, mux *runti }) + mux.Handle("GET", pattern_WorldStateStoreService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.worldstatestore.v1.WorldStateStoreService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/service/worldstatestore/{name}/get_status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorldStateStoreService_GetStatus_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorldStateStoreService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -427,6 +526,8 @@ var ( pattern_WorldStateStoreService_StreamTransformChanges_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "worldstatestore", "name", "stream_transform_changes"}, "")) pattern_WorldStateStoreService_DoCommand_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "worldstatestore", "name", "do_command"}, "")) + + pattern_WorldStateStoreService_GetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "worldstatestore", "name", "get_status"}, "")) ) var ( @@ -437,4 +538,6 @@ var ( forward_WorldStateStoreService_StreamTransformChanges_0 = runtime.ForwardResponseStream forward_WorldStateStoreService_DoCommand_0 = runtime.ForwardResponseMessage + + forward_WorldStateStoreService_GetStatus_0 = runtime.ForwardResponseMessage ) diff --git a/service/worldstatestore/v1/world_state_store_grpc.pb.go b/service/worldstatestore/v1/world_state_store_grpc.pb.go index 45efeb3237..868123e100 100644 --- a/service/worldstatestore/v1/world_state_store_grpc.pb.go +++ b/service/worldstatestore/v1/world_state_store_grpc.pb.go @@ -31,6 +31,8 @@ type WorldStateStoreServiceClient interface { StreamTransformChanges(ctx context.Context, in *StreamTransformChangesRequest, opts ...grpc.CallOption) (WorldStateStoreService_StreamTransformChangesClient, error) // DoCommand sends/receives arbitrary commands DoCommand(ctx context.Context, in *v1.DoCommandRequest, opts ...grpc.CallOption) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) } type worldStateStoreServiceClient struct { @@ -100,6 +102,15 @@ func (c *worldStateStoreServiceClient) DoCommand(ctx context.Context, in *v1.DoC return out, nil } +func (c *worldStateStoreServiceClient) GetStatus(ctx context.Context, in *v1.GetStatusRequest, opts ...grpc.CallOption) (*v1.GetStatusResponse, error) { + out := new(v1.GetStatusResponse) + err := c.cc.Invoke(ctx, "/viam.service.worldstatestore.v1.WorldStateStoreService/GetStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // WorldStateStoreServiceServer is the server API for WorldStateStoreService service. // All implementations must embed UnimplementedWorldStateStoreServiceServer // for forward compatibility @@ -112,6 +123,8 @@ type WorldStateStoreServiceServer interface { StreamTransformChanges(*StreamTransformChangesRequest, WorldStateStoreService_StreamTransformChangesServer) error // DoCommand sends/receives arbitrary commands DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) + // GetStatus returns the status of the resource + GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) mustEmbedUnimplementedWorldStateStoreServiceServer() } @@ -131,6 +144,9 @@ func (UnimplementedWorldStateStoreServiceServer) StreamTransformChanges(*StreamT func (UnimplementedWorldStateStoreServiceServer) DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DoCommand not implemented") } +func (UnimplementedWorldStateStoreServiceServer) GetStatus(context.Context, *v1.GetStatusRequest) (*v1.GetStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented") +} func (UnimplementedWorldStateStoreServiceServer) mustEmbedUnimplementedWorldStateStoreServiceServer() { } @@ -220,6 +236,24 @@ func _WorldStateStoreService_DoCommand_Handler(srv interface{}, ctx context.Cont return interceptor(ctx, in, info, handler) } +func _WorldStateStoreService_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorldStateStoreServiceServer).GetStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.service.worldstatestore.v1.WorldStateStoreService/GetStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorldStateStoreServiceServer).GetStatus(ctx, req.(*v1.GetStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + // WorldStateStoreService_ServiceDesc is the grpc.ServiceDesc for WorldStateStoreService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -239,6 +273,10 @@ var WorldStateStoreService_ServiceDesc = grpc.ServiceDesc{ MethodName: "DoCommand", Handler: _WorldStateStoreService_DoCommand_Handler, }, + { + MethodName: "GetStatus", + Handler: _WorldStateStoreService_GetStatus_Handler, + }, }, Streams: []grpc.StreamDesc{ {