yandex_cloud/
yandex.cloud.loadtesting.api.v1.rs

1#[allow(clippy::derive_partial_eq_without_eq)]
2#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct CreateAgentRequest {
4    /// ID of the folder to create an agent in.
5    #[prost(string, tag = "1")]
6    pub folder_id: ::prost::alloc::string::String,
7    /// Name of the agent.
8    ///
9    /// A created compute instance will have the same name.
10    #[prost(string, tag = "2")]
11    pub name: ::prost::alloc::string::String,
12    /// Description of the agent.
13    ///
14    /// A created compute instance will have the same description.
15    #[prost(string, tag = "3")]
16    pub description: ::prost::alloc::string::String,
17    /// Parameters for compute instance to be created.
18    #[prost(message, optional, tag = "4")]
19    pub compute_instance_params: ::core::option::Option<agent::CreateComputeInstance>,
20    /// Version of the agent.
21    ///
22    /// If not provided, the most recent agent version will be used.
23    #[prost(string, tag = "5")]
24    pub agent_version: ::prost::alloc::string::String,
25    /// Agent labels as `key:value` pairs.
26    #[prost(map = "string, string", tag = "6")]
27    pub labels: ::std::collections::HashMap<
28        ::prost::alloc::string::String,
29        ::prost::alloc::string::String,
30    >,
31    /// Agent log settings
32    #[prost(message, optional, tag = "7")]
33    pub log_settings: ::core::option::Option<agent::LogSettings>,
34}
35#[allow(clippy::derive_partial_eq_without_eq)]
36#[derive(Clone, PartialEq, ::prost::Message)]
37pub struct CreateAgentMetadata {
38    /// ID of the agent that is being created.
39    #[prost(string, tag = "1")]
40    pub agent_id: ::prost::alloc::string::String,
41}
42#[allow(clippy::derive_partial_eq_without_eq)]
43#[derive(Clone, PartialEq, ::prost::Message)]
44pub struct GetAgentRequest {
45    /// ID of the agent to return.
46    #[prost(string, tag = "2")]
47    pub agent_id: ::prost::alloc::string::String,
48}
49#[allow(clippy::derive_partial_eq_without_eq)]
50#[derive(Clone, PartialEq, ::prost::Message)]
51pub struct DeleteAgentRequest {
52    /// ID of the agent to delete.
53    #[prost(string, tag = "1")]
54    pub agent_id: ::prost::alloc::string::String,
55}
56#[allow(clippy::derive_partial_eq_without_eq)]
57#[derive(Clone, PartialEq, ::prost::Message)]
58pub struct DeleteAgentMetadata {
59    /// ID of the agent that is being deleted.
60    #[prost(string, tag = "1")]
61    pub agent_id: ::prost::alloc::string::String,
62}
63#[allow(clippy::derive_partial_eq_without_eq)]
64#[derive(Clone, PartialEq, ::prost::Message)]
65pub struct ListAgentsRequest {
66    /// ID of the folder to list agents in.
67    #[prost(string, tag = "1")]
68    pub folder_id: ::prost::alloc::string::String,
69    /// The maximum number of results per page to return. If the number of available
70    /// results is larger than `page_size`, the service returns a \[ListAgentsResponse.next_page_token\]
71    /// that can be used to get the next page of results in subsequent list requests.
72    /// Default value: 100.
73    #[prost(int64, tag = "2")]
74    pub page_size: i64,
75    /// Page token. To get the next page of results, set `page_token` to the
76    /// \[ListAgentsResponse.next_page_token\] returned by a previous list request.
77    #[prost(string, tag = "3")]
78    pub page_token: ::prost::alloc::string::String,
79    /// A filter expression that filters agents listed in the response.
80    ///
81    /// The filter expression may contain multiple field expressions joined by `AND`.
82    /// The field expression must specify:
83    /// 1. The field name.
84    /// 2. An operator:
85    ///     - `=`, `!=`, `CONTAINS`, for single values.
86    ///     - `IN` or `NOT IN` for lists of values.
87    /// 3. The value. String values must be encosed in `"`, boolean values are {`true`, `false`}, timestamp values in ISO-8601.
88    ///
89    /// Currently supported fields:
90    /// - `id` \[yandex.cloud.loadtesting.api.v1.agent.Agent.id\]
91    ///    - operators: `=`, `!=`, `IN`, `NOT IN`
92    /// - `name` \[yandex.cloud.loadtesting.api.v1.agent.Agent.name\]
93    ///    - operators: `=`, `!=`, `IN`, `NOT IN`, `CONTAINS`
94    ///
95    /// Examples:
96    /// - `id IN ("1", "2", "3")`
97    /// - `name CONTAINS "compute-agent-large" AND id NOT IN ("4", "5")`
98    #[prost(string, tag = "4")]
99    pub filter: ::prost::alloc::string::String,
100}
101#[allow(clippy::derive_partial_eq_without_eq)]
102#[derive(Clone, PartialEq, ::prost::Message)]
103pub struct ListAgentsResponse {
104    /// List of agents in the specified folder.
105    #[prost(message, repeated, tag = "1")]
106    pub agents: ::prost::alloc::vec::Vec<agent::Agent>,
107    /// Token for getting the next page of the list. If the number of results is greater than
108    /// the specified \[ListAgentsRequest.page_size\], use `next_page_token` as the value
109    /// for the \[ListAgentsRequest.page_token\] parameter in the next list request.
110    ///
111    /// Each subsequent page will have its own `next_page_token` to continue paging through the results.
112    #[prost(string, tag = "2")]
113    pub next_page_token: ::prost::alloc::string::String,
114}
115#[allow(clippy::derive_partial_eq_without_eq)]
116#[derive(Clone, PartialEq, ::prost::Message)]
117pub struct UpdateAgentRequest {
118    /// ID of the agent to update.
119    #[prost(string, tag = "1")]
120    pub agent_id: ::prost::alloc::string::String,
121    /// Field mask that specifies which attributes of the agent are going to be updated.
122    #[prost(message, optional, tag = "2")]
123    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
124    /// New name of the agent.
125    #[prost(string, tag = "3")]
126    pub name: ::prost::alloc::string::String,
127    /// New description of the agent.
128    #[prost(string, tag = "4")]
129    pub description: ::prost::alloc::string::String,
130    /// New parameters of compute instance managed by the agent.
131    #[prost(message, optional, tag = "5")]
132    pub compute_instance_params: ::core::option::Option<agent::CreateComputeInstance>,
133    /// New labels of the agent.
134    #[prost(map = "string, string", tag = "6")]
135    pub labels: ::std::collections::HashMap<
136        ::prost::alloc::string::String,
137        ::prost::alloc::string::String,
138    >,
139}
140#[allow(clippy::derive_partial_eq_without_eq)]
141#[derive(Clone, PartialEq, ::prost::Message)]
142pub struct UpdateAgentMetadata {
143    /// ID of the agent that is being updated.
144    #[prost(string, tag = "1")]
145    pub agent_id: ::prost::alloc::string::String,
146}
147/// Generated client implementations.
148pub mod agent_service_client {
149    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
150    use tonic::codegen::*;
151    use tonic::codegen::http::Uri;
152    /// A set of methods for managing Load Testing agents.
153    #[derive(Debug, Clone)]
154    pub struct AgentServiceClient<T> {
155        inner: tonic::client::Grpc<T>,
156    }
157    impl AgentServiceClient<tonic::transport::Channel> {
158        /// Attempt to create a new client by connecting to a given endpoint.
159        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
160        where
161            D: TryInto<tonic::transport::Endpoint>,
162            D::Error: Into<StdError>,
163        {
164            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
165            Ok(Self::new(conn))
166        }
167    }
168    impl<T> AgentServiceClient<T>
169    where
170        T: tonic::client::GrpcService<tonic::body::BoxBody>,
171        T::Error: Into<StdError>,
172        T::ResponseBody: Body<Data = Bytes> + Send + 'static,
173        <T::ResponseBody as Body>::Error: Into<StdError> + Send,
174    {
175        pub fn new(inner: T) -> Self {
176            let inner = tonic::client::Grpc::new(inner);
177            Self { inner }
178        }
179        pub fn with_origin(inner: T, origin: Uri) -> Self {
180            let inner = tonic::client::Grpc::with_origin(inner, origin);
181            Self { inner }
182        }
183        pub fn with_interceptor<F>(
184            inner: T,
185            interceptor: F,
186        ) -> AgentServiceClient<InterceptedService<T, F>>
187        where
188            F: tonic::service::Interceptor,
189            T::ResponseBody: Default,
190            T: tonic::codegen::Service<
191                http::Request<tonic::body::BoxBody>,
192                Response = http::Response<
193                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
194                >,
195            >,
196            <T as tonic::codegen::Service<
197                http::Request<tonic::body::BoxBody>,
198            >>::Error: Into<StdError> + Send + Sync,
199        {
200            AgentServiceClient::new(InterceptedService::new(inner, interceptor))
201        }
202        /// Compress requests with the given encoding.
203        ///
204        /// This requires the server to support it otherwise it might respond with an
205        /// error.
206        #[must_use]
207        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
208            self.inner = self.inner.send_compressed(encoding);
209            self
210        }
211        /// Enable decompressing responses.
212        #[must_use]
213        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
214            self.inner = self.inner.accept_compressed(encoding);
215            self
216        }
217        /// Limits the maximum size of a decoded message.
218        ///
219        /// Default: `4MB`
220        #[must_use]
221        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
222            self.inner = self.inner.max_decoding_message_size(limit);
223            self
224        }
225        /// Limits the maximum size of an encoded message.
226        ///
227        /// Default: `usize::MAX`
228        #[must_use]
229        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
230            self.inner = self.inner.max_encoding_message_size(limit);
231            self
232        }
233        /// Creates an agent in the specified folder.
234        ///
235        /// Also creates a corresponding compute instance.
236        pub async fn create(
237            &mut self,
238            request: impl tonic::IntoRequest<super::CreateAgentRequest>,
239        ) -> std::result::Result<
240            tonic::Response<super::super::super::super::operation::Operation>,
241            tonic::Status,
242        > {
243            self.inner
244                .ready()
245                .await
246                .map_err(|e| {
247                    tonic::Status::new(
248                        tonic::Code::Unknown,
249                        format!("Service was not ready: {}", e.into()),
250                    )
251                })?;
252            let codec = tonic::codec::ProstCodec::default();
253            let path = http::uri::PathAndQuery::from_static(
254                "/yandex.cloud.loadtesting.api.v1.AgentService/Create",
255            );
256            let mut req = request.into_request();
257            req.extensions_mut()
258                .insert(
259                    GrpcMethod::new(
260                        "yandex.cloud.loadtesting.api.v1.AgentService",
261                        "Create",
262                    ),
263                );
264            self.inner.unary(req, path, codec).await
265        }
266        /// Returns the specified agent.
267        ///
268        /// To get the list of all available agents, make a [List] request.
269        pub async fn get(
270            &mut self,
271            request: impl tonic::IntoRequest<super::GetAgentRequest>,
272        ) -> std::result::Result<tonic::Response<super::agent::Agent>, tonic::Status> {
273            self.inner
274                .ready()
275                .await
276                .map_err(|e| {
277                    tonic::Status::new(
278                        tonic::Code::Unknown,
279                        format!("Service was not ready: {}", e.into()),
280                    )
281                })?;
282            let codec = tonic::codec::ProstCodec::default();
283            let path = http::uri::PathAndQuery::from_static(
284                "/yandex.cloud.loadtesting.api.v1.AgentService/Get",
285            );
286            let mut req = request.into_request();
287            req.extensions_mut()
288                .insert(
289                    GrpcMethod::new(
290                        "yandex.cloud.loadtesting.api.v1.AgentService",
291                        "Get",
292                    ),
293                );
294            self.inner.unary(req, path, codec).await
295        }
296        /// Retrieves the list of agents in the specified folder.
297        pub async fn list(
298            &mut self,
299            request: impl tonic::IntoRequest<super::ListAgentsRequest>,
300        ) -> std::result::Result<
301            tonic::Response<super::ListAgentsResponse>,
302            tonic::Status,
303        > {
304            self.inner
305                .ready()
306                .await
307                .map_err(|e| {
308                    tonic::Status::new(
309                        tonic::Code::Unknown,
310                        format!("Service was not ready: {}", e.into()),
311                    )
312                })?;
313            let codec = tonic::codec::ProstCodec::default();
314            let path = http::uri::PathAndQuery::from_static(
315                "/yandex.cloud.loadtesting.api.v1.AgentService/List",
316            );
317            let mut req = request.into_request();
318            req.extensions_mut()
319                .insert(
320                    GrpcMethod::new(
321                        "yandex.cloud.loadtesting.api.v1.AgentService",
322                        "List",
323                    ),
324                );
325            self.inner.unary(req, path, codec).await
326        }
327        /// Deletes the specified agent.
328        ///
329        /// Also deletes a corresponding compute instance.
330        pub async fn delete(
331            &mut self,
332            request: impl tonic::IntoRequest<super::DeleteAgentRequest>,
333        ) -> std::result::Result<
334            tonic::Response<super::super::super::super::operation::Operation>,
335            tonic::Status,
336        > {
337            self.inner
338                .ready()
339                .await
340                .map_err(|e| {
341                    tonic::Status::new(
342                        tonic::Code::Unknown,
343                        format!("Service was not ready: {}", e.into()),
344                    )
345                })?;
346            let codec = tonic::codec::ProstCodec::default();
347            let path = http::uri::PathAndQuery::from_static(
348                "/yandex.cloud.loadtesting.api.v1.AgentService/Delete",
349            );
350            let mut req = request.into_request();
351            req.extensions_mut()
352                .insert(
353                    GrpcMethod::new(
354                        "yandex.cloud.loadtesting.api.v1.AgentService",
355                        "Delete",
356                    ),
357                );
358            self.inner.unary(req, path, codec).await
359        }
360        /// Updates the specified agent.
361        pub async fn update(
362            &mut self,
363            request: impl tonic::IntoRequest<super::UpdateAgentRequest>,
364        ) -> std::result::Result<
365            tonic::Response<super::super::super::super::operation::Operation>,
366            tonic::Status,
367        > {
368            self.inner
369                .ready()
370                .await
371                .map_err(|e| {
372                    tonic::Status::new(
373                        tonic::Code::Unknown,
374                        format!("Service was not ready: {}", e.into()),
375                    )
376                })?;
377            let codec = tonic::codec::ProstCodec::default();
378            let path = http::uri::PathAndQuery::from_static(
379                "/yandex.cloud.loadtesting.api.v1.AgentService/Update",
380            );
381            let mut req = request.into_request();
382            req.extensions_mut()
383                .insert(
384                    GrpcMethod::new(
385                        "yandex.cloud.loadtesting.api.v1.AgentService",
386                        "Update",
387                    ),
388                );
389            self.inner.unary(req, path, codec).await
390        }
391    }
392}
393#[allow(clippy::derive_partial_eq_without_eq)]
394#[derive(Clone, PartialEq, ::prost::Message)]
395pub struct CreateConfigRequest {
396    /// ID of the folder to create a config in.
397    #[prost(string, tag = "1")]
398    pub folder_id: ::prost::alloc::string::String,
399    /// Name of the config.
400    #[prost(string, tag = "10")]
401    pub name: ::prost::alloc::string::String,
402    /// Config content.
403    #[prost(oneof = "create_config_request::Config", tags = "2")]
404    pub config: ::core::option::Option<create_config_request::Config>,
405}
406/// Nested message and enum types in `CreateConfigRequest`.
407pub mod create_config_request {
408    /// Config content.
409    #[allow(clippy::derive_partial_eq_without_eq)]
410    #[derive(Clone, PartialEq, ::prost::Oneof)]
411    pub enum Config {
412        /// Config content provided as a string in YAML format.
413        #[prost(string, tag = "2")]
414        YamlString(::prost::alloc::string::String),
415    }
416}
417#[allow(clippy::derive_partial_eq_without_eq)]
418#[derive(Clone, PartialEq, ::prost::Message)]
419pub struct CreateConfigMetadata {
420    /// ID of the config that is being created.
421    #[prost(string, tag = "1")]
422    pub config_id: ::prost::alloc::string::String,
423}
424#[allow(clippy::derive_partial_eq_without_eq)]
425#[derive(Clone, PartialEq, ::prost::Message)]
426pub struct GetConfigRequest {
427    /// ID of the config to return.
428    #[prost(string, tag = "1")]
429    pub config_id: ::prost::alloc::string::String,
430}
431#[allow(clippy::derive_partial_eq_without_eq)]
432#[derive(Clone, PartialEq, ::prost::Message)]
433pub struct ListConfigsRequest {
434    /// ID of the folder to list configs in.
435    #[prost(string, tag = "1")]
436    pub folder_id: ::prost::alloc::string::String,
437    /// The maximum number of results per page to return. If the number of available
438    /// results is larger than `page_size`, the service returns a \[ListConfigsResponse.next_page_token\]
439    /// that can be used to get the next page of results in subsequent list requests.
440    /// Default value: 100.
441    #[prost(int64, tag = "2")]
442    pub page_size: i64,
443    /// Page token. To get the next page of results, set `page_token` to the
444    /// \[ListConfigsResponse.next_page_token\] returned by a previous list request.
445    #[prost(string, tag = "3")]
446    pub page_token: ::prost::alloc::string::String,
447    /// A filter expression that filters tests listed in the response.
448    #[prost(string, tag = "4")]
449    pub filter: ::prost::alloc::string::String,
450}
451#[allow(clippy::derive_partial_eq_without_eq)]
452#[derive(Clone, PartialEq, ::prost::Message)]
453pub struct ListConfigsResponse {
454    /// List of configs in the specified folder.
455    #[prost(message, repeated, tag = "1")]
456    pub configs: ::prost::alloc::vec::Vec<config::Config>,
457    /// Token for getting the next page of the list. If the number of results is greater than
458    /// the specified \[ListConfigsRequest.page_size\], use `next_page_token` as the value
459    /// for the \[ListConfigsRequest.page_token\] parameter in the next list request.
460    ///
461    /// Each subsequent page will have its own `next_page_token` to continue paging through the results.
462    #[prost(string, tag = "2")]
463    pub next_page_token: ::prost::alloc::string::String,
464}
465#[allow(clippy::derive_partial_eq_without_eq)]
466#[derive(Clone, PartialEq, ::prost::Message)]
467pub struct DeleteConfigRequest {
468    /// ID of the config to deleted.
469    #[prost(string, tag = "1")]
470    pub config_id: ::prost::alloc::string::String,
471}
472#[allow(clippy::derive_partial_eq_without_eq)]
473#[derive(Clone, PartialEq, ::prost::Message)]
474pub struct DeleteConfigMetadata {
475    /// ID of the config that is being deleted.
476    #[prost(string, tag = "1")]
477    pub config_id: ::prost::alloc::string::String,
478}
479/// Generated client implementations.
480pub mod config_service_client {
481    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
482    use tonic::codegen::*;
483    use tonic::codegen::http::Uri;
484    /// A set of methods for managing test configurations.
485    #[derive(Debug, Clone)]
486    pub struct ConfigServiceClient<T> {
487        inner: tonic::client::Grpc<T>,
488    }
489    impl ConfigServiceClient<tonic::transport::Channel> {
490        /// Attempt to create a new client by connecting to a given endpoint.
491        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
492        where
493            D: TryInto<tonic::transport::Endpoint>,
494            D::Error: Into<StdError>,
495        {
496            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
497            Ok(Self::new(conn))
498        }
499    }
500    impl<T> ConfigServiceClient<T>
501    where
502        T: tonic::client::GrpcService<tonic::body::BoxBody>,
503        T::Error: Into<StdError>,
504        T::ResponseBody: Body<Data = Bytes> + Send + 'static,
505        <T::ResponseBody as Body>::Error: Into<StdError> + Send,
506    {
507        pub fn new(inner: T) -> Self {
508            let inner = tonic::client::Grpc::new(inner);
509            Self { inner }
510        }
511        pub fn with_origin(inner: T, origin: Uri) -> Self {
512            let inner = tonic::client::Grpc::with_origin(inner, origin);
513            Self { inner }
514        }
515        pub fn with_interceptor<F>(
516            inner: T,
517            interceptor: F,
518        ) -> ConfigServiceClient<InterceptedService<T, F>>
519        where
520            F: tonic::service::Interceptor,
521            T::ResponseBody: Default,
522            T: tonic::codegen::Service<
523                http::Request<tonic::body::BoxBody>,
524                Response = http::Response<
525                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
526                >,
527            >,
528            <T as tonic::codegen::Service<
529                http::Request<tonic::body::BoxBody>,
530            >>::Error: Into<StdError> + Send + Sync,
531        {
532            ConfigServiceClient::new(InterceptedService::new(inner, interceptor))
533        }
534        /// Compress requests with the given encoding.
535        ///
536        /// This requires the server to support it otherwise it might respond with an
537        /// error.
538        #[must_use]
539        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
540            self.inner = self.inner.send_compressed(encoding);
541            self
542        }
543        /// Enable decompressing responses.
544        #[must_use]
545        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
546            self.inner = self.inner.accept_compressed(encoding);
547            self
548        }
549        /// Limits the maximum size of a decoded message.
550        ///
551        /// Default: `4MB`
552        #[must_use]
553        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
554            self.inner = self.inner.max_decoding_message_size(limit);
555            self
556        }
557        /// Limits the maximum size of an encoded message.
558        ///
559        /// Default: `usize::MAX`
560        #[must_use]
561        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
562            self.inner = self.inner.max_encoding_message_size(limit);
563            self
564        }
565        /// Creates a test config in the specified folder.
566        pub async fn create(
567            &mut self,
568            request: impl tonic::IntoRequest<super::CreateConfigRequest>,
569        ) -> std::result::Result<
570            tonic::Response<super::super::super::super::operation::Operation>,
571            tonic::Status,
572        > {
573            self.inner
574                .ready()
575                .await
576                .map_err(|e| {
577                    tonic::Status::new(
578                        tonic::Code::Unknown,
579                        format!("Service was not ready: {}", e.into()),
580                    )
581                })?;
582            let codec = tonic::codec::ProstCodec::default();
583            let path = http::uri::PathAndQuery::from_static(
584                "/yandex.cloud.loadtesting.api.v1.ConfigService/Create",
585            );
586            let mut req = request.into_request();
587            req.extensions_mut()
588                .insert(
589                    GrpcMethod::new(
590                        "yandex.cloud.loadtesting.api.v1.ConfigService",
591                        "Create",
592                    ),
593                );
594            self.inner.unary(req, path, codec).await
595        }
596        /// Returns the specified config.
597        ///
598        /// To get the list of all available configs, make a [List] request.
599        pub async fn get(
600            &mut self,
601            request: impl tonic::IntoRequest<super::GetConfigRequest>,
602        ) -> std::result::Result<tonic::Response<super::config::Config>, tonic::Status> {
603            self.inner
604                .ready()
605                .await
606                .map_err(|e| {
607                    tonic::Status::new(
608                        tonic::Code::Unknown,
609                        format!("Service was not ready: {}", e.into()),
610                    )
611                })?;
612            let codec = tonic::codec::ProstCodec::default();
613            let path = http::uri::PathAndQuery::from_static(
614                "/yandex.cloud.loadtesting.api.v1.ConfigService/Get",
615            );
616            let mut req = request.into_request();
617            req.extensions_mut()
618                .insert(
619                    GrpcMethod::new(
620                        "yandex.cloud.loadtesting.api.v1.ConfigService",
621                        "Get",
622                    ),
623                );
624            self.inner.unary(req, path, codec).await
625        }
626        /// Retrieves the list of configs in the specified folder.
627        pub async fn list(
628            &mut self,
629            request: impl tonic::IntoRequest<super::ListConfigsRequest>,
630        ) -> std::result::Result<
631            tonic::Response<super::ListConfigsResponse>,
632            tonic::Status,
633        > {
634            self.inner
635                .ready()
636                .await
637                .map_err(|e| {
638                    tonic::Status::new(
639                        tonic::Code::Unknown,
640                        format!("Service was not ready: {}", e.into()),
641                    )
642                })?;
643            let codec = tonic::codec::ProstCodec::default();
644            let path = http::uri::PathAndQuery::from_static(
645                "/yandex.cloud.loadtesting.api.v1.ConfigService/List",
646            );
647            let mut req = request.into_request();
648            req.extensions_mut()
649                .insert(
650                    GrpcMethod::new(
651                        "yandex.cloud.loadtesting.api.v1.ConfigService",
652                        "List",
653                    ),
654                );
655            self.inner.unary(req, path, codec).await
656        }
657        /// Deletes the specified config.
658        pub async fn delete(
659            &mut self,
660            request: impl tonic::IntoRequest<super::DeleteConfigRequest>,
661        ) -> std::result::Result<
662            tonic::Response<super::super::super::super::operation::Operation>,
663            tonic::Status,
664        > {
665            self.inner
666                .ready()
667                .await
668                .map_err(|e| {
669                    tonic::Status::new(
670                        tonic::Code::Unknown,
671                        format!("Service was not ready: {}", e.into()),
672                    )
673                })?;
674            let codec = tonic::codec::ProstCodec::default();
675            let path = http::uri::PathAndQuery::from_static(
676                "/yandex.cloud.loadtesting.api.v1.ConfigService/Delete",
677            );
678            let mut req = request.into_request();
679            req.extensions_mut()
680                .insert(
681                    GrpcMethod::new(
682                        "yandex.cloud.loadtesting.api.v1.ConfigService",
683                        "Delete",
684                    ),
685                );
686            self.inner.unary(req, path, codec).await
687        }
688    }
689}
690#[allow(clippy::derive_partial_eq_without_eq)]
691#[derive(Clone, PartialEq, ::prost::Message)]
692pub struct CreateRegressionDashboardRequest {
693    /// ID of the folder to create a regression dashboard in.
694    #[prost(string, tag = "1")]
695    pub folder_id: ::prost::alloc::string::String,
696    /// Name of the dashboard.
697    #[prost(string, tag = "2")]
698    pub name: ::prost::alloc::string::String,
699    /// Description of the dashboard.
700    #[prost(string, tag = "3")]
701    pub description: ::prost::alloc::string::String,
702    /// Content of the dashboard.
703    #[prost(message, optional, tag = "4")]
704    pub content: ::core::option::Option<regression::dashboard::Content>,
705}
706#[allow(clippy::derive_partial_eq_without_eq)]
707#[derive(Clone, PartialEq, ::prost::Message)]
708pub struct CreateRegressionDashboardMetadata {
709    /// ID of the dashboard that is being created.
710    #[prost(string, tag = "1")]
711    pub dashboard_id: ::prost::alloc::string::String,
712}
713#[allow(clippy::derive_partial_eq_without_eq)]
714#[derive(Clone, PartialEq, ::prost::Message)]
715pub struct GetRegressionDashboardRequest {
716    /// ID of the dashboard to return.
717    #[prost(string, tag = "1")]
718    pub dashboard_id: ::prost::alloc::string::String,
719}
720#[allow(clippy::derive_partial_eq_without_eq)]
721#[derive(Clone, PartialEq, ::prost::Message)]
722pub struct DeleteRegressionDashboardRequest {
723    /// ID of the dashboard to delete.
724    #[prost(string, tag = "1")]
725    pub dashboard_id: ::prost::alloc::string::String,
726    /// The current etag of the dashboard.
727    #[prost(string, tag = "2")]
728    pub etag: ::prost::alloc::string::String,
729}
730#[allow(clippy::derive_partial_eq_without_eq)]
731#[derive(Clone, PartialEq, ::prost::Message)]
732pub struct DeleteRegressionDashboardMetadata {
733    /// ID of the dashboard that is being deleted.
734    #[prost(string, tag = "1")]
735    pub dashboard_id: ::prost::alloc::string::String,
736}
737#[allow(clippy::derive_partial_eq_without_eq)]
738#[derive(Clone, PartialEq, ::prost::Message)]
739pub struct ListRegressionDashboardsRequest {
740    /// ID of the folder to list dashboards in.
741    #[prost(string, tag = "1")]
742    pub folder_id: ::prost::alloc::string::String,
743    /// The maximum number of results per page to return. If the number of available
744    /// results is larger than `page_size`, the service returns a \[ListRegressionDashboardsResponse.next_page_token\]
745    /// that can be used to get the next page of results in subsequent list requests.
746    /// Default value: 100.
747    #[prost(int64, tag = "3")]
748    pub page_size: i64,
749    /// Page token. To get the next page of results, set `page_token` to the
750    /// \[ListRegressionDashboardsResponse.next_page_token\] returned by a previous list request.
751    #[prost(string, tag = "4")]
752    pub page_token: ::prost::alloc::string::String,
753    /// A filter expression that filters dashboards listed in the response.
754    ///
755    /// The filter expression may contain multiple field expressions joined by `AND`.
756    /// The field expression must specify:
757    /// 1. The field name.
758    /// 2. An operator:
759    ///     - `=`, `!=`, `CONTAINS`, for single values.
760    ///     - `IN` or `NOT IN` for lists of values.
761    /// 3. The value. String values must be encosed in `"`, boolean values are {`true`, `false`}, timestamp values in ISO-8601.
762    ///
763    /// Currently supported fields:
764    /// - `id` \[yandex.cloud.loadtesting.api.v1.regression.Dashboard.id\]
765    ///    - operators: `=`, `!=`, `IN`, `NOT IN`
766    /// - `name` \[yandex.cloud.loadtesting.api.v1.regression.Dashboard.name\]
767    ///    - operators: `=`, `!=`, `IN`, `NOT IN`, `CONTAINS`
768    ///
769    /// Examples:
770    /// - `id IN ("1", "2", "3")`
771    /// - `name CONTAINS "my-dashboard" AND id NOT IN ("4", "5")`
772    #[prost(string, tag = "5")]
773    pub filter: ::prost::alloc::string::String,
774}
775#[allow(clippy::derive_partial_eq_without_eq)]
776#[derive(Clone, PartialEq, ::prost::Message)]
777pub struct ListRegressionDashboardsResponse {
778    /// List of dashboards in the specified folder.
779    #[prost(message, repeated, tag = "1")]
780    pub dashboards: ::prost::alloc::vec::Vec<regression::Dashboard>,
781    /// Token for getting the next page of the list. If the number of results is greater than
782    /// the specified \[ListRegressionDashboardsRequest.page_size\], use `next_page_token` as the value
783    /// for the \[ListRegressionDashboardsRequest.page_token\] parameter in the next list request.
784    ///
785    /// Each subsequent page will have its own `next_page_token` to continue paging through the results.
786    #[prost(string, tag = "2")]
787    pub next_page_token: ::prost::alloc::string::String,
788}
789#[allow(clippy::derive_partial_eq_without_eq)]
790#[derive(Clone, PartialEq, ::prost::Message)]
791pub struct UpdateRegressionDashboardRequest {
792    /// ID of the dashboards to update.
793    #[prost(string, tag = "1")]
794    pub dashboard_id: ::prost::alloc::string::String,
795    /// The current etag of the dashboard.
796    #[prost(string, tag = "2")]
797    pub etag: ::prost::alloc::string::String,
798    /// Field mask that specifies which attributes of the dashboard are going to be updated.
799    #[prost(message, optional, tag = "3")]
800    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
801    /// New name of the dashboard.
802    #[prost(string, tag = "4")]
803    pub name: ::prost::alloc::string::String,
804    /// New description of the dashboard.
805    #[prost(string, tag = "5")]
806    pub description: ::prost::alloc::string::String,
807    /// New content of the dashboard.
808    #[prost(message, optional, tag = "6")]
809    pub content: ::core::option::Option<regression::dashboard::Content>,
810}
811#[allow(clippy::derive_partial_eq_without_eq)]
812#[derive(Clone, PartialEq, ::prost::Message)]
813pub struct UpdateRegressionDashboardMetadata {
814    /// ID of the dashboard that is being updated.
815    #[prost(string, tag = "1")]
816    pub dashboard_id: ::prost::alloc::string::String,
817}
818/// Generated client implementations.
819pub mod regression_dashboard_service_client {
820    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
821    use tonic::codegen::*;
822    use tonic::codegen::http::Uri;
823    /// A set of methods for managing Load Testing Regression Dashboards.
824    #[derive(Debug, Clone)]
825    pub struct RegressionDashboardServiceClient<T> {
826        inner: tonic::client::Grpc<T>,
827    }
828    impl RegressionDashboardServiceClient<tonic::transport::Channel> {
829        /// Attempt to create a new client by connecting to a given endpoint.
830        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
831        where
832            D: TryInto<tonic::transport::Endpoint>,
833            D::Error: Into<StdError>,
834        {
835            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
836            Ok(Self::new(conn))
837        }
838    }
839    impl<T> RegressionDashboardServiceClient<T>
840    where
841        T: tonic::client::GrpcService<tonic::body::BoxBody>,
842        T::Error: Into<StdError>,
843        T::ResponseBody: Body<Data = Bytes> + Send + 'static,
844        <T::ResponseBody as Body>::Error: Into<StdError> + Send,
845    {
846        pub fn new(inner: T) -> Self {
847            let inner = tonic::client::Grpc::new(inner);
848            Self { inner }
849        }
850        pub fn with_origin(inner: T, origin: Uri) -> Self {
851            let inner = tonic::client::Grpc::with_origin(inner, origin);
852            Self { inner }
853        }
854        pub fn with_interceptor<F>(
855            inner: T,
856            interceptor: F,
857        ) -> RegressionDashboardServiceClient<InterceptedService<T, F>>
858        where
859            F: tonic::service::Interceptor,
860            T::ResponseBody: Default,
861            T: tonic::codegen::Service<
862                http::Request<tonic::body::BoxBody>,
863                Response = http::Response<
864                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
865                >,
866            >,
867            <T as tonic::codegen::Service<
868                http::Request<tonic::body::BoxBody>,
869            >>::Error: Into<StdError> + Send + Sync,
870        {
871            RegressionDashboardServiceClient::new(
872                InterceptedService::new(inner, interceptor),
873            )
874        }
875        /// Compress requests with the given encoding.
876        ///
877        /// This requires the server to support it otherwise it might respond with an
878        /// error.
879        #[must_use]
880        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
881            self.inner = self.inner.send_compressed(encoding);
882            self
883        }
884        /// Enable decompressing responses.
885        #[must_use]
886        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
887            self.inner = self.inner.accept_compressed(encoding);
888            self
889        }
890        /// Limits the maximum size of a decoded message.
891        ///
892        /// Default: `4MB`
893        #[must_use]
894        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
895            self.inner = self.inner.max_decoding_message_size(limit);
896            self
897        }
898        /// Limits the maximum size of an encoded message.
899        ///
900        /// Default: `usize::MAX`
901        #[must_use]
902        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
903            self.inner = self.inner.max_encoding_message_size(limit);
904            self
905        }
906        /// Creates a regression dashboard in the specified folder.
907        pub async fn create(
908            &mut self,
909            request: impl tonic::IntoRequest<super::CreateRegressionDashboardRequest>,
910        ) -> std::result::Result<
911            tonic::Response<super::super::super::super::operation::Operation>,
912            tonic::Status,
913        > {
914            self.inner
915                .ready()
916                .await
917                .map_err(|e| {
918                    tonic::Status::new(
919                        tonic::Code::Unknown,
920                        format!("Service was not ready: {}", e.into()),
921                    )
922                })?;
923            let codec = tonic::codec::ProstCodec::default();
924            let path = http::uri::PathAndQuery::from_static(
925                "/yandex.cloud.loadtesting.api.v1.RegressionDashboardService/Create",
926            );
927            let mut req = request.into_request();
928            req.extensions_mut()
929                .insert(
930                    GrpcMethod::new(
931                        "yandex.cloud.loadtesting.api.v1.RegressionDashboardService",
932                        "Create",
933                    ),
934                );
935            self.inner.unary(req, path, codec).await
936        }
937        /// Returns the specified regression dashboard.
938        ///
939        /// To get the list of all available regression dashboards, make a [List] request.
940        pub async fn get(
941            &mut self,
942            request: impl tonic::IntoRequest<super::GetRegressionDashboardRequest>,
943        ) -> std::result::Result<
944            tonic::Response<super::regression::Dashboard>,
945            tonic::Status,
946        > {
947            self.inner
948                .ready()
949                .await
950                .map_err(|e| {
951                    tonic::Status::new(
952                        tonic::Code::Unknown,
953                        format!("Service was not ready: {}", e.into()),
954                    )
955                })?;
956            let codec = tonic::codec::ProstCodec::default();
957            let path = http::uri::PathAndQuery::from_static(
958                "/yandex.cloud.loadtesting.api.v1.RegressionDashboardService/Get",
959            );
960            let mut req = request.into_request();
961            req.extensions_mut()
962                .insert(
963                    GrpcMethod::new(
964                        "yandex.cloud.loadtesting.api.v1.RegressionDashboardService",
965                        "Get",
966                    ),
967                );
968            self.inner.unary(req, path, codec).await
969        }
970        /// Retrieves the list of regression dashboards in the specified folder.
971        pub async fn list(
972            &mut self,
973            request: impl tonic::IntoRequest<super::ListRegressionDashboardsRequest>,
974        ) -> std::result::Result<
975            tonic::Response<super::ListRegressionDashboardsResponse>,
976            tonic::Status,
977        > {
978            self.inner
979                .ready()
980                .await
981                .map_err(|e| {
982                    tonic::Status::new(
983                        tonic::Code::Unknown,
984                        format!("Service was not ready: {}", e.into()),
985                    )
986                })?;
987            let codec = tonic::codec::ProstCodec::default();
988            let path = http::uri::PathAndQuery::from_static(
989                "/yandex.cloud.loadtesting.api.v1.RegressionDashboardService/List",
990            );
991            let mut req = request.into_request();
992            req.extensions_mut()
993                .insert(
994                    GrpcMethod::new(
995                        "yandex.cloud.loadtesting.api.v1.RegressionDashboardService",
996                        "List",
997                    ),
998                );
999            self.inner.unary(req, path, codec).await
1000        }
1001        /// Deletes the specified regression dashboard.
1002        pub async fn delete(
1003            &mut self,
1004            request: impl tonic::IntoRequest<super::DeleteRegressionDashboardRequest>,
1005        ) -> std::result::Result<
1006            tonic::Response<super::super::super::super::operation::Operation>,
1007            tonic::Status,
1008        > {
1009            self.inner
1010                .ready()
1011                .await
1012                .map_err(|e| {
1013                    tonic::Status::new(
1014                        tonic::Code::Unknown,
1015                        format!("Service was not ready: {}", e.into()),
1016                    )
1017                })?;
1018            let codec = tonic::codec::ProstCodec::default();
1019            let path = http::uri::PathAndQuery::from_static(
1020                "/yandex.cloud.loadtesting.api.v1.RegressionDashboardService/Delete",
1021            );
1022            let mut req = request.into_request();
1023            req.extensions_mut()
1024                .insert(
1025                    GrpcMethod::new(
1026                        "yandex.cloud.loadtesting.api.v1.RegressionDashboardService",
1027                        "Delete",
1028                    ),
1029                );
1030            self.inner.unary(req, path, codec).await
1031        }
1032        /// Updates the specified regression dashboard.
1033        pub async fn update(
1034            &mut self,
1035            request: impl tonic::IntoRequest<super::UpdateRegressionDashboardRequest>,
1036        ) -> std::result::Result<
1037            tonic::Response<super::super::super::super::operation::Operation>,
1038            tonic::Status,
1039        > {
1040            self.inner
1041                .ready()
1042                .await
1043                .map_err(|e| {
1044                    tonic::Status::new(
1045                        tonic::Code::Unknown,
1046                        format!("Service was not ready: {}", e.into()),
1047                    )
1048                })?;
1049            let codec = tonic::codec::ProstCodec::default();
1050            let path = http::uri::PathAndQuery::from_static(
1051                "/yandex.cloud.loadtesting.api.v1.RegressionDashboardService/Update",
1052            );
1053            let mut req = request.into_request();
1054            req.extensions_mut()
1055                .insert(
1056                    GrpcMethod::new(
1057                        "yandex.cloud.loadtesting.api.v1.RegressionDashboardService",
1058                        "Update",
1059                    ),
1060                );
1061            self.inner.unary(req, path, codec).await
1062        }
1063    }
1064}
1065#[allow(clippy::derive_partial_eq_without_eq)]
1066#[derive(Clone, PartialEq, ::prost::Message)]
1067pub struct GetTableReportRequest {
1068    /// ID of the test for which report table will be returned.
1069    #[prost(string, tag = "1")]
1070    pub test_id: ::prost::alloc::string::String,
1071}
1072#[allow(clippy::derive_partial_eq_without_eq)]
1073#[derive(Clone, PartialEq, ::prost::Message)]
1074pub struct GetTableReportResponse {
1075    /// Status of report table.
1076    #[prost(enumeration = "report::Status", tag = "1")]
1077    pub status: i32,
1078    /// Result for all test cases combined ("overall" test case).
1079    #[prost(message, optional, tag = "2")]
1080    pub overall: ::core::option::Option<report::table::Report>,
1081    /// Results for individual test cases, mapped as `case_name:report`.
1082    #[prost(map = "string, message", tag = "3")]
1083    pub cases: ::std::collections::HashMap<
1084        ::prost::alloc::string::String,
1085        report::table::Report,
1086    >,
1087}
1088#[allow(clippy::derive_partial_eq_without_eq)]
1089#[derive(Clone, PartialEq, ::prost::Message)]
1090pub struct CalculateReportKpiValuesRequest {
1091    /// ID of the folder containing tests.
1092    #[prost(string, tag = "1")]
1093    pub folder_id: ::prost::alloc::string::String,
1094    /// Test filter selector to calculate KPI values for.
1095    #[prost(string, tag = "2")]
1096    pub test_filter: ::prost::alloc::string::String,
1097    /// Test case to calculate KPI values for.
1098    ///
1099    /// If not specified, KPI values will be calculated for 'overall' case.
1100    #[prost(string, tag = "3")]
1101    pub test_case: ::prost::alloc::string::String,
1102    /// KPI to be calculated.
1103    #[prost(message, optional, tag = "4")]
1104    pub kpi: ::core::option::Option<report::Kpi>,
1105}
1106#[allow(clippy::derive_partial_eq_without_eq)]
1107#[derive(Clone, PartialEq, ::prost::Message)]
1108pub struct CalculateReportKpiValuesResponse {
1109    /// ID of the folder.
1110    #[prost(string, tag = "1")]
1111    pub folder_id: ::prost::alloc::string::String,
1112    /// Actual KPI values.
1113    #[prost(message, repeated, tag = "2")]
1114    pub values: ::prost::alloc::vec::Vec<report::KpiValue>,
1115}
1116/// Generated client implementations.
1117pub mod report_service_client {
1118    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
1119    use tonic::codegen::*;
1120    use tonic::codegen::http::Uri;
1121    /// A set of methods for managing test reports.
1122    #[derive(Debug, Clone)]
1123    pub struct ReportServiceClient<T> {
1124        inner: tonic::client::Grpc<T>,
1125    }
1126    impl ReportServiceClient<tonic::transport::Channel> {
1127        /// Attempt to create a new client by connecting to a given endpoint.
1128        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1129        where
1130            D: TryInto<tonic::transport::Endpoint>,
1131            D::Error: Into<StdError>,
1132        {
1133            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1134            Ok(Self::new(conn))
1135        }
1136    }
1137    impl<T> ReportServiceClient<T>
1138    where
1139        T: tonic::client::GrpcService<tonic::body::BoxBody>,
1140        T::Error: Into<StdError>,
1141        T::ResponseBody: Body<Data = Bytes> + Send + 'static,
1142        <T::ResponseBody as Body>::Error: Into<StdError> + Send,
1143    {
1144        pub fn new(inner: T) -> Self {
1145            let inner = tonic::client::Grpc::new(inner);
1146            Self { inner }
1147        }
1148        pub fn with_origin(inner: T, origin: Uri) -> Self {
1149            let inner = tonic::client::Grpc::with_origin(inner, origin);
1150            Self { inner }
1151        }
1152        pub fn with_interceptor<F>(
1153            inner: T,
1154            interceptor: F,
1155        ) -> ReportServiceClient<InterceptedService<T, F>>
1156        where
1157            F: tonic::service::Interceptor,
1158            T::ResponseBody: Default,
1159            T: tonic::codegen::Service<
1160                http::Request<tonic::body::BoxBody>,
1161                Response = http::Response<
1162                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
1163                >,
1164            >,
1165            <T as tonic::codegen::Service<
1166                http::Request<tonic::body::BoxBody>,
1167            >>::Error: Into<StdError> + Send + Sync,
1168        {
1169            ReportServiceClient::new(InterceptedService::new(inner, interceptor))
1170        }
1171        /// Compress requests with the given encoding.
1172        ///
1173        /// This requires the server to support it otherwise it might respond with an
1174        /// error.
1175        #[must_use]
1176        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1177            self.inner = self.inner.send_compressed(encoding);
1178            self
1179        }
1180        /// Enable decompressing responses.
1181        #[must_use]
1182        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1183            self.inner = self.inner.accept_compressed(encoding);
1184            self
1185        }
1186        /// Limits the maximum size of a decoded message.
1187        ///
1188        /// Default: `4MB`
1189        #[must_use]
1190        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1191            self.inner = self.inner.max_decoding_message_size(limit);
1192            self
1193        }
1194        /// Limits the maximum size of an encoded message.
1195        ///
1196        /// Default: `usize::MAX`
1197        #[must_use]
1198        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1199            self.inner = self.inner.max_encoding_message_size(limit);
1200            self
1201        }
1202        /// Returns a report table for the specified test.
1203        pub async fn get_table(
1204            &mut self,
1205            request: impl tonic::IntoRequest<super::GetTableReportRequest>,
1206        ) -> std::result::Result<
1207            tonic::Response<super::GetTableReportResponse>,
1208            tonic::Status,
1209        > {
1210            self.inner
1211                .ready()
1212                .await
1213                .map_err(|e| {
1214                    tonic::Status::new(
1215                        tonic::Code::Unknown,
1216                        format!("Service was not ready: {}", e.into()),
1217                    )
1218                })?;
1219            let codec = tonic::codec::ProstCodec::default();
1220            let path = http::uri::PathAndQuery::from_static(
1221                "/yandex.cloud.loadtesting.api.v1.ReportService/GetTable",
1222            );
1223            let mut req = request.into_request();
1224            req.extensions_mut()
1225                .insert(
1226                    GrpcMethod::new(
1227                        "yandex.cloud.loadtesting.api.v1.ReportService",
1228                        "GetTable",
1229                    ),
1230                );
1231            self.inner.unary(req, path, codec).await
1232        }
1233        /// Returns a list of KPI values for tests matching the specified filter.
1234        pub async fn calculate_kpi_values(
1235            &mut self,
1236            request: impl tonic::IntoRequest<super::CalculateReportKpiValuesRequest>,
1237        ) -> std::result::Result<
1238            tonic::Response<super::CalculateReportKpiValuesResponse>,
1239            tonic::Status,
1240        > {
1241            self.inner
1242                .ready()
1243                .await
1244                .map_err(|e| {
1245                    tonic::Status::new(
1246                        tonic::Code::Unknown,
1247                        format!("Service was not ready: {}", e.into()),
1248                    )
1249                })?;
1250            let codec = tonic::codec::ProstCodec::default();
1251            let path = http::uri::PathAndQuery::from_static(
1252                "/yandex.cloud.loadtesting.api.v1.ReportService/CalculateKpiValues",
1253            );
1254            let mut req = request.into_request();
1255            req.extensions_mut()
1256                .insert(
1257                    GrpcMethod::new(
1258                        "yandex.cloud.loadtesting.api.v1.ReportService",
1259                        "CalculateKpiValues",
1260                    ),
1261                );
1262            self.inner.unary(req, path, codec).await
1263        }
1264    }
1265}
1266#[allow(clippy::derive_partial_eq_without_eq)]
1267#[derive(Clone, PartialEq, ::prost::Message)]
1268pub struct CreateTestRequest {
1269    /// ID of the folder to create a test in.
1270    #[prost(string, tag = "1")]
1271    pub folder_id: ::prost::alloc::string::String,
1272    /// Test configuration associated with agents on which they will be executed.
1273    /// In case of multiple configurations, a multitest will be created.
1274    #[prost(message, repeated, tag = "2")]
1275    pub configurations: ::prost::alloc::vec::Vec<test::SingleAgentConfiguration>,
1276    /// Test details. Name, tags etc.
1277    #[prost(message, optional, tag = "3")]
1278    pub test_details: ::core::option::Option<test::Details>,
1279}
1280#[allow(clippy::derive_partial_eq_without_eq)]
1281#[derive(Clone, PartialEq, ::prost::Message)]
1282pub struct CreateTestMetadata {
1283    /// ID of the test that is being created.
1284    #[prost(string, tag = "1")]
1285    pub test_id: ::prost::alloc::string::String,
1286}
1287#[allow(clippy::derive_partial_eq_without_eq)]
1288#[derive(Clone, PartialEq, ::prost::Message)]
1289pub struct GetTestRequest {
1290    /// ID of the test to return.
1291    #[prost(string, tag = "1")]
1292    pub test_id: ::prost::alloc::string::String,
1293}
1294#[allow(clippy::derive_partial_eq_without_eq)]
1295#[derive(Clone, PartialEq, ::prost::Message)]
1296pub struct StopTestRequest {
1297    /// ID of the test to stop.
1298    #[prost(string, tag = "1")]
1299    pub test_id: ::prost::alloc::string::String,
1300}
1301#[allow(clippy::derive_partial_eq_without_eq)]
1302#[derive(Clone, PartialEq, ::prost::Message)]
1303pub struct StopTestMetadata {
1304    /// ID of the test that is being stopped.
1305    #[prost(string, tag = "1")]
1306    pub test_id: ::prost::alloc::string::String,
1307}
1308#[allow(clippy::derive_partial_eq_without_eq)]
1309#[derive(Clone, PartialEq, ::prost::Message)]
1310pub struct DeleteTestRequest {
1311    /// ID of the test to delete.
1312    #[prost(string, tag = "1")]
1313    pub test_id: ::prost::alloc::string::String,
1314}
1315#[allow(clippy::derive_partial_eq_without_eq)]
1316#[derive(Clone, PartialEq, ::prost::Message)]
1317pub struct DeleteTestMetadata {
1318    /// ID of the test that is being deleted.
1319    #[prost(string, tag = "1")]
1320    pub test_id: ::prost::alloc::string::String,
1321}
1322#[allow(clippy::derive_partial_eq_without_eq)]
1323#[derive(Clone, PartialEq, ::prost::Message)]
1324pub struct ListTestsRequest {
1325    /// ID of the folder to list tests in.
1326    #[prost(string, tag = "1")]
1327    pub folder_id: ::prost::alloc::string::String,
1328    /// The maximum number of results per page to return. If the number of available
1329    /// results is larger than `page_size`, the service returns a \[ListTestsResponse.next_page_token\]
1330    /// that can be used to get the next page of results in subsequent list requests.
1331    /// Default value: 100.
1332    #[prost(int64, tag = "2")]
1333    pub page_size: i64,
1334    /// Page token. To get the next page of results, set `page_token` to the
1335    /// \[ListTestsResponse.next_page_token\] returned by a previous list request.
1336    #[prost(string, tag = "3")]
1337    pub page_token: ::prost::alloc::string::String,
1338    /// A filter expression that filters tests listed in the response.
1339    ///
1340    /// The filter expression may contain multiple field expressions joined by `AND`.
1341    /// The field expression must specify:
1342    /// 1. The field name.
1343    /// 2. An operator:
1344    ///     - `=`, `!=`, `<`, `<=`, `>`, `>=`, `CONTAINS`, `:` for single values.
1345    ///     - `IN` or `NOT IN` for lists of values.
1346    /// 3. The value. String values must be encosed in `"`, boolean values are {`true`, `false`}, timestamp values in ISO-8601.
1347    ///
1348    /// Currently supported fields:
1349    /// - `id` \[yandex.cloud.loadtesting.api.v1.test.Test.id\]
1350    ///    - operators: `=`, `!=`, `IN`, `NOT IN`
1351    /// - `details.name` \[yandex.cloud.loadtesting.api.v1.test.Details.name\]
1352    ///    - operators: `=`, `!=`, `IN`, `NOT IN`, `CONTAINS`
1353    /// - `details.tags.<TAG_NAME>` \[yandex.cloud.loadtesting.api.v1.test.Details.tags\]
1354    ///    - operators: `:`
1355    /// - `summary.status` \[yandex.cloud.loadtesting.api.v1.test.Summary.status\]
1356    ///    - operators: `=`, `!=`, `IN`, `NOT IN`
1357    /// - `summary.is_finished` \[yandex.cloud.loadtesting.api.v1.test.Summary.is_finished\]
1358    ///    - operators: `=`
1359    /// - `summary.created_at` \[yandex.cloud.loadtesting.api.v1.test.Summary.created_at\]
1360    ///    - operators: `<`, `<=`, `>`, `>=`
1361    /// - `summary.created_by` \[yandex.cloud.loadtesting.api.v1.test.Summary.created_by\]
1362    ///    - operators: `=`, `!=`, `IN`, `NOT IN`
1363    ///
1364    /// Examples:
1365    /// - `summary.status IN ("DONE", "ERROR") AND details.tags.author:"yandex"`
1366    /// - `summary.is_finished = true AND details.name CONTAINS "nightly-test"`
1367    #[prost(string, tag = "4")]
1368    pub filter: ::prost::alloc::string::String,
1369}
1370#[allow(clippy::derive_partial_eq_without_eq)]
1371#[derive(Clone, PartialEq, ::prost::Message)]
1372pub struct ListTestsResponse {
1373    /// List of tests in the specified folder.
1374    #[prost(message, repeated, tag = "1")]
1375    pub tests: ::prost::alloc::vec::Vec<test::Test>,
1376    /// Token for getting the next page of the list. If the number of results is greater than
1377    /// the specified \[ListTestsRequest.page_size\], use `next_page_token` as the value
1378    /// for the \[ListTestsRequest.page_token\] parameter in the next list request.
1379    ///
1380    /// Each subsequent page will have its own `next_page_token` to continue paging through the results.
1381    #[prost(string, tag = "2")]
1382    pub next_page_token: ::prost::alloc::string::String,
1383}
1384/// Generated client implementations.
1385pub mod test_service_client {
1386    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
1387    use tonic::codegen::*;
1388    use tonic::codegen::http::Uri;
1389    /// A set of methods for managing tests.
1390    #[derive(Debug, Clone)]
1391    pub struct TestServiceClient<T> {
1392        inner: tonic::client::Grpc<T>,
1393    }
1394    impl TestServiceClient<tonic::transport::Channel> {
1395        /// Attempt to create a new client by connecting to a given endpoint.
1396        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1397        where
1398            D: TryInto<tonic::transport::Endpoint>,
1399            D::Error: Into<StdError>,
1400        {
1401            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1402            Ok(Self::new(conn))
1403        }
1404    }
1405    impl<T> TestServiceClient<T>
1406    where
1407        T: tonic::client::GrpcService<tonic::body::BoxBody>,
1408        T::Error: Into<StdError>,
1409        T::ResponseBody: Body<Data = Bytes> + Send + 'static,
1410        <T::ResponseBody as Body>::Error: Into<StdError> + Send,
1411    {
1412        pub fn new(inner: T) -> Self {
1413            let inner = tonic::client::Grpc::new(inner);
1414            Self { inner }
1415        }
1416        pub fn with_origin(inner: T, origin: Uri) -> Self {
1417            let inner = tonic::client::Grpc::with_origin(inner, origin);
1418            Self { inner }
1419        }
1420        pub fn with_interceptor<F>(
1421            inner: T,
1422            interceptor: F,
1423        ) -> TestServiceClient<InterceptedService<T, F>>
1424        where
1425            F: tonic::service::Interceptor,
1426            T::ResponseBody: Default,
1427            T: tonic::codegen::Service<
1428                http::Request<tonic::body::BoxBody>,
1429                Response = http::Response<
1430                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
1431                >,
1432            >,
1433            <T as tonic::codegen::Service<
1434                http::Request<tonic::body::BoxBody>,
1435            >>::Error: Into<StdError> + Send + Sync,
1436        {
1437            TestServiceClient::new(InterceptedService::new(inner, interceptor))
1438        }
1439        /// Compress requests with the given encoding.
1440        ///
1441        /// This requires the server to support it otherwise it might respond with an
1442        /// error.
1443        #[must_use]
1444        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1445            self.inner = self.inner.send_compressed(encoding);
1446            self
1447        }
1448        /// Enable decompressing responses.
1449        #[must_use]
1450        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1451            self.inner = self.inner.accept_compressed(encoding);
1452            self
1453        }
1454        /// Limits the maximum size of a decoded message.
1455        ///
1456        /// Default: `4MB`
1457        #[must_use]
1458        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1459            self.inner = self.inner.max_decoding_message_size(limit);
1460            self
1461        }
1462        /// Limits the maximum size of an encoded message.
1463        ///
1464        /// Default: `usize::MAX`
1465        #[must_use]
1466        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1467            self.inner = self.inner.max_encoding_message_size(limit);
1468            self
1469        }
1470        /// Creates (runs) a test in the specified folder.
1471        pub async fn create(
1472            &mut self,
1473            request: impl tonic::IntoRequest<super::CreateTestRequest>,
1474        ) -> std::result::Result<
1475            tonic::Response<super::super::super::super::operation::Operation>,
1476            tonic::Status,
1477        > {
1478            self.inner
1479                .ready()
1480                .await
1481                .map_err(|e| {
1482                    tonic::Status::new(
1483                        tonic::Code::Unknown,
1484                        format!("Service was not ready: {}", e.into()),
1485                    )
1486                })?;
1487            let codec = tonic::codec::ProstCodec::default();
1488            let path = http::uri::PathAndQuery::from_static(
1489                "/yandex.cloud.loadtesting.api.v1.TestService/Create",
1490            );
1491            let mut req = request.into_request();
1492            req.extensions_mut()
1493                .insert(
1494                    GrpcMethod::new(
1495                        "yandex.cloud.loadtesting.api.v1.TestService",
1496                        "Create",
1497                    ),
1498                );
1499            self.inner.unary(req, path, codec).await
1500        }
1501        /// Returns the specified test.
1502        ///
1503        /// To get the list of all available tests, make a [List] request.
1504        pub async fn get(
1505            &mut self,
1506            request: impl tonic::IntoRequest<super::GetTestRequest>,
1507        ) -> std::result::Result<tonic::Response<super::test::Test>, tonic::Status> {
1508            self.inner
1509                .ready()
1510                .await
1511                .map_err(|e| {
1512                    tonic::Status::new(
1513                        tonic::Code::Unknown,
1514                        format!("Service was not ready: {}", e.into()),
1515                    )
1516                })?;
1517            let codec = tonic::codec::ProstCodec::default();
1518            let path = http::uri::PathAndQuery::from_static(
1519                "/yandex.cloud.loadtesting.api.v1.TestService/Get",
1520            );
1521            let mut req = request.into_request();
1522            req.extensions_mut()
1523                .insert(
1524                    GrpcMethod::new("yandex.cloud.loadtesting.api.v1.TestService", "Get"),
1525                );
1526            self.inner.unary(req, path, codec).await
1527        }
1528        /// Stops the specified test.
1529        pub async fn stop(
1530            &mut self,
1531            request: impl tonic::IntoRequest<super::StopTestRequest>,
1532        ) -> std::result::Result<
1533            tonic::Response<super::super::super::super::operation::Operation>,
1534            tonic::Status,
1535        > {
1536            self.inner
1537                .ready()
1538                .await
1539                .map_err(|e| {
1540                    tonic::Status::new(
1541                        tonic::Code::Unknown,
1542                        format!("Service was not ready: {}", e.into()),
1543                    )
1544                })?;
1545            let codec = tonic::codec::ProstCodec::default();
1546            let path = http::uri::PathAndQuery::from_static(
1547                "/yandex.cloud.loadtesting.api.v1.TestService/Stop",
1548            );
1549            let mut req = request.into_request();
1550            req.extensions_mut()
1551                .insert(
1552                    GrpcMethod::new(
1553                        "yandex.cloud.loadtesting.api.v1.TestService",
1554                        "Stop",
1555                    ),
1556                );
1557            self.inner.unary(req, path, codec).await
1558        }
1559        /// Deletes specified tests.
1560        pub async fn delete(
1561            &mut self,
1562            request: impl tonic::IntoRequest<super::DeleteTestRequest>,
1563        ) -> std::result::Result<
1564            tonic::Response<super::super::super::super::operation::Operation>,
1565            tonic::Status,
1566        > {
1567            self.inner
1568                .ready()
1569                .await
1570                .map_err(|e| {
1571                    tonic::Status::new(
1572                        tonic::Code::Unknown,
1573                        format!("Service was not ready: {}", e.into()),
1574                    )
1575                })?;
1576            let codec = tonic::codec::ProstCodec::default();
1577            let path = http::uri::PathAndQuery::from_static(
1578                "/yandex.cloud.loadtesting.api.v1.TestService/Delete",
1579            );
1580            let mut req = request.into_request();
1581            req.extensions_mut()
1582                .insert(
1583                    GrpcMethod::new(
1584                        "yandex.cloud.loadtesting.api.v1.TestService",
1585                        "Delete",
1586                    ),
1587                );
1588            self.inner.unary(req, path, codec).await
1589        }
1590        /// Retrieves the list of test in the specified folder.
1591        pub async fn list(
1592            &mut self,
1593            request: impl tonic::IntoRequest<super::ListTestsRequest>,
1594        ) -> std::result::Result<
1595            tonic::Response<super::ListTestsResponse>,
1596            tonic::Status,
1597        > {
1598            self.inner
1599                .ready()
1600                .await
1601                .map_err(|e| {
1602                    tonic::Status::new(
1603                        tonic::Code::Unknown,
1604                        format!("Service was not ready: {}", e.into()),
1605                    )
1606                })?;
1607            let codec = tonic::codec::ProstCodec::default();
1608            let path = http::uri::PathAndQuery::from_static(
1609                "/yandex.cloud.loadtesting.api.v1.TestService/List",
1610            );
1611            let mut req = request.into_request();
1612            req.extensions_mut()
1613                .insert(
1614                    GrpcMethod::new(
1615                        "yandex.cloud.loadtesting.api.v1.TestService",
1616                        "List",
1617                    ),
1618                );
1619            self.inner.unary(req, path, codec).await
1620        }
1621    }
1622}