Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 1 | // Code generated by protoc-gen-go. DO NOT EDIT. |
| 2 | // source: dmi/hw_management_service.proto |
| 3 | |
| 4 | package dmi |
| 5 | |
| 6 | import ( |
| 7 | context "context" |
| 8 | fmt "fmt" |
| 9 | proto "github.com/golang/protobuf/proto" |
| 10 | grpc "google.golang.org/grpc" |
| 11 | math "math" |
| 12 | ) |
| 13 | |
| 14 | // Reference imports to suppress errors if they are not otherwise used. |
| 15 | var _ = proto.Marshal |
| 16 | var _ = fmt.Errorf |
| 17 | var _ = math.Inf |
| 18 | |
| 19 | // This is a compile-time assertion to ensure that this generated file |
| 20 | // is compatible with the proto package it is being compiled against. |
| 21 | // A compilation error at this line likely means your copy of the |
| 22 | // proto package needs to be updated. |
| 23 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package |
| 24 | |
| 25 | type PhysicalInventoryRequest struct { |
| 26 | DeviceUuid *Uuid `protobuf:"bytes,1,opt,name=device_uuid,json=deviceUuid,proto3" json:"device_uuid,omitempty"` |
| 27 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 28 | XXX_unrecognized []byte `json:"-"` |
| 29 | XXX_sizecache int32 `json:"-"` |
| 30 | } |
| 31 | |
| 32 | func (m *PhysicalInventoryRequest) Reset() { *m = PhysicalInventoryRequest{} } |
| 33 | func (m *PhysicalInventoryRequest) String() string { return proto.CompactTextString(m) } |
| 34 | func (*PhysicalInventoryRequest) ProtoMessage() {} |
| 35 | func (*PhysicalInventoryRequest) Descriptor() ([]byte, []int) { |
| 36 | return fileDescriptor_eae902e73066286d, []int{0} |
| 37 | } |
| 38 | |
| 39 | func (m *PhysicalInventoryRequest) XXX_Unmarshal(b []byte) error { |
| 40 | return xxx_messageInfo_PhysicalInventoryRequest.Unmarshal(m, b) |
| 41 | } |
| 42 | func (m *PhysicalInventoryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 43 | return xxx_messageInfo_PhysicalInventoryRequest.Marshal(b, m, deterministic) |
| 44 | } |
| 45 | func (m *PhysicalInventoryRequest) XXX_Merge(src proto.Message) { |
| 46 | xxx_messageInfo_PhysicalInventoryRequest.Merge(m, src) |
| 47 | } |
| 48 | func (m *PhysicalInventoryRequest) XXX_Size() int { |
| 49 | return xxx_messageInfo_PhysicalInventoryRequest.Size(m) |
| 50 | } |
| 51 | func (m *PhysicalInventoryRequest) XXX_DiscardUnknown() { |
| 52 | xxx_messageInfo_PhysicalInventoryRequest.DiscardUnknown(m) |
| 53 | } |
| 54 | |
| 55 | var xxx_messageInfo_PhysicalInventoryRequest proto.InternalMessageInfo |
| 56 | |
| 57 | func (m *PhysicalInventoryRequest) GetDeviceUuid() *Uuid { |
| 58 | if m != nil { |
| 59 | return m.DeviceUuid |
| 60 | } |
| 61 | return nil |
| 62 | } |
| 63 | |
| 64 | type PhysicalInventoryResponse struct { |
| 65 | Status Status `protobuf:"varint,1,opt,name=status,proto3,enum=dmi.Status" json:"status,omitempty"` |
| 66 | Reason Reason `protobuf:"varint,2,opt,name=reason,proto3,enum=dmi.Reason" json:"reason,omitempty"` |
| 67 | Inventory *Hardware `protobuf:"bytes,3,opt,name=inventory,proto3" json:"inventory,omitempty"` |
| 68 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 69 | XXX_unrecognized []byte `json:"-"` |
| 70 | XXX_sizecache int32 `json:"-"` |
| 71 | } |
| 72 | |
| 73 | func (m *PhysicalInventoryResponse) Reset() { *m = PhysicalInventoryResponse{} } |
| 74 | func (m *PhysicalInventoryResponse) String() string { return proto.CompactTextString(m) } |
| 75 | func (*PhysicalInventoryResponse) ProtoMessage() {} |
| 76 | func (*PhysicalInventoryResponse) Descriptor() ([]byte, []int) { |
| 77 | return fileDescriptor_eae902e73066286d, []int{1} |
| 78 | } |
| 79 | |
| 80 | func (m *PhysicalInventoryResponse) XXX_Unmarshal(b []byte) error { |
| 81 | return xxx_messageInfo_PhysicalInventoryResponse.Unmarshal(m, b) |
| 82 | } |
| 83 | func (m *PhysicalInventoryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 84 | return xxx_messageInfo_PhysicalInventoryResponse.Marshal(b, m, deterministic) |
| 85 | } |
| 86 | func (m *PhysicalInventoryResponse) XXX_Merge(src proto.Message) { |
| 87 | xxx_messageInfo_PhysicalInventoryResponse.Merge(m, src) |
| 88 | } |
| 89 | func (m *PhysicalInventoryResponse) XXX_Size() int { |
| 90 | return xxx_messageInfo_PhysicalInventoryResponse.Size(m) |
| 91 | } |
| 92 | func (m *PhysicalInventoryResponse) XXX_DiscardUnknown() { |
| 93 | xxx_messageInfo_PhysicalInventoryResponse.DiscardUnknown(m) |
| 94 | } |
| 95 | |
| 96 | var xxx_messageInfo_PhysicalInventoryResponse proto.InternalMessageInfo |
| 97 | |
| 98 | func (m *PhysicalInventoryResponse) GetStatus() Status { |
| 99 | if m != nil { |
| 100 | return m.Status |
| 101 | } |
| 102 | return Status_UNDEFINED_STATUS |
| 103 | } |
| 104 | |
| 105 | func (m *PhysicalInventoryResponse) GetReason() Reason { |
| 106 | if m != nil { |
| 107 | return m.Reason |
| 108 | } |
| 109 | return Reason_UNDEFINED_REASON |
| 110 | } |
| 111 | |
| 112 | func (m *PhysicalInventoryResponse) GetInventory() *Hardware { |
| 113 | if m != nil { |
| 114 | return m.Inventory |
| 115 | } |
| 116 | return nil |
| 117 | } |
| 118 | |
| 119 | type HWComponentInfoGetRequest struct { |
| 120 | DeviceUuid *Uuid `protobuf:"bytes,1,opt,name=device_uuid,json=deviceUuid,proto3" json:"device_uuid,omitempty"` |
| 121 | ComponentUuid *Uuid `protobuf:"bytes,2,opt,name=component_uuid,json=componentUuid,proto3" json:"component_uuid,omitempty"` |
| 122 | ComponentName string `protobuf:"bytes,3,opt,name=component_name,json=componentName,proto3" json:"component_name,omitempty"` |
| 123 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 124 | XXX_unrecognized []byte `json:"-"` |
| 125 | XXX_sizecache int32 `json:"-"` |
| 126 | } |
| 127 | |
| 128 | func (m *HWComponentInfoGetRequest) Reset() { *m = HWComponentInfoGetRequest{} } |
| 129 | func (m *HWComponentInfoGetRequest) String() string { return proto.CompactTextString(m) } |
| 130 | func (*HWComponentInfoGetRequest) ProtoMessage() {} |
| 131 | func (*HWComponentInfoGetRequest) Descriptor() ([]byte, []int) { |
| 132 | return fileDescriptor_eae902e73066286d, []int{2} |
| 133 | } |
| 134 | |
| 135 | func (m *HWComponentInfoGetRequest) XXX_Unmarshal(b []byte) error { |
| 136 | return xxx_messageInfo_HWComponentInfoGetRequest.Unmarshal(m, b) |
| 137 | } |
| 138 | func (m *HWComponentInfoGetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 139 | return xxx_messageInfo_HWComponentInfoGetRequest.Marshal(b, m, deterministic) |
| 140 | } |
| 141 | func (m *HWComponentInfoGetRequest) XXX_Merge(src proto.Message) { |
| 142 | xxx_messageInfo_HWComponentInfoGetRequest.Merge(m, src) |
| 143 | } |
| 144 | func (m *HWComponentInfoGetRequest) XXX_Size() int { |
| 145 | return xxx_messageInfo_HWComponentInfoGetRequest.Size(m) |
| 146 | } |
| 147 | func (m *HWComponentInfoGetRequest) XXX_DiscardUnknown() { |
| 148 | xxx_messageInfo_HWComponentInfoGetRequest.DiscardUnknown(m) |
| 149 | } |
| 150 | |
| 151 | var xxx_messageInfo_HWComponentInfoGetRequest proto.InternalMessageInfo |
| 152 | |
| 153 | func (m *HWComponentInfoGetRequest) GetDeviceUuid() *Uuid { |
| 154 | if m != nil { |
| 155 | return m.DeviceUuid |
| 156 | } |
| 157 | return nil |
| 158 | } |
| 159 | |
| 160 | func (m *HWComponentInfoGetRequest) GetComponentUuid() *Uuid { |
| 161 | if m != nil { |
| 162 | return m.ComponentUuid |
| 163 | } |
| 164 | return nil |
| 165 | } |
| 166 | |
| 167 | func (m *HWComponentInfoGetRequest) GetComponentName() string { |
| 168 | if m != nil { |
| 169 | return m.ComponentName |
| 170 | } |
| 171 | return "" |
| 172 | } |
| 173 | |
aghosh | c301dcd | 2020-09-03 16:55:34 +0100 | [diff] [blame] | 174 | type HWComponentInfoGetResponse struct { |
| 175 | Status Status `protobuf:"varint,1,opt,name=status,proto3,enum=dmi.Status" json:"status,omitempty"` |
| 176 | Reason Reason `protobuf:"varint,2,opt,name=reason,proto3,enum=dmi.Reason" json:"reason,omitempty"` |
| 177 | Component *Component `protobuf:"bytes,3,opt,name=component,proto3" json:"component,omitempty"` |
| 178 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 179 | XXX_unrecognized []byte `json:"-"` |
| 180 | XXX_sizecache int32 `json:"-"` |
| 181 | } |
| 182 | |
| 183 | func (m *HWComponentInfoGetResponse) Reset() { *m = HWComponentInfoGetResponse{} } |
| 184 | func (m *HWComponentInfoGetResponse) String() string { return proto.CompactTextString(m) } |
| 185 | func (*HWComponentInfoGetResponse) ProtoMessage() {} |
| 186 | func (*HWComponentInfoGetResponse) Descriptor() ([]byte, []int) { |
| 187 | return fileDescriptor_eae902e73066286d, []int{3} |
| 188 | } |
| 189 | |
| 190 | func (m *HWComponentInfoGetResponse) XXX_Unmarshal(b []byte) error { |
| 191 | return xxx_messageInfo_HWComponentInfoGetResponse.Unmarshal(m, b) |
| 192 | } |
| 193 | func (m *HWComponentInfoGetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 194 | return xxx_messageInfo_HWComponentInfoGetResponse.Marshal(b, m, deterministic) |
| 195 | } |
| 196 | func (m *HWComponentInfoGetResponse) XXX_Merge(src proto.Message) { |
| 197 | xxx_messageInfo_HWComponentInfoGetResponse.Merge(m, src) |
| 198 | } |
| 199 | func (m *HWComponentInfoGetResponse) XXX_Size() int { |
| 200 | return xxx_messageInfo_HWComponentInfoGetResponse.Size(m) |
| 201 | } |
| 202 | func (m *HWComponentInfoGetResponse) XXX_DiscardUnknown() { |
| 203 | xxx_messageInfo_HWComponentInfoGetResponse.DiscardUnknown(m) |
| 204 | } |
| 205 | |
| 206 | var xxx_messageInfo_HWComponentInfoGetResponse proto.InternalMessageInfo |
| 207 | |
| 208 | func (m *HWComponentInfoGetResponse) GetStatus() Status { |
| 209 | if m != nil { |
| 210 | return m.Status |
| 211 | } |
| 212 | return Status_UNDEFINED_STATUS |
| 213 | } |
| 214 | |
| 215 | func (m *HWComponentInfoGetResponse) GetReason() Reason { |
| 216 | if m != nil { |
| 217 | return m.Reason |
| 218 | } |
| 219 | return Reason_UNDEFINED_REASON |
| 220 | } |
| 221 | |
| 222 | func (m *HWComponentInfoGetResponse) GetComponent() *Component { |
| 223 | if m != nil { |
| 224 | return m.Component |
| 225 | } |
| 226 | return nil |
| 227 | } |
| 228 | |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 229 | type HWComponentInfoSetRequest struct { |
| 230 | DeviceUuid *Uuid `protobuf:"bytes,1,opt,name=device_uuid,json=deviceUuid,proto3" json:"device_uuid,omitempty"` |
| 231 | ComponentUuid *Uuid `protobuf:"bytes,2,opt,name=component_uuid,json=componentUuid,proto3" json:"component_uuid,omitempty"` |
| 232 | ComponentName string `protobuf:"bytes,3,opt,name=component_name,json=componentName,proto3" json:"component_name,omitempty"` |
| 233 | Changes *ModifiableComponent `protobuf:"bytes,4,opt,name=changes,proto3" json:"changes,omitempty"` |
| 234 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 235 | XXX_unrecognized []byte `json:"-"` |
| 236 | XXX_sizecache int32 `json:"-"` |
| 237 | } |
| 238 | |
| 239 | func (m *HWComponentInfoSetRequest) Reset() { *m = HWComponentInfoSetRequest{} } |
| 240 | func (m *HWComponentInfoSetRequest) String() string { return proto.CompactTextString(m) } |
| 241 | func (*HWComponentInfoSetRequest) ProtoMessage() {} |
| 242 | func (*HWComponentInfoSetRequest) Descriptor() ([]byte, []int) { |
aghosh | c301dcd | 2020-09-03 16:55:34 +0100 | [diff] [blame] | 243 | return fileDescriptor_eae902e73066286d, []int{4} |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 244 | } |
| 245 | |
| 246 | func (m *HWComponentInfoSetRequest) XXX_Unmarshal(b []byte) error { |
| 247 | return xxx_messageInfo_HWComponentInfoSetRequest.Unmarshal(m, b) |
| 248 | } |
| 249 | func (m *HWComponentInfoSetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 250 | return xxx_messageInfo_HWComponentInfoSetRequest.Marshal(b, m, deterministic) |
| 251 | } |
| 252 | func (m *HWComponentInfoSetRequest) XXX_Merge(src proto.Message) { |
| 253 | xxx_messageInfo_HWComponentInfoSetRequest.Merge(m, src) |
| 254 | } |
| 255 | func (m *HWComponentInfoSetRequest) XXX_Size() int { |
| 256 | return xxx_messageInfo_HWComponentInfoSetRequest.Size(m) |
| 257 | } |
| 258 | func (m *HWComponentInfoSetRequest) XXX_DiscardUnknown() { |
| 259 | xxx_messageInfo_HWComponentInfoSetRequest.DiscardUnknown(m) |
| 260 | } |
| 261 | |
| 262 | var xxx_messageInfo_HWComponentInfoSetRequest proto.InternalMessageInfo |
| 263 | |
| 264 | func (m *HWComponentInfoSetRequest) GetDeviceUuid() *Uuid { |
| 265 | if m != nil { |
| 266 | return m.DeviceUuid |
| 267 | } |
| 268 | return nil |
| 269 | } |
| 270 | |
| 271 | func (m *HWComponentInfoSetRequest) GetComponentUuid() *Uuid { |
| 272 | if m != nil { |
| 273 | return m.ComponentUuid |
| 274 | } |
| 275 | return nil |
| 276 | } |
| 277 | |
| 278 | func (m *HWComponentInfoSetRequest) GetComponentName() string { |
| 279 | if m != nil { |
| 280 | return m.ComponentName |
| 281 | } |
| 282 | return "" |
| 283 | } |
| 284 | |
| 285 | func (m *HWComponentInfoSetRequest) GetChanges() *ModifiableComponent { |
| 286 | if m != nil { |
| 287 | return m.Changes |
| 288 | } |
| 289 | return nil |
| 290 | } |
| 291 | |
| 292 | type HWComponentInfoSetResponse struct { |
| 293 | Status Status `protobuf:"varint,1,opt,name=status,proto3,enum=dmi.Status" json:"status,omitempty"` |
| 294 | Reason Reason `protobuf:"varint,2,opt,name=reason,proto3,enum=dmi.Reason" json:"reason,omitempty"` |
| 295 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 296 | XXX_unrecognized []byte `json:"-"` |
| 297 | XXX_sizecache int32 `json:"-"` |
| 298 | } |
| 299 | |
| 300 | func (m *HWComponentInfoSetResponse) Reset() { *m = HWComponentInfoSetResponse{} } |
| 301 | func (m *HWComponentInfoSetResponse) String() string { return proto.CompactTextString(m) } |
| 302 | func (*HWComponentInfoSetResponse) ProtoMessage() {} |
| 303 | func (*HWComponentInfoSetResponse) Descriptor() ([]byte, []int) { |
aghosh | c301dcd | 2020-09-03 16:55:34 +0100 | [diff] [blame] | 304 | return fileDescriptor_eae902e73066286d, []int{5} |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 305 | } |
| 306 | |
| 307 | func (m *HWComponentInfoSetResponse) XXX_Unmarshal(b []byte) error { |
| 308 | return xxx_messageInfo_HWComponentInfoSetResponse.Unmarshal(m, b) |
| 309 | } |
| 310 | func (m *HWComponentInfoSetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 311 | return xxx_messageInfo_HWComponentInfoSetResponse.Marshal(b, m, deterministic) |
| 312 | } |
| 313 | func (m *HWComponentInfoSetResponse) XXX_Merge(src proto.Message) { |
| 314 | xxx_messageInfo_HWComponentInfoSetResponse.Merge(m, src) |
| 315 | } |
| 316 | func (m *HWComponentInfoSetResponse) XXX_Size() int { |
| 317 | return xxx_messageInfo_HWComponentInfoSetResponse.Size(m) |
| 318 | } |
| 319 | func (m *HWComponentInfoSetResponse) XXX_DiscardUnknown() { |
| 320 | xxx_messageInfo_HWComponentInfoSetResponse.DiscardUnknown(m) |
| 321 | } |
| 322 | |
| 323 | var xxx_messageInfo_HWComponentInfoSetResponse proto.InternalMessageInfo |
| 324 | |
| 325 | func (m *HWComponentInfoSetResponse) GetStatus() Status { |
| 326 | if m != nil { |
| 327 | return m.Status |
| 328 | } |
| 329 | return Status_UNDEFINED_STATUS |
| 330 | } |
| 331 | |
| 332 | func (m *HWComponentInfoSetResponse) GetReason() Reason { |
| 333 | if m != nil { |
| 334 | return m.Reason |
| 335 | } |
| 336 | return Reason_UNDEFINED_REASON |
| 337 | } |
| 338 | |
| 339 | type StartManagingDeviceResponse struct { |
| 340 | Status Status `protobuf:"varint,1,opt,name=status,proto3,enum=dmi.Status" json:"status,omitempty"` |
| 341 | Reason Reason `protobuf:"varint,2,opt,name=reason,proto3,enum=dmi.Reason" json:"reason,omitempty"` |
| 342 | DeviceUuid *Uuid `protobuf:"bytes,3,opt,name=device_uuid,json=deviceUuid,proto3" json:"device_uuid,omitempty"` |
| 343 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 344 | XXX_unrecognized []byte `json:"-"` |
| 345 | XXX_sizecache int32 `json:"-"` |
| 346 | } |
| 347 | |
| 348 | func (m *StartManagingDeviceResponse) Reset() { *m = StartManagingDeviceResponse{} } |
| 349 | func (m *StartManagingDeviceResponse) String() string { return proto.CompactTextString(m) } |
| 350 | func (*StartManagingDeviceResponse) ProtoMessage() {} |
| 351 | func (*StartManagingDeviceResponse) Descriptor() ([]byte, []int) { |
aghosh | c301dcd | 2020-09-03 16:55:34 +0100 | [diff] [blame] | 352 | return fileDescriptor_eae902e73066286d, []int{6} |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 353 | } |
| 354 | |
| 355 | func (m *StartManagingDeviceResponse) XXX_Unmarshal(b []byte) error { |
| 356 | return xxx_messageInfo_StartManagingDeviceResponse.Unmarshal(m, b) |
| 357 | } |
| 358 | func (m *StartManagingDeviceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 359 | return xxx_messageInfo_StartManagingDeviceResponse.Marshal(b, m, deterministic) |
| 360 | } |
| 361 | func (m *StartManagingDeviceResponse) XXX_Merge(src proto.Message) { |
| 362 | xxx_messageInfo_StartManagingDeviceResponse.Merge(m, src) |
| 363 | } |
| 364 | func (m *StartManagingDeviceResponse) XXX_Size() int { |
| 365 | return xxx_messageInfo_StartManagingDeviceResponse.Size(m) |
| 366 | } |
| 367 | func (m *StartManagingDeviceResponse) XXX_DiscardUnknown() { |
| 368 | xxx_messageInfo_StartManagingDeviceResponse.DiscardUnknown(m) |
| 369 | } |
| 370 | |
| 371 | var xxx_messageInfo_StartManagingDeviceResponse proto.InternalMessageInfo |
| 372 | |
| 373 | func (m *StartManagingDeviceResponse) GetStatus() Status { |
| 374 | if m != nil { |
| 375 | return m.Status |
| 376 | } |
| 377 | return Status_UNDEFINED_STATUS |
| 378 | } |
| 379 | |
| 380 | func (m *StartManagingDeviceResponse) GetReason() Reason { |
| 381 | if m != nil { |
| 382 | return m.Reason |
| 383 | } |
| 384 | return Reason_UNDEFINED_REASON |
| 385 | } |
| 386 | |
| 387 | func (m *StartManagingDeviceResponse) GetDeviceUuid() *Uuid { |
| 388 | if m != nil { |
| 389 | return m.DeviceUuid |
| 390 | } |
| 391 | return nil |
| 392 | } |
| 393 | |
Amit Ghosh | 366228e | 2020-07-06 13:46:42 +0100 | [diff] [blame] | 394 | type StopManagingDeviceRequest struct { |
| 395 | Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` |
| 396 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 397 | XXX_unrecognized []byte `json:"-"` |
| 398 | XXX_sizecache int32 `json:"-"` |
| 399 | } |
| 400 | |
| 401 | func (m *StopManagingDeviceRequest) Reset() { *m = StopManagingDeviceRequest{} } |
| 402 | func (m *StopManagingDeviceRequest) String() string { return proto.CompactTextString(m) } |
| 403 | func (*StopManagingDeviceRequest) ProtoMessage() {} |
| 404 | func (*StopManagingDeviceRequest) Descriptor() ([]byte, []int) { |
aghosh | c301dcd | 2020-09-03 16:55:34 +0100 | [diff] [blame] | 405 | return fileDescriptor_eae902e73066286d, []int{7} |
Amit Ghosh | 366228e | 2020-07-06 13:46:42 +0100 | [diff] [blame] | 406 | } |
| 407 | |
| 408 | func (m *StopManagingDeviceRequest) XXX_Unmarshal(b []byte) error { |
| 409 | return xxx_messageInfo_StopManagingDeviceRequest.Unmarshal(m, b) |
| 410 | } |
| 411 | func (m *StopManagingDeviceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 412 | return xxx_messageInfo_StopManagingDeviceRequest.Marshal(b, m, deterministic) |
| 413 | } |
| 414 | func (m *StopManagingDeviceRequest) XXX_Merge(src proto.Message) { |
| 415 | xxx_messageInfo_StopManagingDeviceRequest.Merge(m, src) |
| 416 | } |
| 417 | func (m *StopManagingDeviceRequest) XXX_Size() int { |
| 418 | return xxx_messageInfo_StopManagingDeviceRequest.Size(m) |
| 419 | } |
| 420 | func (m *StopManagingDeviceRequest) XXX_DiscardUnknown() { |
| 421 | xxx_messageInfo_StopManagingDeviceRequest.DiscardUnknown(m) |
| 422 | } |
| 423 | |
| 424 | var xxx_messageInfo_StopManagingDeviceRequest proto.InternalMessageInfo |
| 425 | |
| 426 | func (m *StopManagingDeviceRequest) GetName() string { |
| 427 | if m != nil { |
| 428 | return m.Name |
| 429 | } |
| 430 | return "" |
| 431 | } |
| 432 | |
| 433 | type StopManagingDeviceResponse struct { |
| 434 | Status Status `protobuf:"varint,1,opt,name=status,proto3,enum=dmi.Status" json:"status,omitempty"` |
| 435 | Reason Reason `protobuf:"varint,2,opt,name=reason,proto3,enum=dmi.Reason" json:"reason,omitempty"` |
| 436 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 437 | XXX_unrecognized []byte `json:"-"` |
| 438 | XXX_sizecache int32 `json:"-"` |
| 439 | } |
| 440 | |
| 441 | func (m *StopManagingDeviceResponse) Reset() { *m = StopManagingDeviceResponse{} } |
| 442 | func (m *StopManagingDeviceResponse) String() string { return proto.CompactTextString(m) } |
| 443 | func (*StopManagingDeviceResponse) ProtoMessage() {} |
| 444 | func (*StopManagingDeviceResponse) Descriptor() ([]byte, []int) { |
aghosh | c301dcd | 2020-09-03 16:55:34 +0100 | [diff] [blame] | 445 | return fileDescriptor_eae902e73066286d, []int{8} |
Amit Ghosh | 366228e | 2020-07-06 13:46:42 +0100 | [diff] [blame] | 446 | } |
| 447 | |
| 448 | func (m *StopManagingDeviceResponse) XXX_Unmarshal(b []byte) error { |
| 449 | return xxx_messageInfo_StopManagingDeviceResponse.Unmarshal(m, b) |
| 450 | } |
| 451 | func (m *StopManagingDeviceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 452 | return xxx_messageInfo_StopManagingDeviceResponse.Marshal(b, m, deterministic) |
| 453 | } |
| 454 | func (m *StopManagingDeviceResponse) XXX_Merge(src proto.Message) { |
| 455 | xxx_messageInfo_StopManagingDeviceResponse.Merge(m, src) |
| 456 | } |
| 457 | func (m *StopManagingDeviceResponse) XXX_Size() int { |
| 458 | return xxx_messageInfo_StopManagingDeviceResponse.Size(m) |
| 459 | } |
| 460 | func (m *StopManagingDeviceResponse) XXX_DiscardUnknown() { |
| 461 | xxx_messageInfo_StopManagingDeviceResponse.DiscardUnknown(m) |
| 462 | } |
| 463 | |
| 464 | var xxx_messageInfo_StopManagingDeviceResponse proto.InternalMessageInfo |
| 465 | |
| 466 | func (m *StopManagingDeviceResponse) GetStatus() Status { |
| 467 | if m != nil { |
| 468 | return m.Status |
| 469 | } |
| 470 | return Status_UNDEFINED_STATUS |
| 471 | } |
| 472 | |
| 473 | func (m *StopManagingDeviceResponse) GetReason() Reason { |
| 474 | if m != nil { |
| 475 | return m.Reason |
| 476 | } |
| 477 | return Reason_UNDEFINED_REASON |
| 478 | } |
| 479 | |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 480 | func init() { |
| 481 | proto.RegisterType((*PhysicalInventoryRequest)(nil), "dmi.PhysicalInventoryRequest") |
| 482 | proto.RegisterType((*PhysicalInventoryResponse)(nil), "dmi.PhysicalInventoryResponse") |
| 483 | proto.RegisterType((*HWComponentInfoGetRequest)(nil), "dmi.HWComponentInfoGetRequest") |
aghosh | c301dcd | 2020-09-03 16:55:34 +0100 | [diff] [blame] | 484 | proto.RegisterType((*HWComponentInfoGetResponse)(nil), "dmi.HWComponentInfoGetResponse") |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 485 | proto.RegisterType((*HWComponentInfoSetRequest)(nil), "dmi.HWComponentInfoSetRequest") |
| 486 | proto.RegisterType((*HWComponentInfoSetResponse)(nil), "dmi.HWComponentInfoSetResponse") |
| 487 | proto.RegisterType((*StartManagingDeviceResponse)(nil), "dmi.StartManagingDeviceResponse") |
Amit Ghosh | 366228e | 2020-07-06 13:46:42 +0100 | [diff] [blame] | 488 | proto.RegisterType((*StopManagingDeviceRequest)(nil), "dmi.StopManagingDeviceRequest") |
| 489 | proto.RegisterType((*StopManagingDeviceResponse)(nil), "dmi.StopManagingDeviceResponse") |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 490 | } |
| 491 | |
| 492 | func init() { proto.RegisterFile("dmi/hw_management_service.proto", fileDescriptor_eae902e73066286d) } |
| 493 | |
| 494 | var fileDescriptor_eae902e73066286d = []byte{ |
aghosh | c301dcd | 2020-09-03 16:55:34 +0100 | [diff] [blame] | 495 | // 547 bytes of a gzipped FileDescriptorProto |
| 496 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0xd1, 0x6e, 0xd3, 0x30, |
| 497 | 0x14, 0x55, 0xd6, 0x69, 0xa8, 0x77, 0xac, 0x12, 0x86, 0x87, 0x34, 0x88, 0x6d, 0x0a, 0x42, 0x42, |
| 498 | 0xc0, 0x9a, 0xa9, 0x7b, 0x42, 0xbc, 0x01, 0xa2, 0xdd, 0x43, 0x27, 0x94, 0x68, 0xaa, 0xc4, 0x4b, |
| 499 | 0xe5, 0xc6, 0xb7, 0xad, 0xa5, 0xd9, 0x0e, 0xb1, 0xd3, 0x69, 0xbf, 0x01, 0x7c, 0x00, 0x9f, 0xc4, |
| 500 | 0x03, 0x1f, 0x84, 0xe2, 0xa4, 0x69, 0xd5, 0x36, 0x80, 0xd0, 0x26, 0xf1, 0x96, 0xf8, 0x9e, 0x7b, |
| 501 | 0x7c, 0xee, 0xb9, 0xf6, 0x35, 0x1c, 0x31, 0xc1, 0x83, 0xd9, 0xf5, 0x48, 0x50, 0x49, 0xa7, 0x28, |
| 502 | 0x50, 0x9a, 0x91, 0xc6, 0x74, 0xce, 0x63, 0xec, 0x24, 0xa9, 0x32, 0x8a, 0x34, 0x98, 0xe0, 0xde, |
| 503 | 0x83, 0x1c, 0x15, 0x2b, 0x21, 0x94, 0xd4, 0xc5, 0xba, 0x77, 0xbf, 0x48, 0x2c, 0xfe, 0xfc, 0x0f, |
| 504 | 0xe0, 0x7e, 0x9c, 0xdd, 0x68, 0x1e, 0xd3, 0xab, 0x73, 0x39, 0x47, 0x69, 0x54, 0x7a, 0x13, 0xe2, |
| 505 | 0xe7, 0x0c, 0xb5, 0x21, 0x2f, 0x60, 0x9f, 0x61, 0xce, 0x38, 0xca, 0x32, 0xce, 0x5c, 0xe7, 0xd8, |
| 506 | 0x79, 0xbe, 0xdf, 0x6d, 0x76, 0x98, 0xe0, 0x9d, 0xcb, 0x8c, 0xb3, 0x10, 0x8a, 0x68, 0xfe, 0xed, |
| 507 | 0x7f, 0x71, 0xa0, 0xbd, 0x85, 0x48, 0x27, 0x4a, 0x6a, 0x24, 0x4f, 0x61, 0x4f, 0x1b, 0x6a, 0x32, |
| 508 | 0x6d, 0x49, 0x5a, 0xdd, 0x7d, 0x4b, 0x12, 0xd9, 0xa5, 0xb0, 0x0c, 0xe5, 0xa0, 0x14, 0xa9, 0x56, |
| 509 | 0xd2, 0xdd, 0x59, 0x01, 0x85, 0x76, 0x29, 0x2c, 0x43, 0xe4, 0x25, 0x34, 0xf9, 0x82, 0xde, 0x6d, |
| 510 | 0x58, 0x45, 0x07, 0x16, 0xd7, 0xa7, 0x29, 0xbb, 0xa6, 0x29, 0x86, 0xcb, 0xb8, 0xff, 0xdd, 0x81, |
| 511 | 0x76, 0x7f, 0xf8, 0x4e, 0x89, 0x44, 0x49, 0x94, 0xe6, 0x5c, 0x4e, 0x54, 0x0f, 0xcd, 0x3f, 0x94, |
| 512 | 0x47, 0x4e, 0xa1, 0x15, 0x2f, 0x68, 0x0a, 0xf8, 0xce, 0x3a, 0xfc, 0xa0, 0x02, 0xd8, 0x8c, 0x67, |
| 513 | 0xab, 0x19, 0x92, 0x0a, 0xb4, 0x6a, 0x9b, 0x2b, 0xb0, 0x0b, 0x2a, 0xd0, 0xff, 0xe6, 0x80, 0xb7, |
| 514 | 0x4d, 0xe2, 0xad, 0x1b, 0xf7, 0x0a, 0x9a, 0xd5, 0xce, 0xa5, 0x71, 0x2d, 0x8b, 0xab, 0xf6, 0x0e, |
| 515 | 0x97, 0x00, 0xff, 0xe7, 0xa6, 0x73, 0xd1, 0xff, 0xe5, 0x1c, 0xe9, 0xc2, 0xbd, 0x78, 0x46, 0xe5, |
| 516 | 0x14, 0xb5, 0xbb, 0x6b, 0x19, 0x5d, 0xcb, 0x38, 0x50, 0x8c, 0x4f, 0x38, 0x1d, 0x5f, 0xe1, 0xb2, |
| 517 | 0xb0, 0x05, 0xd0, 0x9f, 0x6c, 0x98, 0x1d, 0xdd, 0x85, 0xd9, 0xfe, 0x57, 0x07, 0x1e, 0x47, 0x86, |
| 518 | 0xa6, 0x66, 0x90, 0xdf, 0x4e, 0x2e, 0xa7, 0xef, 0xad, 0x21, 0x77, 0xd0, 0xd6, 0xb5, 0x56, 0x34, |
| 519 | 0x7e, 0x77, 0x47, 0x03, 0x68, 0x47, 0x46, 0x25, 0xeb, 0x9a, 0x8a, 0x9e, 0x12, 0xd8, 0xb5, 0x5e, |
| 520 | 0x3b, 0xd6, 0x6b, 0xfb, 0x9d, 0xdb, 0xb5, 0x2d, 0xe1, 0xb6, 0x8b, 0xe8, 0xfe, 0x68, 0x40, 0xfb, |
| 521 | 0x82, 0x1a, 0x3e, 0xc7, 0xfe, 0x70, 0x50, 0xcd, 0xb3, 0xa8, 0x18, 0x67, 0x24, 0x82, 0x87, 0x5b, |
| 522 | 0xbc, 0x24, 0xb5, 0xed, 0xf6, 0x8e, 0x17, 0x42, 0xea, 0xfc, 0x3f, 0x75, 0xc8, 0x25, 0x90, 0xcd, |
| 523 | 0xd2, 0xc8, 0x61, 0x99, 0x59, 0x63, 0x92, 0x77, 0x54, 0x1b, 0x2f, 0x3d, 0x19, 0xc2, 0xa3, 0x1e, |
| 524 | 0x9a, 0x8d, 0x41, 0x48, 0x9e, 0xd8, 0xc4, 0xba, 0x49, 0xeb, 0x1d, 0xd6, 0x85, 0x2b, 0xbd, 0x43, |
| 525 | 0x20, 0x3d, 0x34, 0x6b, 0x87, 0xb7, 0xd4, 0x5b, 0x3b, 0xe2, 0x4a, 0xbd, 0xf5, 0xf3, 0xa5, 0x34, |
| 526 | 0xe2, 0x2f, 0x89, 0xa3, 0x3f, 0x10, 0xaf, 0xdc, 0xa5, 0xb7, 0x6f, 0x3e, 0xbd, 0x9e, 0x72, 0x33, |
| 527 | 0xcb, 0xc6, 0x9d, 0x58, 0x89, 0x40, 0x25, 0x28, 0x63, 0x95, 0xb2, 0xa0, 0x38, 0x8d, 0x27, 0xcb, |
| 528 | 0x47, 0xeb, 0x84, 0x4b, 0x83, 0xe9, 0x84, 0xc6, 0x18, 0xcc, 0xcf, 0x82, 0xa9, 0x0a, 0x98, 0xe0, |
| 529 | 0xe3, 0x3d, 0xfb, 0x36, 0x9d, 0xfd, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x3c, 0xdb, 0x2f, 0x23, 0xe4, |
| 530 | 0x06, 0x00, 0x00, |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 531 | } |
| 532 | |
| 533 | // Reference imports to suppress errors if they are not otherwise used. |
| 534 | var _ context.Context |
| 535 | var _ grpc.ClientConn |
| 536 | |
| 537 | // This is a compile-time assertion to ensure that this generated file |
| 538 | // is compatible with the grpc package it is being compiled against. |
| 539 | const _ = grpc.SupportPackageIsVersion4 |
| 540 | |
| 541 | // NativeHWManagementServiceClient is the client API for NativeHWManagementService service. |
| 542 | // |
| 543 | // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. |
| 544 | type NativeHWManagementServiceClient interface { |
| 545 | // Initializes context for a device and sets up required states |
Amit Ghosh | 704462f | 2020-06-24 16:44:56 +0100 | [diff] [blame] | 546 | // In the call to StartManagingDevice, the fields of ModifiableComponent which are relevant |
| 547 | // and their meanings in this context is mentioned below: |
| 548 | // name = The unique name that needs to be assigned to this hardware; |
| 549 | // class = COMPONENT_TYPE_UNDEFINED; |
| 550 | // parent = nil; |
| 551 | // alias = Optional; |
| 552 | // asset_id = Optional; |
| 553 | // uri = IP Address of the Hardware; |
| 554 | StartManagingDevice(ctx context.Context, in *ModifiableComponent, opts ...grpc.CallOption) (NativeHWManagementService_StartManagingDeviceClient, error) |
Amit Ghosh | 366228e | 2020-07-06 13:46:42 +0100 | [diff] [blame] | 555 | // Stop management of a device and clean up any context and caches for that device |
| 556 | StopManagingDevice(ctx context.Context, in *StopManagingDeviceRequest, opts ...grpc.CallOption) (*StopManagingDeviceResponse, error) |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 557 | // Get the HW inventory details of the Device |
| 558 | GetPhysicalInventory(ctx context.Context, in *PhysicalInventoryRequest, opts ...grpc.CallOption) (NativeHWManagementService_GetPhysicalInventoryClient, error) |
| 559 | // Get the details of a particular HW component |
| 560 | GetHWComponentInfo(ctx context.Context, in *HWComponentInfoGetRequest, opts ...grpc.CallOption) (NativeHWManagementService_GetHWComponentInfoClient, error) |
| 561 | // Sets the permissible attributes of a HW component |
| 562 | SetHWComponentInfo(ctx context.Context, in *HWComponentInfoSetRequest, opts ...grpc.CallOption) (*HWComponentInfoSetResponse, error) |
| 563 | } |
| 564 | |
| 565 | type nativeHWManagementServiceClient struct { |
| 566 | cc *grpc.ClientConn |
| 567 | } |
| 568 | |
| 569 | func NewNativeHWManagementServiceClient(cc *grpc.ClientConn) NativeHWManagementServiceClient { |
| 570 | return &nativeHWManagementServiceClient{cc} |
| 571 | } |
| 572 | |
Amit Ghosh | 704462f | 2020-06-24 16:44:56 +0100 | [diff] [blame] | 573 | func (c *nativeHWManagementServiceClient) StartManagingDevice(ctx context.Context, in *ModifiableComponent, opts ...grpc.CallOption) (NativeHWManagementService_StartManagingDeviceClient, error) { |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 574 | stream, err := c.cc.NewStream(ctx, &_NativeHWManagementService_serviceDesc.Streams[0], "/dmi.NativeHWManagementService/StartManagingDevice", opts...) |
| 575 | if err != nil { |
| 576 | return nil, err |
| 577 | } |
| 578 | x := &nativeHWManagementServiceStartManagingDeviceClient{stream} |
| 579 | if err := x.ClientStream.SendMsg(in); err != nil { |
| 580 | return nil, err |
| 581 | } |
| 582 | if err := x.ClientStream.CloseSend(); err != nil { |
| 583 | return nil, err |
| 584 | } |
| 585 | return x, nil |
| 586 | } |
| 587 | |
| 588 | type NativeHWManagementService_StartManagingDeviceClient interface { |
| 589 | Recv() (*StartManagingDeviceResponse, error) |
| 590 | grpc.ClientStream |
| 591 | } |
| 592 | |
| 593 | type nativeHWManagementServiceStartManagingDeviceClient struct { |
| 594 | grpc.ClientStream |
| 595 | } |
| 596 | |
| 597 | func (x *nativeHWManagementServiceStartManagingDeviceClient) Recv() (*StartManagingDeviceResponse, error) { |
| 598 | m := new(StartManagingDeviceResponse) |
| 599 | if err := x.ClientStream.RecvMsg(m); err != nil { |
| 600 | return nil, err |
| 601 | } |
| 602 | return m, nil |
| 603 | } |
| 604 | |
Amit Ghosh | 366228e | 2020-07-06 13:46:42 +0100 | [diff] [blame] | 605 | func (c *nativeHWManagementServiceClient) StopManagingDevice(ctx context.Context, in *StopManagingDeviceRequest, opts ...grpc.CallOption) (*StopManagingDeviceResponse, error) { |
| 606 | out := new(StopManagingDeviceResponse) |
| 607 | err := c.cc.Invoke(ctx, "/dmi.NativeHWManagementService/StopManagingDevice", in, out, opts...) |
| 608 | if err != nil { |
| 609 | return nil, err |
| 610 | } |
| 611 | return out, nil |
| 612 | } |
| 613 | |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 614 | func (c *nativeHWManagementServiceClient) GetPhysicalInventory(ctx context.Context, in *PhysicalInventoryRequest, opts ...grpc.CallOption) (NativeHWManagementService_GetPhysicalInventoryClient, error) { |
| 615 | stream, err := c.cc.NewStream(ctx, &_NativeHWManagementService_serviceDesc.Streams[1], "/dmi.NativeHWManagementService/GetPhysicalInventory", opts...) |
| 616 | if err != nil { |
| 617 | return nil, err |
| 618 | } |
| 619 | x := &nativeHWManagementServiceGetPhysicalInventoryClient{stream} |
| 620 | if err := x.ClientStream.SendMsg(in); err != nil { |
| 621 | return nil, err |
| 622 | } |
| 623 | if err := x.ClientStream.CloseSend(); err != nil { |
| 624 | return nil, err |
| 625 | } |
| 626 | return x, nil |
| 627 | } |
| 628 | |
| 629 | type NativeHWManagementService_GetPhysicalInventoryClient interface { |
| 630 | Recv() (*PhysicalInventoryResponse, error) |
| 631 | grpc.ClientStream |
| 632 | } |
| 633 | |
| 634 | type nativeHWManagementServiceGetPhysicalInventoryClient struct { |
| 635 | grpc.ClientStream |
| 636 | } |
| 637 | |
| 638 | func (x *nativeHWManagementServiceGetPhysicalInventoryClient) Recv() (*PhysicalInventoryResponse, error) { |
| 639 | m := new(PhysicalInventoryResponse) |
| 640 | if err := x.ClientStream.RecvMsg(m); err != nil { |
| 641 | return nil, err |
| 642 | } |
| 643 | return m, nil |
| 644 | } |
| 645 | |
| 646 | func (c *nativeHWManagementServiceClient) GetHWComponentInfo(ctx context.Context, in *HWComponentInfoGetRequest, opts ...grpc.CallOption) (NativeHWManagementService_GetHWComponentInfoClient, error) { |
| 647 | stream, err := c.cc.NewStream(ctx, &_NativeHWManagementService_serviceDesc.Streams[2], "/dmi.NativeHWManagementService/GetHWComponentInfo", opts...) |
| 648 | if err != nil { |
| 649 | return nil, err |
| 650 | } |
| 651 | x := &nativeHWManagementServiceGetHWComponentInfoClient{stream} |
| 652 | if err := x.ClientStream.SendMsg(in); err != nil { |
| 653 | return nil, err |
| 654 | } |
| 655 | if err := x.ClientStream.CloseSend(); err != nil { |
| 656 | return nil, err |
| 657 | } |
| 658 | return x, nil |
| 659 | } |
| 660 | |
| 661 | type NativeHWManagementService_GetHWComponentInfoClient interface { |
aghosh | c301dcd | 2020-09-03 16:55:34 +0100 | [diff] [blame] | 662 | Recv() (*HWComponentInfoGetResponse, error) |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 663 | grpc.ClientStream |
| 664 | } |
| 665 | |
| 666 | type nativeHWManagementServiceGetHWComponentInfoClient struct { |
| 667 | grpc.ClientStream |
| 668 | } |
| 669 | |
aghosh | c301dcd | 2020-09-03 16:55:34 +0100 | [diff] [blame] | 670 | func (x *nativeHWManagementServiceGetHWComponentInfoClient) Recv() (*HWComponentInfoGetResponse, error) { |
| 671 | m := new(HWComponentInfoGetResponse) |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 672 | if err := x.ClientStream.RecvMsg(m); err != nil { |
| 673 | return nil, err |
| 674 | } |
| 675 | return m, nil |
| 676 | } |
| 677 | |
| 678 | func (c *nativeHWManagementServiceClient) SetHWComponentInfo(ctx context.Context, in *HWComponentInfoSetRequest, opts ...grpc.CallOption) (*HWComponentInfoSetResponse, error) { |
| 679 | out := new(HWComponentInfoSetResponse) |
| 680 | err := c.cc.Invoke(ctx, "/dmi.NativeHWManagementService/SetHWComponentInfo", in, out, opts...) |
| 681 | if err != nil { |
| 682 | return nil, err |
| 683 | } |
| 684 | return out, nil |
| 685 | } |
| 686 | |
| 687 | // NativeHWManagementServiceServer is the server API for NativeHWManagementService service. |
| 688 | type NativeHWManagementServiceServer interface { |
| 689 | // Initializes context for a device and sets up required states |
Amit Ghosh | 704462f | 2020-06-24 16:44:56 +0100 | [diff] [blame] | 690 | // In the call to StartManagingDevice, the fields of ModifiableComponent which are relevant |
| 691 | // and their meanings in this context is mentioned below: |
| 692 | // name = The unique name that needs to be assigned to this hardware; |
| 693 | // class = COMPONENT_TYPE_UNDEFINED; |
| 694 | // parent = nil; |
| 695 | // alias = Optional; |
| 696 | // asset_id = Optional; |
| 697 | // uri = IP Address of the Hardware; |
| 698 | StartManagingDevice(*ModifiableComponent, NativeHWManagementService_StartManagingDeviceServer) error |
Amit Ghosh | 366228e | 2020-07-06 13:46:42 +0100 | [diff] [blame] | 699 | // Stop management of a device and clean up any context and caches for that device |
| 700 | StopManagingDevice(context.Context, *StopManagingDeviceRequest) (*StopManagingDeviceResponse, error) |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 701 | // Get the HW inventory details of the Device |
| 702 | GetPhysicalInventory(*PhysicalInventoryRequest, NativeHWManagementService_GetPhysicalInventoryServer) error |
| 703 | // Get the details of a particular HW component |
| 704 | GetHWComponentInfo(*HWComponentInfoGetRequest, NativeHWManagementService_GetHWComponentInfoServer) error |
| 705 | // Sets the permissible attributes of a HW component |
| 706 | SetHWComponentInfo(context.Context, *HWComponentInfoSetRequest) (*HWComponentInfoSetResponse, error) |
| 707 | } |
| 708 | |
| 709 | func RegisterNativeHWManagementServiceServer(s *grpc.Server, srv NativeHWManagementServiceServer) { |
| 710 | s.RegisterService(&_NativeHWManagementService_serviceDesc, srv) |
| 711 | } |
| 712 | |
| 713 | func _NativeHWManagementService_StartManagingDevice_Handler(srv interface{}, stream grpc.ServerStream) error { |
Amit Ghosh | 704462f | 2020-06-24 16:44:56 +0100 | [diff] [blame] | 714 | m := new(ModifiableComponent) |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 715 | if err := stream.RecvMsg(m); err != nil { |
| 716 | return err |
| 717 | } |
| 718 | return srv.(NativeHWManagementServiceServer).StartManagingDevice(m, &nativeHWManagementServiceStartManagingDeviceServer{stream}) |
| 719 | } |
| 720 | |
| 721 | type NativeHWManagementService_StartManagingDeviceServer interface { |
| 722 | Send(*StartManagingDeviceResponse) error |
| 723 | grpc.ServerStream |
| 724 | } |
| 725 | |
| 726 | type nativeHWManagementServiceStartManagingDeviceServer struct { |
| 727 | grpc.ServerStream |
| 728 | } |
| 729 | |
| 730 | func (x *nativeHWManagementServiceStartManagingDeviceServer) Send(m *StartManagingDeviceResponse) error { |
| 731 | return x.ServerStream.SendMsg(m) |
| 732 | } |
| 733 | |
Amit Ghosh | 366228e | 2020-07-06 13:46:42 +0100 | [diff] [blame] | 734 | func _NativeHWManagementService_StopManagingDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 735 | in := new(StopManagingDeviceRequest) |
| 736 | if err := dec(in); err != nil { |
| 737 | return nil, err |
| 738 | } |
| 739 | if interceptor == nil { |
| 740 | return srv.(NativeHWManagementServiceServer).StopManagingDevice(ctx, in) |
| 741 | } |
| 742 | info := &grpc.UnaryServerInfo{ |
| 743 | Server: srv, |
| 744 | FullMethod: "/dmi.NativeHWManagementService/StopManagingDevice", |
| 745 | } |
| 746 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 747 | return srv.(NativeHWManagementServiceServer).StopManagingDevice(ctx, req.(*StopManagingDeviceRequest)) |
| 748 | } |
| 749 | return interceptor(ctx, in, info, handler) |
| 750 | } |
| 751 | |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 752 | func _NativeHWManagementService_GetPhysicalInventory_Handler(srv interface{}, stream grpc.ServerStream) error { |
| 753 | m := new(PhysicalInventoryRequest) |
| 754 | if err := stream.RecvMsg(m); err != nil { |
| 755 | return err |
| 756 | } |
| 757 | return srv.(NativeHWManagementServiceServer).GetPhysicalInventory(m, &nativeHWManagementServiceGetPhysicalInventoryServer{stream}) |
| 758 | } |
| 759 | |
| 760 | type NativeHWManagementService_GetPhysicalInventoryServer interface { |
| 761 | Send(*PhysicalInventoryResponse) error |
| 762 | grpc.ServerStream |
| 763 | } |
| 764 | |
| 765 | type nativeHWManagementServiceGetPhysicalInventoryServer struct { |
| 766 | grpc.ServerStream |
| 767 | } |
| 768 | |
| 769 | func (x *nativeHWManagementServiceGetPhysicalInventoryServer) Send(m *PhysicalInventoryResponse) error { |
| 770 | return x.ServerStream.SendMsg(m) |
| 771 | } |
| 772 | |
| 773 | func _NativeHWManagementService_GetHWComponentInfo_Handler(srv interface{}, stream grpc.ServerStream) error { |
| 774 | m := new(HWComponentInfoGetRequest) |
| 775 | if err := stream.RecvMsg(m); err != nil { |
| 776 | return err |
| 777 | } |
| 778 | return srv.(NativeHWManagementServiceServer).GetHWComponentInfo(m, &nativeHWManagementServiceGetHWComponentInfoServer{stream}) |
| 779 | } |
| 780 | |
| 781 | type NativeHWManagementService_GetHWComponentInfoServer interface { |
aghosh | c301dcd | 2020-09-03 16:55:34 +0100 | [diff] [blame] | 782 | Send(*HWComponentInfoGetResponse) error |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 783 | grpc.ServerStream |
| 784 | } |
| 785 | |
| 786 | type nativeHWManagementServiceGetHWComponentInfoServer struct { |
| 787 | grpc.ServerStream |
| 788 | } |
| 789 | |
aghosh | c301dcd | 2020-09-03 16:55:34 +0100 | [diff] [blame] | 790 | func (x *nativeHWManagementServiceGetHWComponentInfoServer) Send(m *HWComponentInfoGetResponse) error { |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 791 | return x.ServerStream.SendMsg(m) |
| 792 | } |
| 793 | |
| 794 | func _NativeHWManagementService_SetHWComponentInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 795 | in := new(HWComponentInfoSetRequest) |
| 796 | if err := dec(in); err != nil { |
| 797 | return nil, err |
| 798 | } |
| 799 | if interceptor == nil { |
| 800 | return srv.(NativeHWManagementServiceServer).SetHWComponentInfo(ctx, in) |
| 801 | } |
| 802 | info := &grpc.UnaryServerInfo{ |
| 803 | Server: srv, |
| 804 | FullMethod: "/dmi.NativeHWManagementService/SetHWComponentInfo", |
| 805 | } |
| 806 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 807 | return srv.(NativeHWManagementServiceServer).SetHWComponentInfo(ctx, req.(*HWComponentInfoSetRequest)) |
| 808 | } |
| 809 | return interceptor(ctx, in, info, handler) |
| 810 | } |
| 811 | |
| 812 | var _NativeHWManagementService_serviceDesc = grpc.ServiceDesc{ |
| 813 | ServiceName: "dmi.NativeHWManagementService", |
| 814 | HandlerType: (*NativeHWManagementServiceServer)(nil), |
| 815 | Methods: []grpc.MethodDesc{ |
| 816 | { |
Amit Ghosh | 366228e | 2020-07-06 13:46:42 +0100 | [diff] [blame] | 817 | MethodName: "StopManagingDevice", |
| 818 | Handler: _NativeHWManagementService_StopManagingDevice_Handler, |
| 819 | }, |
| 820 | { |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 821 | MethodName: "SetHWComponentInfo", |
| 822 | Handler: _NativeHWManagementService_SetHWComponentInfo_Handler, |
| 823 | }, |
| 824 | }, |
| 825 | Streams: []grpc.StreamDesc{ |
| 826 | { |
| 827 | StreamName: "StartManagingDevice", |
| 828 | Handler: _NativeHWManagementService_StartManagingDevice_Handler, |
| 829 | ServerStreams: true, |
| 830 | }, |
| 831 | { |
| 832 | StreamName: "GetPhysicalInventory", |
| 833 | Handler: _NativeHWManagementService_GetPhysicalInventory_Handler, |
| 834 | ServerStreams: true, |
| 835 | }, |
| 836 | { |
| 837 | StreamName: "GetHWComponentInfo", |
| 838 | Handler: _NativeHWManagementService_GetHWComponentInfo_Handler, |
| 839 | ServerStreams: true, |
| 840 | }, |
| 841 | }, |
| 842 | Metadata: "dmi/hw_management_service.proto", |
| 843 | } |