Struct gapi_grpc::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,
}

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

impl BotSession[src]

pub fn status(&self) -> BotStatus[src]

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

pub fn set_status(&mut self, value: BotStatus)[src]

Sets status to the provided enum value.

Trait Implementations

impl Clone for BotSession[src]

impl Debug for BotSession[src]

impl Default for BotSession[src]

impl Message for BotSession[src]

impl PartialEq<BotSession> for BotSession[src]

impl StructuralPartialEq for BotSession[src]

Auto Trait Implementations

impl RefUnwindSafe for BotSession

impl Send for BotSession

impl Sync for BotSession

impl Unpin for BotSession

impl UnwindSafe for BotSession

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoRequest<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]

impl<T> WithSubscriber for T[src]