yandex-cloud 2025.4.14

Generated gRPC clients for the Yandex Cloud API
Documentation
/// Agent status.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Status {
    /// Status is not specified.
    Unspecified = 0,
    /// Agent is preparing a test to be executed.
    PreparingTest = 1,
    /// Agent is ready to take a test.
    ReadyForTest = 2,
    /// Agent is executing a test.
    Testing = 3,
    /// Agent application encountered an error and cannot operate normally.
    TankFailed = 4,
    /// Agent is waiting for resources to be allocated.
    Provisioning = 5,
    /// Agent is being stopped.
    Stopping = 6,
    /// Agent is stopped.
    Stopped = 7,
    /// Agent is being started.
    Starting = 8,
    /// Agent is being restarted.
    Restarting = 9,
    /// Agent is being updated.
    Updating = 10,
    /// Agent encountered an error and cannot operate.
    Error = 11,
    /// Agent is crashed and will be restarted automatically.
    Crashed = 12,
    /// Agent is being deleted.
    Deleting = 13,
    /// Service is waiting for connection with agent to be established.
    InitializingConnection = 15,
    /// Service has lost connection with agent.
    LostConnectionWithAgent = 16,
    /// Agent is uploading test artifacts.
    UploadingArtifacts = 17,
}
impl Status {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Status::Unspecified => "STATUS_UNSPECIFIED",
            Status::PreparingTest => "PREPARING_TEST",
            Status::ReadyForTest => "READY_FOR_TEST",
            Status::Testing => "TESTING",
            Status::TankFailed => "TANK_FAILED",
            Status::Provisioning => "PROVISIONING",
            Status::Stopping => "STOPPING",
            Status::Stopped => "STOPPED",
            Status::Starting => "STARTING",
            Status::Restarting => "RESTARTING",
            Status::Updating => "UPDATING",
            Status::Error => "ERROR",
            Status::Crashed => "CRASHED",
            Status::Deleting => "DELETING",
            Status::InitializingConnection => "INITIALIZING_CONNECTION",
            Status::LostConnectionWithAgent => "LOST_CONNECTION_WITH_AGENT",
            Status::UploadingArtifacts => "UPLOADING_ARTIFACTS",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "STATUS_UNSPECIFIED" => Some(Self::Unspecified),
            "PREPARING_TEST" => Some(Self::PreparingTest),
            "READY_FOR_TEST" => Some(Self::ReadyForTest),
            "TESTING" => Some(Self::Testing),
            "TANK_FAILED" => Some(Self::TankFailed),
            "PROVISIONING" => Some(Self::Provisioning),
            "STOPPING" => Some(Self::Stopping),
            "STOPPED" => Some(Self::Stopped),
            "STARTING" => Some(Self::Starting),
            "RESTARTING" => Some(Self::Restarting),
            "UPDATING" => Some(Self::Updating),
            "ERROR" => Some(Self::Error),
            "CRASHED" => Some(Self::Crashed),
            "DELETING" => Some(Self::Deleting),
            "INITIALIZING_CONNECTION" => Some(Self::InitializingConnection),
            "LOST_CONNECTION_WITH_AGENT" => Some(Self::LostConnectionWithAgent),
            "UPLOADING_ARTIFACTS" => Some(Self::UploadingArtifacts),
            _ => None,
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LogSettings {
    /// Id of Yandex Cloud log group to upload agent logs to
    #[prost(string, tag = "1")]
    pub cloud_log_group_id: ::prost::alloc::string::String,
}
/// Load testing agent on which tests are executed.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Agent {
    /// ID of the agent. Generated at creation time.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// ID of the folder that the agent belongs to.
    #[prost(string, tag = "2")]
    pub folder_id: ::prost::alloc::string::String,
    /// Name of the agent.
    #[prost(string, tag = "3")]
    pub name: ::prost::alloc::string::String,
    /// Description of the agent.
    #[prost(string, tag = "4")]
    pub description: ::prost::alloc::string::String,
    /// ID of the compute instance managed by the agent.
    ///
    /// Empty if there is no such instance (i.e. the case of external agent).
    #[prost(string, tag = "5")]
    pub compute_instance_id: ::prost::alloc::string::String,
    /// Status of the agent.
    #[prost(enumeration = "Status", tag = "7")]
    pub status: i32,
    /// List of errors reported by the agent.
    #[prost(string, repeated, tag = "8")]
    pub errors: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// ID of the test that is currently being executed by the agent.
    #[prost(string, tag = "9")]
    pub current_job_id: ::prost::alloc::string::String,
    /// Version of the agent.
    #[prost(string, tag = "10")]
    pub agent_version_id: ::prost::alloc::string::String,
    /// Agent labels as `key:value` pairs.
    #[prost(map = "string, string", tag = "12")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Agent log settings
    #[prost(message, optional, tag = "13")]
    pub log_settings: ::core::option::Option<LogSettings>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateComputeInstance {
    /// Resource labels as `key:value` pairs.
    #[prost(map = "string, string", tag = "4")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// ID of the availability zone where the instance resides.
    /// To get a list of available zones, use the \[yandex.cloud.compute.v1.ZoneService.List\] request
    #[prost(string, tag = "5")]
    pub zone_id: ::prost::alloc::string::String,
    /// Computing resources of the instance, such as the amount of memory and number of cores.
    /// To get a list of available values, see [Levels of core performance](/docs/compute/concepts/performance-levels).
    #[prost(message, optional, tag = "7")]
    pub resources_spec: ::core::option::Option<
        super::super::super::super::compute::v1::ResourcesSpec,
    >,
    /// The metadata `key:value` pairs that will be assigned to this instance. This includes custom metadata and predefined keys.
    /// The total size of all keys and values must be less than 512 KB.
    ///
    /// Values are free-form strings, and only have meaning as interpreted by the programs which configure the instance.
    /// The values must be 256 KB or less.
    ///
    /// For example, you may use the metadata in order to provide your public SSH key to the instance.
    /// For more information, see \[Metadata\](/docs/compute/concepts/vm-metadata).
    #[prost(map = "string, string", tag = "8")]
    pub metadata: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Boot disk to attach to the instance.
    #[prost(message, optional, tag = "9")]
    pub boot_disk_spec: ::core::option::Option<
        super::super::super::super::compute::v1::AttachedDiskSpec,
    >,
    /// Network configuration for the instance. Specifies how the network interface is configured
    /// to interact with other services on the internal network and on the internet.
    /// Currently only one network interface is supported per instance.
    #[prost(message, repeated, tag = "11")]
    pub network_interface_specs: ::prost::alloc::vec::Vec<
        super::super::super::super::compute::v1::NetworkInterfaceSpec,
    >,
    /// ID of the service account to use for [authentication inside the instance](/docs/compute/operations/vm-connect/auth-inside-vm).
    /// To get the service account ID, use a \[yandex.cloud.iam.v1.ServiceAccountService.List\] request.
    #[prost(string, tag = "14")]
    pub service_account_id: ::prost::alloc::string::String,
    /// ID of the [Compute VM platform](/docs/compute/concepts/vm-platforms) on which the agent will be created.
    /// Default value: "standard-v2"
    #[prost(string, tag = "15")]
    pub platform_id: ::prost::alloc::string::String,
}