yandex-cloud 2025.4.14

Generated gRPC clients for the Yandex Cloud API
Documentation
/// Agent selection criterion.
///
/// The structure is used by service to determine on which agents a specific test should be executed.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AgentSelector {
    #[prost(oneof = "agent_selector::Agent", tags = "1, 2, 3")]
    pub agent: ::core::option::Option<agent_selector::Agent>,
}
/// Nested message and enum types in `AgentSelector`.
pub mod agent_selector {
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Agent {
        /// Selection by agent ID.
        #[prost(string, tag = "1")]
        AgentId(::prost::alloc::string::String),
        /// Selection by filter string.
        #[prost(string, tag = "2")]
        MatchByFilter(::prost::alloc::string::String),
        /// Select anonymoud (i.e. not registered) agents.
        #[prost(bool, tag = "3")]
        AnonymousAgent(bool),
    }
}
/// Artifact upload settings.
///
/// Defines where to upload test artifacts and which files should be included.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ArtifactSettings {
    /// Setting which defines whether artifact files should be archived prior to uploading.
    #[prost(bool, tag = "6")]
    pub is_archive: bool,
    /// Filter strings defining which files should be included to artifacts. GLOB format.
    ///
    /// Example:
    /// - \['*'\] - all files will be uploaded.
    /// - ['*.log', '*.yaml] - all `.log` and `.yaml` files will be uploaded.
    #[prost(string, repeated, tag = "7")]
    pub filter_include: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Filter strings defining which files should be excluded from artifacts. GLOB format.
    ///
    /// Example:
    /// - filter_include=\['*'\], filter_exclude=\['phout.log'\] - upload all `.log` files excluding `phout.log`.
    #[prost(string, repeated, tag = "8")]
    pub filter_exclude: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(oneof = "artifact_settings::UploadTo", tags = "1")]
    pub upload_to: ::core::option::Option<artifact_settings::UploadTo>,
}
/// Nested message and enum types in `ArtifactSettings`.
pub mod artifact_settings {
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum UploadTo {
        /// Name of output object storage bucket in test's folder.
        #[prost(string, tag = "1")]
        ObjectStorageBucket(::prost::alloc::string::String),
    }
}
/// Test meta information.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Details {
    /// Name of the test.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Description of the test.
    #[prost(string, tag = "2")]
    pub description: ::prost::alloc::string::String,
    /// Tags assigned to the test.
    #[prost(message, repeated, tag = "3")]
    pub tags: ::prost::alloc::vec::Vec<super::common::Tag>,
    /// ID of the logging group to which test artifacts are uploaded.
    #[prost(string, tag = "4")]
    pub logging_log_group_id: ::prost::alloc::string::String,
    /// Settings which define where to upload test artifacts and which files should be included.
    #[prost(message, optional, tag = "5")]
    pub artifact_settings: ::core::option::Option<ArtifactSettings>,
}
/// Reference to a file stored in Object Storage.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ObjectStorage {
    /// Bucket name.
    #[prost(string, tag = "1")]
    pub bucket: ::prost::alloc::string::String,
    /// File name.
    #[prost(string, tag = "2")]
    pub name: ::prost::alloc::string::String,
}
/// Variant-like structure for referencing files in different sources.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FilePointer {
    #[prost(oneof = "file_pointer::FilePointer", tags = "1")]
    pub file_pointer: ::core::option::Option<file_pointer::FilePointer>,
}
/// Nested message and enum types in `FilePointer`.
pub mod file_pointer {
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum FilePointer {
        /// Reference to a file in Object Storage.
        #[prost(message, tag = "1")]
        ObjectStorage(super::ObjectStorage),
    }
}
/// Test imbalance point.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ImbalancePoint {
    /// Imbalance moment timestamp.
    #[prost(message, optional, tag = "1")]
    pub at: ::core::option::Option<::prost_types::Timestamp>,
    /// Imbalance moment RPS.
    #[prost(int64, tag = "2")]
    pub rps: i64,
    /// Imbalance reason comment.
    #[prost(string, tag = "3")]
    pub comment: ::prost::alloc::string::String,
}
/// Configuration of a test.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SingleAgentConfiguration {
    /// ID of the config.
    #[prost(string, tag = "1")]
    pub config_id: ::prost::alloc::string::String,
    /// Agent selection criterion.
    #[prost(message, optional, tag = "2")]
    pub agent_selector: ::core::option::Option<AgentSelector>,
    /// Additional files to be used during test execution, represented as `rel_path:file` pairs.
    ///
    /// `rel_path` can be either a simple file name, a relative path, or absolute path. Files are
    /// downloaded by the agent to appropriate location.
    ///
    /// Use cases include:
    /// - [Test Data files](/docs/load-testing/concepts/payload).
    /// - Custom Pandora executable.
    /// - JMeter executable or ".jmx" scenario.
    /// - etc.
    #[prost(map = "string, message", tag = "3")]
    pub files: ::std::collections::HashMap<::prost::alloc::string::String, FilePointer>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Status {
    /// Status is unspecified.
    Unspecified = 0,
    /// Test has been created, but not started by any agent.
    Created = 1,
    /// Execution stage: initialization.
    Initiated = 2,
    /// Execution stage: data preparation and warm-up.
    Preparing = 3,
    /// Execution stage: load generation.
    Running = 4,
    /// Execution stage: termination.
    Finishing = 5,
    /// Test is done.
    Done = 6,
    /// Execution stage: results post-processing.
    PostProcessing = 7,
    /// Test has failed due to some error.
    Failed = 8,
    /// Test is being stopped.
    Stopping = 9,
    /// Test has been stopped by user.
    Stopped = 10,
    /// Test has been stopped automatically by satisfying autostop condition.
    Autostopped = 11,
    /// Execution stage: waiting for a trigger to start.
    Waiting = 12,
    /// Test is being deleted.
    Deleting = 13,
    /// Test status has not been reported in a while during execution stage.
    ///
    /// Means that either an agent is too busy to send it, got offline, or failed without
    /// reporting a final status.
    Lost = 14,
    /// Test has been cancelled.
    Cancelled = 15,
}
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::Created => "CREATED",
            Status::Initiated => "INITIATED",
            Status::Preparing => "PREPARING",
            Status::Running => "RUNNING",
            Status::Finishing => "FINISHING",
            Status::Done => "DONE",
            Status::PostProcessing => "POST_PROCESSING",
            Status::Failed => "FAILED",
            Status::Stopping => "STOPPING",
            Status::Stopped => "STOPPED",
            Status::Autostopped => "AUTOSTOPPED",
            Status::Waiting => "WAITING",
            Status::Deleting => "DELETING",
            Status::Lost => "LOST",
            Status::Cancelled => "CANCELLED",
        }
    }
    /// 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),
            "CREATED" => Some(Self::Created),
            "INITIATED" => Some(Self::Initiated),
            "PREPARING" => Some(Self::Preparing),
            "RUNNING" => Some(Self::Running),
            "FINISHING" => Some(Self::Finishing),
            "DONE" => Some(Self::Done),
            "POST_PROCESSING" => Some(Self::PostProcessing),
            "FAILED" => Some(Self::Failed),
            "STOPPING" => Some(Self::Stopping),
            "STOPPED" => Some(Self::Stopped),
            "AUTOSTOPPED" => Some(Self::Autostopped),
            "WAITING" => Some(Self::Waiting),
            "DELETING" => Some(Self::Deleting),
            "LOST" => Some(Self::Lost),
            "CANCELLED" => Some(Self::Cancelled),
            _ => None,
        }
    }
}
/// Process of test and some results
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Summary {
    /// Status of the test.
    #[prost(enumeration = "Status", tag = "1")]
    pub status: i32,
    /// Creation timestamp.
    #[prost(message, optional, tag = "2")]
    pub created_at: ::core::option::Option<::prost_types::Timestamp>,
    /// UA or SA that created the test.
    #[prost(string, tag = "3")]
    pub created_by: ::prost::alloc::string::String,
    /// Test start timestamp.
    ///
    /// Empty if the test has not been started yet.
    #[prost(message, optional, tag = "4")]
    pub started_at: ::core::option::Option<::prost_types::Timestamp>,
    /// Test finish timestamp.
    ///
    /// Empty if the test has not been finished yet.
    #[prost(message, optional, tag = "5")]
    pub finished_at: ::core::option::Option<::prost_types::Timestamp>,
    /// Indicates whether the test is finished.
    #[prost(bool, tag = "6")]
    pub is_finished: bool,
    /// Error message.
    #[prost(string, tag = "7")]
    pub error: ::prost::alloc::string::String,
    /// Detected imbalance point.
    ///
    /// Contains information about a state at the moment it has been
    /// \[auto-stopped\](/docs/load-testing/concepts/auto-stop).
    ///
    /// Empty if no auto-stop occured.
    #[prost(message, optional, tag = "8")]
    pub imbalance_point: ::core::option::Option<ImbalancePoint>,
    /// ID of the agent that executed the test.
    #[prost(string, tag = "9")]
    pub assigned_agent_id: ::prost::alloc::string::String,
    /// Test output artifacts.
    ///
    /// Link to the artifacts output target containing `.log` and other files collected
    /// during test execution.
    #[prost(message, optional, tag = "10")]
    pub artifacts: ::core::option::Option<FilePointer>,
}
/// Load Test.
///
/// In context of the service, Test represents a single testing task/job.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Test {
    /// ID of the test. Generated at creation time.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// Configuration of the test.
    ///
    /// A test can have multiple configurations if it can be
    /// executed on multiple agents simultaneously. For more information, see
    /// [Load testing using multiple agents](/docs/load-testing/tutorials/loadtesting-multiply).
    #[prost(message, repeated, tag = "2")]
    pub configurations: ::prost::alloc::vec::Vec<SingleAgentConfiguration>,
    /// Test meta information. Name, description, etc.
    #[prost(message, optional, tag = "3")]
    pub details: ::core::option::Option<Details>,
    /// Test execution information.
    #[prost(message, optional, tag = "4")]
    pub summary: ::core::option::Option<Summary>,
    /// ID of the folder that the test belongs to.
    #[prost(string, tag = "5")]
    pub folder_id: ::prost::alloc::string::String,
}