Struct googapis::google::devtools::remoteworkers::v1test2::BotSession[][src]

pub struct BotSession {
    pub name: String,
    pub bot_id: String,
    pub status: i32,
    pub worker: Option<Worker>,
    pub leases: Vec<Lease>,
    pub expire_time: Option<Timestamp>,
    pub version: String,
}
Expand description

A bot session represents the state of a bot while in continuous contact with the server for a period of time. The session includes information about the worker - that is, the worker (the physical or virtual hardware) is considered to be a property of the bot (the software agent running on that hardware), which is the reverse of real life, but more natural from the point of the view of this API, which communicates solely with the bot and not directly with the underlying worker.

Fields

name: String

The bot session name, as selected by the server. Output only during a call to CreateBotSession.

bot_id: String

A unique bot ID within the farm used to persistently identify this bot over time (i.e., over multiple sessions). This ID must be unique within a farm. Typically, the bot ID will be the same as the name of the primary device in the worker (e.g., what you’d get from typing uname -n on *nix), but this is not required since a single device may allow multiple bots to run on it, each with access to different resources. What is important is that this ID is meaningful to humans, who might need to hunt a physical machine down to fix it.

When CreateBotSession is successfully called with a bot_id, all prior sessions with the same ID are invalidated. If a bot attempts to update an invalid session, the server must reject that request, and may also quarantine the other bot with the same bot IDs (ie, stop sending it new leases and alert an admin).

status: i32

The status of the bot. This must be populated in every call to UpdateBotSession.

worker: Option<Worker>

A description of the worker hosting this bot. The Worker message is used here in the Status context (see Worker for more information). If multiple bots are running on the worker, this field should only describe the resources accessible from this bot.

During the call to CreateBotSession, the server may make arbitrary changes to the worker’s server_properties field (see that field for more information). Otherwise, this field is input-only.

leases: Vec<Lease>

A list of all leases that are a part of this session. See the Lease message for details.

expire_time: Option<Timestamp>

The time at which this bot session will expire, unless the bot calls UpdateBotSession again. Output only.

version: String

The version of the bot code currently running. The server may use this information to issue an admin action to tell the bot to update itself.

Implementations

Returns the enum value of status, or the default if the field is set to an invalid enum value.

Sets status to the provided enum value.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Returns the encoded length of the message without a length delimiter.

Clears the message, resetting all fields to their default.

Encodes the message to a buffer. Read more

Encodes the message to a newly allocated buffer.

Encodes the message with a length-delimiter to a buffer. Read more

Encodes the message with a length-delimiter to a newly allocated buffer.

Decodes an instance of the message from a buffer. Read more

Decodes a length-delimited instance of the message from the buffer.

Decodes an instance of the message from a buffer, and merges it into self. Read more

Decodes a length-delimited instance of the message from buffer, and merges it into self. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Wrap the input message T in a tonic::Request

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more