1// Code generated by protoc-gen-go. DO NOT EDIT. 2// source: google/devtools/remoteworkers/v1test2/bots.proto 3 4package remoteworkers 5 6import ( 7 context "context" 8 fmt "fmt" 9 math "math" 10 11 proto "github.com/golang/protobuf/proto" 12 any "github.com/golang/protobuf/ptypes/any" 13 timestamp "github.com/golang/protobuf/ptypes/timestamp" 14 _ "google.golang.org/genproto/googleapis/api/annotations" 15 status "google.golang.org/genproto/googleapis/rpc/status" 16 field_mask "google.golang.org/genproto/protobuf/field_mask" 17 grpc "google.golang.org/grpc" 18 codes "google.golang.org/grpc/codes" 19 status1 "google.golang.org/grpc/status" 20) 21 22// Reference imports to suppress errors if they are not otherwise used. 23var _ = proto.Marshal 24var _ = fmt.Errorf 25var _ = math.Inf 26 27// This is a compile-time assertion to ensure that this generated file 28// is compatible with the proto package it is being compiled against. 29// A compilation error at this line likely means your copy of the 30// proto package needs to be updated. 31const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package 32 33// A coarse description of the status of the bot that the server uses to 34// determine whether to assign the bot new leases. 35type BotStatus int32 36 37const ( 38 // Default value; do not use. 39 BotStatus_BOT_STATUS_UNSPECIFIED BotStatus = 0 40 // The bot is healthy, and will accept leases as normal. 41 BotStatus_OK BotStatus = 1 42 // The bot is unhealthy and will not accept new leases. For example, the bot 43 // may have detected that available disk space is too low. This situation may 44 // resolve itself, but will typically require human intervention. 45 BotStatus_UNHEALTHY BotStatus = 2 46 // The bot has been asked to reboot the host. The bot will not accept new 47 // leases; once all leases are complete, this session will no longer be 48 // updated but the bot will be expected to establish a new session after the 49 // reboot completes. 50 BotStatus_HOST_REBOOTING BotStatus = 3 51 // The bot has been asked to shut down. As with HOST_REBOOTING, once all 52 // leases are completed, the session will no longer be updated and the bot 53 // will not be expected to establish a new session. 54 // 55 // Bots are typically only asked to shut down if its host computer will be 56 // modified in some way, such as deleting a VM. 57 BotStatus_BOT_TERMINATING BotStatus = 4 58 // The bot is initializing and is not ready to accept leases. 59 BotStatus_INITIALIZING BotStatus = 5 60) 61 62var BotStatus_name = map[int32]string{ 63 0: "BOT_STATUS_UNSPECIFIED", 64 1: "OK", 65 2: "UNHEALTHY", 66 3: "HOST_REBOOTING", 67 4: "BOT_TERMINATING", 68 5: "INITIALIZING", 69} 70 71var BotStatus_value = map[string]int32{ 72 "BOT_STATUS_UNSPECIFIED": 0, 73 "OK": 1, 74 "UNHEALTHY": 2, 75 "HOST_REBOOTING": 3, 76 "BOT_TERMINATING": 4, 77 "INITIALIZING": 5, 78} 79 80func (x BotStatus) String() string { 81 return proto.EnumName(BotStatus_name, int32(x)) 82} 83 84func (BotStatus) EnumDescriptor() ([]byte, []int) { 85 return fileDescriptor_129e24cb0c941ff8, []int{0} 86} 87 88// The state of the lease. All leases start in the PENDING state. A bot can 89// change PENDING to ACTIVE or (in the case of an error) COMPLETED, or from 90// ACTIVE to COMPLETED. The server can change PENDING or ACTIVE to CANCELLED if 91// it wants the bot to release its resources - for example, if the bot needs to 92// be quarantined (it's producing bad output) or a cell needs to be drained. 93type LeaseState int32 94 95const ( 96 // Default value; do not use. 97 LeaseState_LEASE_STATE_UNSPECIFIED LeaseState = 0 98 // Pending: the server expects the bot to accept this lease. This may only be 99 // set by the server. 100 LeaseState_PENDING LeaseState = 1 101 // Active: the bot has accepted this lease. This may only be set by the bot. 102 LeaseState_ACTIVE LeaseState = 2 103 // Completed: the bot is no longer leased. This may only be set by the bot, 104 // and the status field must be populated iff the state is COMPLETED. 105 LeaseState_COMPLETED LeaseState = 4 106 // Cancelled: The bot should immediately release all resources associated with 107 // the lease. This may only be set by the server. 108 LeaseState_CANCELLED LeaseState = 5 109) 110 111var LeaseState_name = map[int32]string{ 112 0: "LEASE_STATE_UNSPECIFIED", 113 1: "PENDING", 114 2: "ACTIVE", 115 4: "COMPLETED", 116 5: "CANCELLED", 117} 118 119var LeaseState_value = map[string]int32{ 120 "LEASE_STATE_UNSPECIFIED": 0, 121 "PENDING": 1, 122 "ACTIVE": 2, 123 "COMPLETED": 4, 124 "CANCELLED": 5, 125} 126 127func (x LeaseState) String() string { 128 return proto.EnumName(LeaseState_name, int32(x)) 129} 130 131func (LeaseState) EnumDescriptor() ([]byte, []int) { 132 return fileDescriptor_129e24cb0c941ff8, []int{1} 133} 134 135// Possible administration actions. 136type AdminTemp_Command int32 137 138const ( 139 // Illegal value. 140 AdminTemp_UNSPECIFIED AdminTemp_Command = 0 141 // Download and run a new version of the bot. `arg` will be a resource 142 // accessible via `ByteStream.Read` to obtain the new bot code. 143 AdminTemp_BOT_UPDATE AdminTemp_Command = 1 144 // Restart the bot without downloading a new version. `arg` will be a 145 // message to log. 146 AdminTemp_BOT_RESTART AdminTemp_Command = 2 147 // Shut down the bot. `arg` will be a task resource name (similar to those 148 // in tasks.proto) that the bot can use to tell the server that it is 149 // terminating. 150 AdminTemp_BOT_TERMINATE AdminTemp_Command = 3 151 // Restart the host computer. `arg` will be a message to log. 152 AdminTemp_HOST_RESTART AdminTemp_Command = 4 153) 154 155var AdminTemp_Command_name = map[int32]string{ 156 0: "UNSPECIFIED", 157 1: "BOT_UPDATE", 158 2: "BOT_RESTART", 159 3: "BOT_TERMINATE", 160 4: "HOST_RESTART", 161} 162 163var AdminTemp_Command_value = map[string]int32{ 164 "UNSPECIFIED": 0, 165 "BOT_UPDATE": 1, 166 "BOT_RESTART": 2, 167 "BOT_TERMINATE": 3, 168 "HOST_RESTART": 4, 169} 170 171func (x AdminTemp_Command) String() string { 172 return proto.EnumName(AdminTemp_Command_name, int32(x)) 173} 174 175func (AdminTemp_Command) EnumDescriptor() ([]byte, []int) { 176 return fileDescriptor_129e24cb0c941ff8, []int{2, 0} 177} 178 179// A bot session represents the state of a bot while in continuous contact with 180// the server for a period of time. The session includes information about the 181// worker - that is, the *worker* (the physical or virtual hardware) is 182// considered to be a property of the bot (the software agent running on that 183// hardware), which is the reverse of real life, but more natural from the point 184// of the view of this API, which communicates solely with the bot and not 185// directly with the underlying worker. 186type BotSession struct { 187 // The bot session name, as selected by the server. Output only during a call 188 // to CreateBotSession. 189 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 190 // A unique bot ID within the farm used to persistently identify this bot over 191 // time (i.e., over multiple sessions). This ID must be unique within a 192 // farm. Typically, the bot ID will be the same as the name of the primary 193 // device in the worker (e.g., what you'd get from typing `uname -n` on *nix), 194 // but this is not required since a single device may allow multiple bots to 195 // run on it, each with access to different resources. What is important is 196 // that this ID is meaningful to humans, who might need to hunt a physical 197 // machine down to fix it. 198 // 199 // When CreateBotSession is successfully called with a bot_id, all prior 200 // sessions with the same ID are invalidated. If a bot attempts to update an 201 // invalid session, the server must reject that request, and may also 202 // quarantine the other bot with the same bot IDs (ie, stop sending it new 203 // leases and alert an admin). 204 BotId string `protobuf:"bytes,2,opt,name=bot_id,json=botId,proto3" json:"bot_id,omitempty"` 205 // The status of the bot. This must be populated in every call to 206 // UpdateBotSession. 207 Status BotStatus `protobuf:"varint,3,opt,name=status,proto3,enum=google.devtools.remoteworkers.v1test2.BotStatus" json:"status,omitempty"` 208 // A description of the worker hosting this bot. The Worker message is used 209 // here in the Status context (see Worker for more information). If multiple 210 // bots are running on the worker, this field should only describe the 211 // resources accessible from this bot. 212 // 213 // During the call to CreateBotSession, the server may make arbitrary changes 214 // to the worker's `server_properties` field (see that field for more 215 // information). Otherwise, this field is input-only. 216 Worker *Worker `protobuf:"bytes,4,opt,name=worker,proto3" json:"worker,omitempty"` 217 // A list of all leases that are a part of this session. See the Lease message 218 // for details. 219 Leases []*Lease `protobuf:"bytes,5,rep,name=leases,proto3" json:"leases,omitempty"` 220 // The time at which this bot session will expire, unless the bot calls 221 // UpdateBotSession again. Output only. 222 ExpireTime *timestamp.Timestamp `protobuf:"bytes,6,opt,name=expire_time,json=expireTime,proto3" json:"expire_time,omitempty"` 223 // The version of the bot code currently running. The server may use this 224 // information to issue an admin action to tell the bot to update itself. 225 Version string `protobuf:"bytes,7,opt,name=version,proto3" json:"version,omitempty"` 226 XXX_NoUnkeyedLiteral struct{} `json:"-"` 227 XXX_unrecognized []byte `json:"-"` 228 XXX_sizecache int32 `json:"-"` 229} 230 231func (m *BotSession) Reset() { *m = BotSession{} } 232func (m *BotSession) String() string { return proto.CompactTextString(m) } 233func (*BotSession) ProtoMessage() {} 234func (*BotSession) Descriptor() ([]byte, []int) { 235 return fileDescriptor_129e24cb0c941ff8, []int{0} 236} 237 238func (m *BotSession) XXX_Unmarshal(b []byte) error { 239 return xxx_messageInfo_BotSession.Unmarshal(m, b) 240} 241func (m *BotSession) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 242 return xxx_messageInfo_BotSession.Marshal(b, m, deterministic) 243} 244func (m *BotSession) XXX_Merge(src proto.Message) { 245 xxx_messageInfo_BotSession.Merge(m, src) 246} 247func (m *BotSession) XXX_Size() int { 248 return xxx_messageInfo_BotSession.Size(m) 249} 250func (m *BotSession) XXX_DiscardUnknown() { 251 xxx_messageInfo_BotSession.DiscardUnknown(m) 252} 253 254var xxx_messageInfo_BotSession proto.InternalMessageInfo 255 256func (m *BotSession) GetName() string { 257 if m != nil { 258 return m.Name 259 } 260 return "" 261} 262 263func (m *BotSession) GetBotId() string { 264 if m != nil { 265 return m.BotId 266 } 267 return "" 268} 269 270func (m *BotSession) GetStatus() BotStatus { 271 if m != nil { 272 return m.Status 273 } 274 return BotStatus_BOT_STATUS_UNSPECIFIED 275} 276 277func (m *BotSession) GetWorker() *Worker { 278 if m != nil { 279 return m.Worker 280 } 281 return nil 282} 283 284func (m *BotSession) GetLeases() []*Lease { 285 if m != nil { 286 return m.Leases 287 } 288 return nil 289} 290 291func (m *BotSession) GetExpireTime() *timestamp.Timestamp { 292 if m != nil { 293 return m.ExpireTime 294 } 295 return nil 296} 297 298func (m *BotSession) GetVersion() string { 299 if m != nil { 300 return m.Version 301 } 302 return "" 303} 304 305// A Lease is a lease that the scheduler has assigned to this bot. If the bot 306// notices (by UpdateBotSession) that it has any leases in the PENDING state, it 307// should call UpdateBotSession to put the leases into the ACTIVE state and 308// start executing their assignments. 309// 310// All fields in this message are output-only, *except* the `state` and `status` 311// fields. Note that repeated fields can only be updated as a unit, so on every 312// update the bot must provide an update for *all* the leases the server expects 313// it to report on. 314// 315// The scheduler *should* ensure that all leases scheduled to a bot can actually 316// be accepted, but race conditions may occur. In such cases, the bot should 317// attempt to accept the leases in the order they are listed by the server, to 318// allow the server to control priorities. 319// 320// The server will remove COMPLETED leases from time to time, after which the 321// bot shouldn't report on them any more (the server will ignore superfluous 322// COMPLETED records). 323type Lease struct { 324 // A short string uniquely identifing the lease within this bot session. 325 Id string `protobuf:"bytes,7,opt,name=id,proto3" json:"id,omitempty"` 326 // The actual work to be performed, if any. May be omitted by the server if 327 // the lease is not in the `PENDING` state. The message must be meaningful to 328 // the bot. Output only (must only be set by the server). 329 Payload *any.Any `protobuf:"bytes,8,opt,name=payload,proto3" json:"payload,omitempty"` 330 // Any result the bot wishes to provide about the lease. Must not be changed 331 // after the first call with the lease in the `COMPLETED` or `CANCELLED` 332 // state. Input only (must only be set by the bot, will not be echoed by the 333 // server). 334 Result *any.Any `protobuf:"bytes,9,opt,name=result,proto3" json:"result,omitempty"` 335 // The state of the lease. See LeaseState for more information. 336 State LeaseState `protobuf:"varint,2,opt,name=state,proto3,enum=google.devtools.remoteworkers.v1test2.LeaseState" json:"state,omitempty"` 337 // The final status of the lease (should be populated by the bot if the state 338 // is completed). This is the status of the lease, not of any task represented 339 // by the lease. For example, if the bot could not accept the lease because it 340 // asked for some resource the bot didn't have, this status will be 341 // FAILED_PRECONDITION. But if the assignment in the lease didn't execute 342 // correctly, this field will be `OK` while the failure of the assignment must 343 // communicated via the `result` field. 344 Status *status.Status `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` 345 // The requirements that are being claimed by this lease. This field may be 346 // omitted by the server if the lease is not pending. 347 Requirements *Worker `protobuf:"bytes,4,opt,name=requirements,proto3" json:"requirements,omitempty"` 348 // The time at which this lease expires. The server *may* extend this over 349 // time, but due to race conditions, the bot is not *required* to respect any 350 // expiry date except the first one. 351 ExpireTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=expire_time,json=expireTime,proto3" json:"expire_time,omitempty"` 352 // DEPRECATED. The assignment should be provided to the bot via the `payload` 353 // field. Clients that wish to use a simple name (such as a queue of work 354 // provided elsewhere) should define a custom message type and encode it into 355 // `payload`. 356 Assignment string `protobuf:"bytes,1,opt,name=assignment,proto3" json:"assignment,omitempty"` // Deprecated: Do not use. 357 // DEPRECATED. Use `payload` instead. 358 InlineAssignment *any.Any `protobuf:"bytes,6,opt,name=inline_assignment,json=inlineAssignment,proto3" json:"inline_assignment,omitempty"` // Deprecated: Do not use. 359 XXX_NoUnkeyedLiteral struct{} `json:"-"` 360 XXX_unrecognized []byte `json:"-"` 361 XXX_sizecache int32 `json:"-"` 362} 363 364func (m *Lease) Reset() { *m = Lease{} } 365func (m *Lease) String() string { return proto.CompactTextString(m) } 366func (*Lease) ProtoMessage() {} 367func (*Lease) Descriptor() ([]byte, []int) { 368 return fileDescriptor_129e24cb0c941ff8, []int{1} 369} 370 371func (m *Lease) XXX_Unmarshal(b []byte) error { 372 return xxx_messageInfo_Lease.Unmarshal(m, b) 373} 374func (m *Lease) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 375 return xxx_messageInfo_Lease.Marshal(b, m, deterministic) 376} 377func (m *Lease) XXX_Merge(src proto.Message) { 378 xxx_messageInfo_Lease.Merge(m, src) 379} 380func (m *Lease) XXX_Size() int { 381 return xxx_messageInfo_Lease.Size(m) 382} 383func (m *Lease) XXX_DiscardUnknown() { 384 xxx_messageInfo_Lease.DiscardUnknown(m) 385} 386 387var xxx_messageInfo_Lease proto.InternalMessageInfo 388 389func (m *Lease) GetId() string { 390 if m != nil { 391 return m.Id 392 } 393 return "" 394} 395 396func (m *Lease) GetPayload() *any.Any { 397 if m != nil { 398 return m.Payload 399 } 400 return nil 401} 402 403func (m *Lease) GetResult() *any.Any { 404 if m != nil { 405 return m.Result 406 } 407 return nil 408} 409 410func (m *Lease) GetState() LeaseState { 411 if m != nil { 412 return m.State 413 } 414 return LeaseState_LEASE_STATE_UNSPECIFIED 415} 416 417func (m *Lease) GetStatus() *status.Status { 418 if m != nil { 419 return m.Status 420 } 421 return nil 422} 423 424func (m *Lease) GetRequirements() *Worker { 425 if m != nil { 426 return m.Requirements 427 } 428 return nil 429} 430 431func (m *Lease) GetExpireTime() *timestamp.Timestamp { 432 if m != nil { 433 return m.ExpireTime 434 } 435 return nil 436} 437 438// Deprecated: Do not use. 439func (m *Lease) GetAssignment() string { 440 if m != nil { 441 return m.Assignment 442 } 443 return "" 444} 445 446// Deprecated: Do not use. 447func (m *Lease) GetInlineAssignment() *any.Any { 448 if m != nil { 449 return m.InlineAssignment 450 } 451 return nil 452} 453 454// AdminTemp is a prelimiary set of administration tasks. It's called "Temp" 455// because we do not yet know the best way to represent admin tasks; it's 456// possible that this will be entirely replaced in later versions of this API. 457// If this message proves to be sufficient, it will be renamed in the alpha or 458// beta release of this API. 459// 460// This message (suitably marshalled into a protobuf.Any) can be used as the 461// inline_assignment field in a lease; the lease assignment field should simply 462// be `"admin"` in these cases. 463// 464// This message is heavily based on Swarming administration tasks from the LUCI 465// project (http://github.com/luci/luci-py/appengine/swarming). 466type AdminTemp struct { 467 // The admin action; see `Command` for legal values. 468 Command AdminTemp_Command `protobuf:"varint,1,opt,name=command,proto3,enum=google.devtools.remoteworkers.v1test2.AdminTemp_Command" json:"command,omitempty"` 469 // The argument to the admin action; see `Command` for semantics. 470 Arg string `protobuf:"bytes,2,opt,name=arg,proto3" json:"arg,omitempty"` 471 XXX_NoUnkeyedLiteral struct{} `json:"-"` 472 XXX_unrecognized []byte `json:"-"` 473 XXX_sizecache int32 `json:"-"` 474} 475 476func (m *AdminTemp) Reset() { *m = AdminTemp{} } 477func (m *AdminTemp) String() string { return proto.CompactTextString(m) } 478func (*AdminTemp) ProtoMessage() {} 479func (*AdminTemp) Descriptor() ([]byte, []int) { 480 return fileDescriptor_129e24cb0c941ff8, []int{2} 481} 482 483func (m *AdminTemp) XXX_Unmarshal(b []byte) error { 484 return xxx_messageInfo_AdminTemp.Unmarshal(m, b) 485} 486func (m *AdminTemp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 487 return xxx_messageInfo_AdminTemp.Marshal(b, m, deterministic) 488} 489func (m *AdminTemp) XXX_Merge(src proto.Message) { 490 xxx_messageInfo_AdminTemp.Merge(m, src) 491} 492func (m *AdminTemp) XXX_Size() int { 493 return xxx_messageInfo_AdminTemp.Size(m) 494} 495func (m *AdminTemp) XXX_DiscardUnknown() { 496 xxx_messageInfo_AdminTemp.DiscardUnknown(m) 497} 498 499var xxx_messageInfo_AdminTemp proto.InternalMessageInfo 500 501func (m *AdminTemp) GetCommand() AdminTemp_Command { 502 if m != nil { 503 return m.Command 504 } 505 return AdminTemp_UNSPECIFIED 506} 507 508func (m *AdminTemp) GetArg() string { 509 if m != nil { 510 return m.Arg 511 } 512 return "" 513} 514 515// Request message for CreateBotSession. 516type CreateBotSessionRequest struct { 517 // Required. The farm resource. 518 Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` 519 // Required. The bot session to create. Server-assigned fields like name must be unset. 520 BotSession *BotSession `protobuf:"bytes,2,opt,name=bot_session,json=botSession,proto3" json:"bot_session,omitempty"` 521 XXX_NoUnkeyedLiteral struct{} `json:"-"` 522 XXX_unrecognized []byte `json:"-"` 523 XXX_sizecache int32 `json:"-"` 524} 525 526func (m *CreateBotSessionRequest) Reset() { *m = CreateBotSessionRequest{} } 527func (m *CreateBotSessionRequest) String() string { return proto.CompactTextString(m) } 528func (*CreateBotSessionRequest) ProtoMessage() {} 529func (*CreateBotSessionRequest) Descriptor() ([]byte, []int) { 530 return fileDescriptor_129e24cb0c941ff8, []int{3} 531} 532 533func (m *CreateBotSessionRequest) XXX_Unmarshal(b []byte) error { 534 return xxx_messageInfo_CreateBotSessionRequest.Unmarshal(m, b) 535} 536func (m *CreateBotSessionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 537 return xxx_messageInfo_CreateBotSessionRequest.Marshal(b, m, deterministic) 538} 539func (m *CreateBotSessionRequest) XXX_Merge(src proto.Message) { 540 xxx_messageInfo_CreateBotSessionRequest.Merge(m, src) 541} 542func (m *CreateBotSessionRequest) XXX_Size() int { 543 return xxx_messageInfo_CreateBotSessionRequest.Size(m) 544} 545func (m *CreateBotSessionRequest) XXX_DiscardUnknown() { 546 xxx_messageInfo_CreateBotSessionRequest.DiscardUnknown(m) 547} 548 549var xxx_messageInfo_CreateBotSessionRequest proto.InternalMessageInfo 550 551func (m *CreateBotSessionRequest) GetParent() string { 552 if m != nil { 553 return m.Parent 554 } 555 return "" 556} 557 558func (m *CreateBotSessionRequest) GetBotSession() *BotSession { 559 if m != nil { 560 return m.BotSession 561 } 562 return nil 563} 564 565// Request message for UpdateBotSession. 566type UpdateBotSessionRequest struct { 567 // Required. The bot session name. Must match bot_session.name. 568 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 569 // Required. The bot session resource to update. 570 BotSession *BotSession `protobuf:"bytes,2,opt,name=bot_session,json=botSession,proto3" json:"bot_session,omitempty"` 571 // Required. The fields on the bot that should be updated. See the BotSession resource 572 // for which fields are updatable by which caller. 573 UpdateMask *field_mask.FieldMask `protobuf:"bytes,3,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` 574 XXX_NoUnkeyedLiteral struct{} `json:"-"` 575 XXX_unrecognized []byte `json:"-"` 576 XXX_sizecache int32 `json:"-"` 577} 578 579func (m *UpdateBotSessionRequest) Reset() { *m = UpdateBotSessionRequest{} } 580func (m *UpdateBotSessionRequest) String() string { return proto.CompactTextString(m) } 581func (*UpdateBotSessionRequest) ProtoMessage() {} 582func (*UpdateBotSessionRequest) Descriptor() ([]byte, []int) { 583 return fileDescriptor_129e24cb0c941ff8, []int{4} 584} 585 586func (m *UpdateBotSessionRequest) XXX_Unmarshal(b []byte) error { 587 return xxx_messageInfo_UpdateBotSessionRequest.Unmarshal(m, b) 588} 589func (m *UpdateBotSessionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 590 return xxx_messageInfo_UpdateBotSessionRequest.Marshal(b, m, deterministic) 591} 592func (m *UpdateBotSessionRequest) XXX_Merge(src proto.Message) { 593 xxx_messageInfo_UpdateBotSessionRequest.Merge(m, src) 594} 595func (m *UpdateBotSessionRequest) XXX_Size() int { 596 return xxx_messageInfo_UpdateBotSessionRequest.Size(m) 597} 598func (m *UpdateBotSessionRequest) XXX_DiscardUnknown() { 599 xxx_messageInfo_UpdateBotSessionRequest.DiscardUnknown(m) 600} 601 602var xxx_messageInfo_UpdateBotSessionRequest proto.InternalMessageInfo 603 604func (m *UpdateBotSessionRequest) GetName() string { 605 if m != nil { 606 return m.Name 607 } 608 return "" 609} 610 611func (m *UpdateBotSessionRequest) GetBotSession() *BotSession { 612 if m != nil { 613 return m.BotSession 614 } 615 return nil 616} 617 618func (m *UpdateBotSessionRequest) GetUpdateMask() *field_mask.FieldMask { 619 if m != nil { 620 return m.UpdateMask 621 } 622 return nil 623} 624 625func init() { 626 proto.RegisterEnum("google.devtools.remoteworkers.v1test2.BotStatus", BotStatus_name, BotStatus_value) 627 proto.RegisterEnum("google.devtools.remoteworkers.v1test2.LeaseState", LeaseState_name, LeaseState_value) 628 proto.RegisterEnum("google.devtools.remoteworkers.v1test2.AdminTemp_Command", AdminTemp_Command_name, AdminTemp_Command_value) 629 proto.RegisterType((*BotSession)(nil), "google.devtools.remoteworkers.v1test2.BotSession") 630 proto.RegisterType((*Lease)(nil), "google.devtools.remoteworkers.v1test2.Lease") 631 proto.RegisterType((*AdminTemp)(nil), "google.devtools.remoteworkers.v1test2.AdminTemp") 632 proto.RegisterType((*CreateBotSessionRequest)(nil), "google.devtools.remoteworkers.v1test2.CreateBotSessionRequest") 633 proto.RegisterType((*UpdateBotSessionRequest)(nil), "google.devtools.remoteworkers.v1test2.UpdateBotSessionRequest") 634} 635 636func init() { 637 proto.RegisterFile("google/devtools/remoteworkers/v1test2/bots.proto", fileDescriptor_129e24cb0c941ff8) 638} 639 640var fileDescriptor_129e24cb0c941ff8 = []byte{ 641 // 1103 bytes of a gzipped FileDescriptorProto 642 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4d, 0x73, 0xdb, 0x44, 643 0x18, 0x46, 0xf2, 0x17, 0x79, 0xdd, 0xba, 0xca, 0xf2, 0x11, 0xe1, 0x66, 0xa6, 0x1e, 0xcf, 0x74, 644 0x48, 0x4d, 0x90, 0x1a, 0x73, 0x61, 0xda, 0x29, 0x83, 0x6c, 0xab, 0x89, 0xc1, 0xb1, 0x83, 0xac, 645 0x24, 0xd3, 0x5e, 0x5c, 0xd9, 0xde, 0xba, 0x9a, 0x58, 0x5a, 0x55, 0xbb, 0x4e, 0xc9, 0x64, 0x72, 646 0xe1, 0x0f, 0x70, 0xe0, 0x1f, 0x70, 0xe4, 0x57, 0xc0, 0x95, 0x1b, 0xd3, 0x13, 0xe5, 0xd2, 0x03, 647 0x5c, 0xf8, 0x07, 0x70, 0x62, 0x56, 0x5a, 0xc7, 0xb2, 0x4b, 0x8a, 0xd3, 0x19, 0x6e, 0xde, 0x77, 648 0xdf, 0xe7, 0x79, 0xbf, 0x9e, 0x57, 0x6b, 0xb8, 0x3d, 0x22, 0x64, 0x34, 0xc6, 0xfa, 0x10, 0x1f, 649 0x33, 0x42, 0xc6, 0x54, 0x0f, 0xb1, 0x47, 0x18, 0x7e, 0x46, 0xc2, 0x23, 0x1c, 0x52, 0xfd, 0x78, 650 0x8b, 0x61, 0xca, 0xaa, 0x7a, 0x9f, 0x30, 0xaa, 0x05, 0x21, 0x61, 0x04, 0xdd, 0x8c, 0x11, 0xda, 651 0x14, 0xa1, 0xcd, 0x21, 0x34, 0x81, 0x28, 0xae, 0x0b, 0x62, 0x27, 0x70, 0x75, 0xc7, 0xf7, 0x09, 652 0x73, 0x98, 0x4b, 0x7c, 0x41, 0x52, 0x5c, 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x96, 0xc0, 0xa2, 0xbb, 0x90, 664 0xc7, 0x5f, 0x07, 0x6e, 0x88, 0x7b, 0xbc, 0x87, 0x6a, 0x36, 0xca, 0xa8, 0x38, 0xa5, 0x9a, 0x36, 665 0x58, 0xb3, 0xa7, 0x0d, 0xb6, 0x20, 0x76, 0xe7, 0x06, 0xa4, 0x42, 0xee, 0x18, 0x87, 0xbc, 0x93, 666 0x6a, 0x2e, 0xea, 0xd5, 0xf4, 0x78, 0xe7, 0xc1, 0x9f, 0xc6, 0x01, 0x7c, 0x38, 0x9f, 0x40, 0xcc, 667 0xe9, 0x04, 0x2e, 0xd5, 0x06, 0xc4, 0xd3, 0x13, 0x63, 0xf8, 0xe8, 0x74, 0xe2, 0x1f, 0xf9, 0xe4, 668 0x99, 0xdf, 0x0b, 0x1c, 0xf6, 0xe4, 0x5e, 0xa5, 0x72, 0xc6, 0x85, 0x2f, 0x6e, 0xa9, 0x7e, 0xca, 669 0xe7, 0x41, 0xe3, 0xd3, 0x59, 0xf9, 0x8f, 0x14, 0x64, 0xa2, 0x1a, 0x50, 0x01, 0x64, 0x77, 0x28, 670 0x22, 0xcb, 0xee, 0x10, 0x69, 0x90, 0x0b, 0x9c, 0x93, 0x31, 0x71, 0x86, 0xea, 0xdb, 0x51, 0x1d, 671 0xef, 0xbe, 0x52, 0x87, 0xe1, 0x9f, 0x58, 0x53, 0x27, 0xb4, 0x09, 0xd9, 0x10, 0xd3, 0xc9, 0x98, 672 0xa9, 0x2b, 0xaf, 0x71, 0x17, 0x3e, 0x68, 0x1b, 0x32, 0x7c, 0x80, 0x38, 0x92, 0x45, 0xa1, 0xba, 673 0x75, 0x99, 0x76, 0x73, 0x05, 0x60, 0x2b, 0xc6, 0xa3, 0xca, 0x9c, 0x92, 0xf2, 0x55, 0x34, 0x65, 674 0x0a, 0x83, 0x81, 0xb6, 0xa0, 0x95, 0xaf, 0xe0, 0x4a, 0x88, 0x9f, 0x4e, 0xdc, 0x10, 0x7b, 0xd8, 675 0x67, 0xf4, 0xcd, 0x14, 0x33, 0x47, 0xb1, 0x38, 0xf1, 0xcc, 0xa5, 0x26, 0x5e, 0x06, 0x70, 0x28, 676 0x75, 0x47, 0x3e, 0xe7, 0x8a, 0xd7, 0xa6, 0x26, 0xab, 0x92, 0x95, 0xb0, 0x22, 0x13, 0x56, 0x5d, 677 0x7f, 0xec, 0xfa, 0xb8, 0x97, 0x70, 0xcd, 0x5e, 0xdc, 0xe1, 0x88, 0x40, 0x89, 0x21, 0xc6, 0x39, 678 0xa2, 0xfc, 0x5c, 0x82, 0x15, 0x63, 0xe8, 0xb9, 0xbe, 0x8d, 0xbd, 0x00, 0x59, 0x90, 0x1b, 0x10, 679 0xcf, 0x73, 0xfc, 0x61, 0x14, 0xb5, 0x50, 0xfd, 0x74, 0xc9, 0x1e, 0x9c, 0x53, 0x68, 0xf5, 0x18, 680 0x6f, 0x4d, 0x89, 0x90, 0x02, 0x29, 0x27, 0x1c, 0x89, 0x35, 0xe7, 0x3f, 0xcb, 0x8f, 0x20, 0x27, 681 0xbc, 0xd0, 0x35, 0xc8, 0xef, 0xb7, 0xbb, 0x7b, 0x66, 0xbd, 0x79, 0xbf, 0x69, 0x36, 0x94, 0xb7, 682 0x50, 0x01, 0xa0, 0xd6, 0xb1, 0x7b, 0xfb, 0x7b, 0x0d, 0xc3, 0x36, 0x15, 0x89, 0x3b, 0xf0, 0xb3, 683 0x65, 0x76, 0x6d, 0xc3, 0xb2, 0x15, 0x19, 0xad, 0xc2, 0x55, 0x6e, 0xb0, 0x4d, 0x6b, 0xb7, 0xd9, 684 0xe6, 0x3e, 0x29, 0xa4, 0xc0, 0x95, 0x9d, 0x4e, 0x77, 0xe6, 0x94, 0x2e, 0x7f, 0x2b, 0xc1, 0x5a, 685 0x3d, 0xc4, 0x0e, 0xc3, 0x33, 0xfd, 0x5b, 0xf8, 0xe9, 0x04, 0x53, 0x86, 0xae, 0x43, 0x36, 0x70, 686 0xc2, 0x59, 0x63, 0x53, 0x2f, 0x0d, 0xd9, 0x12, 0x26, 0x74, 0x08, 0xf9, 0xc4, 0x1a, 0x44, 0x49, 687 0xe7, 0x97, 0x16, 0xe1, 0x2c, 0x56, 0x4c, 0x0a, 0xb3, 0xf5, 0x2a, 0xff, 0x25, 0xc1, 0xda, 0x7e, 688 0x30, 0xfc, 0xd7, 0x8c, 0xea, 0xc9, 0xef, 0x63, 0x4d, 0x7f, 0x69, 0xc8, 0x7f, 0x1b, 0xb7, 0x96, 689 0xde, 0x6b, 0xf1, 0x41, 0xfd, 0xbf, 0x32, 0x47, 0x9f, 0x43, 0x7e, 0x12, 0x25, 0x1e, 0xbd, 0x0d, 690 0x62, 0x9b, 0x5e, 0x55, 0xf2, 0x7d, 0xfe, 0x7c, 0xec, 0x3a, 0xf4, 0x48, 0x30, 0xc4, 0x18, 0x6e, 691 0xa8, 0x9c, 0xc0, 0xca, 0xf9, 0xf7, 0x19, 0x15, 0xe1, 0x7d, 0x3e, 0xbf, 0xae, 0x6d, 0xd8, 0xfb, 692 0xdd, 0xde, 0xfc, 0xf0, 0xb3, 0x20, 0x77, 0xbe, 0x54, 0x24, 0x74, 0x15, 0x56, 0xf6, 0xdb, 0x3b, 693 0xa6, 0xd1, 0xb2, 0x77, 0x1e, 0x28, 0x32, 0x42, 0x50, 0x10, 0xf3, 0xad, 0x75, 0x3a, 0x76, 0xb3, 694 0xbd, 0xad, 0xa4, 0xd0, 0x3b, 0x70, 0x2d, 0x29, 0x03, 0x6e, 0x4c, 0x73, 0x21, 0x34, 0xdb, 0x4d, 695 0xbb, 0x69, 0xb4, 0x9a, 0x0f, 0xb9, 0x25, 0x53, 0x79, 0x04, 0x30, 0xfb, 0x34, 0xa0, 0xeb, 0xb0, 696 0xd6, 0x32, 0x8d, 0xae, 0x19, 0x45, 0x37, 0x17, 0x82, 0xe7, 0x21, 0xb7, 0x67, 0xb6, 0x1b, 0x1c, 697 0x27, 0x21, 0x80, 0xac, 0x51, 0xb7, 0x9b, 0x07, 0xa6, 0x22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0x76, 0xcc, 0xdc, 709 0xc0, 0xc7, 0x76, 0x94, 0xd5, 0x5c, 0x78, 0xed, 0x60, 0xcb, 0xe6, 0xd0, 0x7e, 0x36, 0x8a, 0xf5, 710 0xc9, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x8c, 0xa2, 0xf3, 0x0f, 0x0b, 0x0b, 0x00, 0x00, 711} 712 713// Reference imports to suppress errors if they are not otherwise used. 714var _ context.Context 715var _ grpc.ClientConnInterface 716 717// This is a compile-time assertion to ensure that this generated file 718// is compatible with the grpc package it is being compiled against. 719const _ = grpc.SupportPackageIsVersion6 720 721// BotsClient is the client API for Bots service. 722// 723// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 724type BotsClient interface { 725 // CreateBotSession is called when the bot first joins the farm, and 726 // establishes a session ID to ensure that multiple machines do not register 727 // using the same name accidentally. 728 CreateBotSession(ctx context.Context, in *CreateBotSessionRequest, opts ...grpc.CallOption) (*BotSession, error) 729 // UpdateBotSession must be called periodically by the bot (on a schedule 730 // determined by the server) to let the server know about its status, and to 731 // pick up new lease requests from the server. 732 UpdateBotSession(ctx context.Context, in *UpdateBotSessionRequest, opts ...grpc.CallOption) (*BotSession, error) 733} 734 735type botsClient struct { 736 cc grpc.ClientConnInterface 737} 738 739func NewBotsClient(cc grpc.ClientConnInterface) BotsClient { 740 return &botsClient{cc} 741} 742 743func (c *botsClient) CreateBotSession(ctx context.Context, in *CreateBotSessionRequest, opts ...grpc.CallOption) (*BotSession, error) { 744 out := new(BotSession) 745 err := c.cc.Invoke(ctx, "/google.devtools.remoteworkers.v1test2.Bots/CreateBotSession", in, out, opts...) 746 if err != nil { 747 return nil, err 748 } 749 return out, nil 750} 751 752func (c *botsClient) UpdateBotSession(ctx context.Context, in *UpdateBotSessionRequest, opts ...grpc.CallOption) (*BotSession, error) { 753 out := new(BotSession) 754 err := c.cc.Invoke(ctx, "/google.devtools.remoteworkers.v1test2.Bots/UpdateBotSession", in, out, opts...) 755 if err != nil { 756 return nil, err 757 } 758 return out, nil 759} 760 761// BotsServer is the server API for Bots service. 762type BotsServer interface { 763 // CreateBotSession is called when the bot first joins the farm, and 764 // establishes a session ID to ensure that multiple machines do not register 765 // using the same name accidentally. 766 CreateBotSession(context.Context, *CreateBotSessionRequest) (*BotSession, error) 767 // UpdateBotSession must be called periodically by the bot (on a schedule 768 // determined by the server) to let the server know about its status, and to 769 // pick up new lease requests from the server. 770 UpdateBotSession(context.Context, *UpdateBotSessionRequest) (*BotSession, error) 771} 772 773// UnimplementedBotsServer can be embedded to have forward compatible implementations. 774type UnimplementedBotsServer struct { 775} 776 777func (*UnimplementedBotsServer) CreateBotSession(ctx context.Context, req *CreateBotSessionRequest) (*BotSession, error) { 778 return nil, status1.Errorf(codes.Unimplemented, "method CreateBotSession not implemented") 779} 780func (*UnimplementedBotsServer) UpdateBotSession(ctx context.Context, req *UpdateBotSessionRequest) (*BotSession, error) { 781 return nil, status1.Errorf(codes.Unimplemented, "method UpdateBotSession not implemented") 782} 783 784func RegisterBotsServer(s *grpc.Server, srv BotsServer) { 785 s.RegisterService(&_Bots_serviceDesc, srv) 786} 787 788func _Bots_CreateBotSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 789 in := new(CreateBotSessionRequest) 790 if err := dec(in); err != nil { 791 return nil, err 792 } 793 if interceptor == nil { 794 return srv.(BotsServer).CreateBotSession(ctx, in) 795 } 796 info := &grpc.UnaryServerInfo{ 797 Server: srv, 798 FullMethod: "/google.devtools.remoteworkers.v1test2.Bots/CreateBotSession", 799 } 800 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 801 return srv.(BotsServer).CreateBotSession(ctx, req.(*CreateBotSessionRequest)) 802 } 803 return interceptor(ctx, in, info, handler) 804} 805 806func _Bots_UpdateBotSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 807 in := new(UpdateBotSessionRequest) 808 if err := dec(in); err != nil { 809 return nil, err 810 } 811 if interceptor == nil { 812 return srv.(BotsServer).UpdateBotSession(ctx, in) 813 } 814 info := &grpc.UnaryServerInfo{ 815 Server: srv, 816 FullMethod: "/google.devtools.remoteworkers.v1test2.Bots/UpdateBotSession", 817 } 818 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 819 return srv.(BotsServer).UpdateBotSession(ctx, req.(*UpdateBotSessionRequest)) 820 } 821 return interceptor(ctx, in, info, handler) 822} 823 824var _Bots_serviceDesc = grpc.ServiceDesc{ 825 ServiceName: "google.devtools.remoteworkers.v1test2.Bots", 826 HandlerType: (*BotsServer)(nil), 827 Methods: []grpc.MethodDesc{ 828 { 829 MethodName: "CreateBotSession", 830 Handler: _Bots_CreateBotSession_Handler, 831 }, 832 { 833 MethodName: "UpdateBotSession", 834 Handler: _Bots_UpdateBotSession_Handler, 835 }, 836 }, 837 Streams: []grpc.StreamDesc{}, 838 Metadata: "google/devtools/remoteworkers/v1test2/bots.proto", 839} 840