yandex_cloud/
yandex.cloud.serverless.functions.v1.rs

1/// A serverless function. For details about the concept, see \[Functions\](/docs/functions/concepts/function).
2#[allow(clippy::derive_partial_eq_without_eq)]
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct Function {
5    /// ID of the function. Generated at creation time.
6    #[prost(string, tag = "1")]
7    pub id: ::prost::alloc::string::String,
8    /// ID of the folder that the function belongs to.
9    #[prost(string, tag = "2")]
10    pub folder_id: ::prost::alloc::string::String,
11    /// Creation timestamp for the function.
12    #[prost(message, optional, tag = "3")]
13    pub created_at: ::core::option::Option<::prost_types::Timestamp>,
14    /// Name of the function. The name is unique within the folder.
15    #[prost(string, tag = "4")]
16    pub name: ::prost::alloc::string::String,
17    /// Description of the function.
18    #[prost(string, tag = "5")]
19    pub description: ::prost::alloc::string::String,
20    /// Function labels as `key:value` pairs.
21    #[prost(map = "string, string", tag = "6")]
22    pub labels: ::std::collections::HashMap<
23        ::prost::alloc::string::String,
24        ::prost::alloc::string::String,
25    >,
26    /// URL that needs to be requested to invoke the function.
27    #[prost(string, tag = "8")]
28    pub http_invoke_url: ::prost::alloc::string::String,
29    /// Status of the function.
30    #[prost(enumeration = "function::Status", tag = "9")]
31    pub status: i32,
32}
33/// Nested message and enum types in `Function`.
34pub mod function {
35    #[derive(
36        Clone,
37        Copy,
38        Debug,
39        PartialEq,
40        Eq,
41        Hash,
42        PartialOrd,
43        Ord,
44        ::prost::Enumeration
45    )]
46    #[repr(i32)]
47    pub enum Status {
48        Unspecified = 0,
49        /// Function is being created.
50        Creating = 1,
51        /// Function is ready to be invoked.
52        Active = 2,
53        /// Function is being deleted.
54        Deleting = 3,
55        /// Function failed.
56        Error = 4,
57    }
58    impl Status {
59        /// String value of the enum field names used in the ProtoBuf definition.
60        ///
61        /// The values are not transformed in any way and thus are considered stable
62        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
63        pub fn as_str_name(&self) -> &'static str {
64            match self {
65                Status::Unspecified => "STATUS_UNSPECIFIED",
66                Status::Creating => "CREATING",
67                Status::Active => "ACTIVE",
68                Status::Deleting => "DELETING",
69                Status::Error => "ERROR",
70            }
71        }
72        /// Creates an enum from field names used in the ProtoBuf definition.
73        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
74            match value {
75                "STATUS_UNSPECIFIED" => Some(Self::Unspecified),
76                "CREATING" => Some(Self::Creating),
77                "ACTIVE" => Some(Self::Active),
78                "DELETING" => Some(Self::Deleting),
79                "ERROR" => Some(Self::Error),
80                _ => None,
81            }
82        }
83    }
84}
85/// Version of a function. For details about the concept, see [Function versions](/docs/functions/concepts/function#version).
86#[allow(clippy::derive_partial_eq_without_eq)]
87#[derive(Clone, PartialEq, ::prost::Message)]
88pub struct Version {
89    /// ID of the version.
90    #[prost(string, tag = "1")]
91    pub id: ::prost::alloc::string::String,
92    /// ID of the function that the version belongs to.
93    #[prost(string, tag = "2")]
94    pub function_id: ::prost::alloc::string::String,
95    /// Description of the version.
96    #[prost(string, tag = "3")]
97    pub description: ::prost::alloc::string::String,
98    /// Creation timestamp for the version.
99    #[prost(message, optional, tag = "5")]
100    pub created_at: ::core::option::Option<::prost_types::Timestamp>,
101    /// ID of the runtime environment for the function.
102    ///
103    /// Supported environments and their identifiers are listed in the [Runtime environments](/docs/functions/concepts/runtime).
104    #[prost(string, tag = "6")]
105    pub runtime: ::prost::alloc::string::String,
106    /// Entrypoint for the function: the name of the function to be called as the handler.
107    ///
108    /// Specified in the format `<function file name>.<handler name>`, for example, `index.myFunction`.
109    #[prost(string, tag = "7")]
110    pub entrypoint: ::prost::alloc::string::String,
111    /// Resources allocated to the version.
112    #[prost(message, optional, tag = "8")]
113    pub resources: ::core::option::Option<Resources>,
114    /// Timeout for the execution of the version.
115    ///
116    /// If the timeout is exceeded, Cloud Functions responds with a 504 HTTP code.
117    #[prost(message, optional, tag = "9")]
118    pub execution_timeout: ::core::option::Option<::prost_types::Duration>,
119    /// ID of the service account associated with the version.
120    #[prost(string, tag = "10")]
121    pub service_account_id: ::prost::alloc::string::String,
122    /// Final size of the deployment package after unpacking.
123    #[prost(int64, tag = "12")]
124    pub image_size: i64,
125    /// Status of the version.
126    #[prost(enumeration = "version::Status", tag = "13")]
127    pub status: i32,
128    /// Version tags. For details, see [Version tag](/docs/functions/concepts/function#tag).
129    #[prost(string, repeated, tag = "14")]
130    pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
131    /// Environment settings for the version.
132    #[prost(map = "string, string", tag = "16")]
133    pub environment: ::std::collections::HashMap<
134        ::prost::alloc::string::String,
135        ::prost::alloc::string::String,
136    >,
137    /// Network access. If specified the version will be attached to specified network/subnet(s).
138    #[prost(message, optional, tag = "17")]
139    pub connectivity: ::core::option::Option<Connectivity>,
140    /// Additional service accounts to be used by the version.
141    #[prost(map = "string, string", tag = "18")]
142    pub named_service_accounts: ::std::collections::HashMap<
143        ::prost::alloc::string::String,
144        ::prost::alloc::string::String,
145    >,
146    /// Yandex Lockbox secrets to be used by the version.
147    #[prost(message, repeated, tag = "19")]
148    pub secrets: ::prost::alloc::vec::Vec<Secret>,
149    /// Options for logging from the function
150    #[prost(message, optional, tag = "20")]
151    pub log_options: ::core::option::Option<LogOptions>,
152    /// S3 mounts to be used by the version.
153    #[prost(message, repeated, tag = "21")]
154    pub storage_mounts: ::prost::alloc::vec::Vec<StorageMount>,
155    /// Config for asynchronous invocations of the version
156    #[prost(message, optional, tag = "22")]
157    pub async_invocation_config: ::core::option::Option<AsyncInvocationConfig>,
158    /// Optional size of in-memory mounted /tmp directory in bytes.
159    #[prost(int64, tag = "23")]
160    pub tmpfs_size: i64,
161    /// The maximum number of requests processed by a function instance at the same time
162    #[prost(int64, tag = "24")]
163    pub concurrency: i64,
164    /// Mounts to be used by the version.
165    #[prost(message, repeated, tag = "25")]
166    pub mounts: ::prost::alloc::vec::Vec<Mount>,
167    /// Metadata options for the version.
168    #[prost(message, optional, tag = "26")]
169    pub metadata_options: ::core::option::Option<MetadataOptions>,
170}
171/// Nested message and enum types in `Version`.
172pub mod version {
173    #[derive(
174        Clone,
175        Copy,
176        Debug,
177        PartialEq,
178        Eq,
179        Hash,
180        PartialOrd,
181        Ord,
182        ::prost::Enumeration
183    )]
184    #[repr(i32)]
185    pub enum Status {
186        Unspecified = 0,
187        /// Version is being created.
188        Creating = 1,
189        /// Version is ready to use.
190        Active = 2,
191        /// Version will be deleted soon.
192        Obsolete = 3,
193        /// Version is being deleted.
194        Deleting = 4,
195    }
196    impl Status {
197        /// String value of the enum field names used in the ProtoBuf definition.
198        ///
199        /// The values are not transformed in any way and thus are considered stable
200        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
201        pub fn as_str_name(&self) -> &'static str {
202            match self {
203                Status::Unspecified => "STATUS_UNSPECIFIED",
204                Status::Creating => "CREATING",
205                Status::Active => "ACTIVE",
206                Status::Obsolete => "OBSOLETE",
207                Status::Deleting => "DELETING",
208            }
209        }
210        /// Creates an enum from field names used in the ProtoBuf definition.
211        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
212            match value {
213                "STATUS_UNSPECIFIED" => Some(Self::Unspecified),
214                "CREATING" => Some(Self::Creating),
215                "ACTIVE" => Some(Self::Active),
216                "OBSOLETE" => Some(Self::Obsolete),
217                "DELETING" => Some(Self::Deleting),
218                _ => None,
219            }
220        }
221    }
222}
223/// Resources allocated to a version.
224#[allow(clippy::derive_partial_eq_without_eq)]
225#[derive(Clone, PartialEq, ::prost::Message)]
226pub struct Resources {
227    /// Amount of memory available to the version, specified in bytes, multiple of 128MB.
228    #[prost(int64, tag = "1")]
229    pub memory: i64,
230}
231/// Version deployment package.
232#[allow(clippy::derive_partial_eq_without_eq)]
233#[derive(Clone, PartialEq, ::prost::Message)]
234pub struct Package {
235    /// Name of the bucket that stores the code for the version.
236    #[prost(string, tag = "1")]
237    pub bucket_name: ::prost::alloc::string::String,
238    /// Name of the object in the bucket that stores the code for the version.
239    #[prost(string, tag = "2")]
240    pub object_name: ::prost::alloc::string::String,
241    /// SHA256 hash of the version deployment package.
242    #[prost(string, tag = "3")]
243    pub sha256: ::prost::alloc::string::String,
244}
245/// Version connectivity specification.
246#[allow(clippy::derive_partial_eq_without_eq)]
247#[derive(Clone, PartialEq, ::prost::Message)]
248pub struct Connectivity {
249    /// Network the version will have access to.
250    /// It's essential to specify network with subnets in all availability zones.
251    #[prost(string, tag = "1")]
252    pub network_id: ::prost::alloc::string::String,
253    /// Complete list of subnets (from the same network) the version can be attached to.
254    /// It's essential to specify at least one subnet for each availability zones.
255    #[prost(string, repeated, tag = "2")]
256    pub subnet_id: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
257}
258#[allow(clippy::derive_partial_eq_without_eq)]
259#[derive(Clone, PartialEq, ::prost::Message)]
260pub struct ScalingPolicy {
261    /// ID of the function that the scaling policy belongs to.
262    #[prost(string, tag = "1")]
263    pub function_id: ::prost::alloc::string::String,
264    /// Tag of the version that the scaling policy belongs to. For details, see [Version tag](/docs/functions/concepts/function#tag).
265    #[prost(string, tag = "2")]
266    pub tag: ::prost::alloc::string::String,
267    /// Creation timestamp for the scaling policy
268    #[prost(message, optional, tag = "3")]
269    pub created_at: ::core::option::Option<::prost_types::Timestamp>,
270    /// Modification timestamp for the scaling policy
271    #[prost(message, optional, tag = "4")]
272    pub modified_at: ::core::option::Option<::prost_types::Timestamp>,
273    /// Minimum guaranteed provisioned instances count for all zones in total.
274    /// Billed separately.
275    #[prost(int64, tag = "6")]
276    pub provisioned_instances_count: i64,
277    /// Upper limit for instance count in each zone.
278    /// 0 means no limit.
279    #[prost(int64, tag = "7")]
280    pub zone_instances_limit: i64,
281    /// Upper limit of requests count in each zone.
282    /// 0 means no limit.
283    #[prost(int64, tag = "8")]
284    pub zone_requests_limit: i64,
285}
286/// Secret for serverless function.
287#[allow(clippy::derive_partial_eq_without_eq)]
288#[derive(Clone, PartialEq, ::prost::Message)]
289pub struct Secret {
290    /// ID of Yandex Lockbox secret.
291    #[prost(string, tag = "1")]
292    pub id: ::prost::alloc::string::String,
293    /// ID of Yandex Lockbox version.
294    #[prost(string, tag = "2")]
295    pub version_id: ::prost::alloc::string::String,
296    /// Key in secret's payload, which value to be delivered into function environment.
297    #[prost(string, tag = "3")]
298    pub key: ::prost::alloc::string::String,
299    #[prost(oneof = "secret::Reference", tags = "4")]
300    pub reference: ::core::option::Option<secret::Reference>,
301}
302/// Nested message and enum types in `Secret`.
303pub mod secret {
304    #[allow(clippy::derive_partial_eq_without_eq)]
305    #[derive(Clone, PartialEq, ::prost::Oneof)]
306    pub enum Reference {
307        /// environment variable in which secret's value to be delivered.
308        #[prost(string, tag = "4")]
309        EnvironmentVariable(::prost::alloc::string::String),
310    }
311}
312#[allow(clippy::derive_partial_eq_without_eq)]
313#[derive(Clone, PartialEq, ::prost::Message)]
314pub struct LogOptions {
315    /// Is logging from function disabled.
316    #[prost(bool, tag = "1")]
317    pub disabled: bool,
318    /// Minimum log entry level.
319    ///
320    /// See \[LogLevel.Level\] for details.
321    #[prost(
322        enumeration = "super::super::super::logging::v1::log_level::Level",
323        tag = "4"
324    )]
325    pub min_level: i32,
326    /// Log entries destination.
327    #[prost(oneof = "log_options::Destination", tags = "2, 3")]
328    pub destination: ::core::option::Option<log_options::Destination>,
329}
330/// Nested message and enum types in `LogOptions`.
331pub mod log_options {
332    /// Log entries destination.
333    #[allow(clippy::derive_partial_eq_without_eq)]
334    #[derive(Clone, PartialEq, ::prost::Oneof)]
335    pub enum Destination {
336        /// Entry should be written to log group resolved by ID.
337        #[prost(string, tag = "2")]
338        LogGroupId(::prost::alloc::string::String),
339        /// Entry should be written to default log group for specified folder.
340        #[prost(string, tag = "3")]
341        FolderId(::prost::alloc::string::String),
342    }
343}
344#[allow(clippy::derive_partial_eq_without_eq)]
345#[derive(Clone, PartialEq, ::prost::Message)]
346pub struct StorageMount {
347    /// S3 bucket name for mounting.
348    #[prost(string, tag = "1")]
349    pub bucket_id: ::prost::alloc::string::String,
350    /// S3 bucket prefix for mounting.
351    #[prost(string, tag = "2")]
352    pub prefix: ::prost::alloc::string::String,
353    /// Mount point directory name (not path) for mounting.
354    #[prost(string, tag = "3")]
355    pub mount_point_name: ::prost::alloc::string::String,
356    /// Is mount read only.
357    #[prost(bool, tag = "4")]
358    pub read_only: bool,
359}
360/// Mount contains an information about version's external storage mount
361#[allow(clippy::derive_partial_eq_without_eq)]
362#[derive(Clone, PartialEq, ::prost::Message)]
363pub struct Mount {
364    /// Unique mount point name. Device will be mounted into /function/storage/<name>
365    #[prost(string, tag = "1")]
366    pub name: ::prost::alloc::string::String,
367    /// Mount's mode
368    #[prost(enumeration = "mount::Mode", tag = "3")]
369    pub mode: i32,
370    /// Target mount option
371    #[prost(oneof = "mount::Target", tags = "10, 11")]
372    pub target: ::core::option::Option<mount::Target>,
373}
374/// Nested message and enum types in `Mount`.
375pub mod mount {
376    /// ObjectStorage as a mount
377    #[allow(clippy::derive_partial_eq_without_eq)]
378    #[derive(Clone, PartialEq, ::prost::Message)]
379    pub struct ObjectStorage {
380        /// ObjectStorage bucket name for mounting.
381        #[prost(string, tag = "1")]
382        pub bucket_id: ::prost::alloc::string::String,
383        /// ObjectStorage bucket prefix for mounting.
384        #[prost(string, tag = "2")]
385        pub prefix: ::prost::alloc::string::String,
386    }
387    /// Disk as a mount
388    #[allow(clippy::derive_partial_eq_without_eq)]
389    #[derive(Clone, PartialEq, ::prost::Message)]
390    pub struct DiskSpec {
391        /// The size of disk for mount in bytes
392        #[prost(int64, tag = "1")]
393        pub size: i64,
394        /// Optional block size of disk for mount in bytes
395        #[prost(int64, tag = "2")]
396        pub block_size: i64,
397    }
398    #[derive(
399        Clone,
400        Copy,
401        Debug,
402        PartialEq,
403        Eq,
404        Hash,
405        PartialOrd,
406        Ord,
407        ::prost::Enumeration
408    )]
409    #[repr(i32)]
410    pub enum Mode {
411        Unspecified = 0,
412        ReadOnly = 1,
413        ReadWrite = 2,
414    }
415    impl Mode {
416        /// String value of the enum field names used in the ProtoBuf definition.
417        ///
418        /// The values are not transformed in any way and thus are considered stable
419        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
420        pub fn as_str_name(&self) -> &'static str {
421            match self {
422                Mode::Unspecified => "MODE_UNSPECIFIED",
423                Mode::ReadOnly => "READ_ONLY",
424                Mode::ReadWrite => "READ_WRITE",
425            }
426        }
427        /// Creates an enum from field names used in the ProtoBuf definition.
428        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
429            match value {
430                "MODE_UNSPECIFIED" => Some(Self::Unspecified),
431                "READ_ONLY" => Some(Self::ReadOnly),
432                "READ_WRITE" => Some(Self::ReadWrite),
433                _ => None,
434            }
435        }
436    }
437    /// Target mount option
438    #[allow(clippy::derive_partial_eq_without_eq)]
439    #[derive(Clone, PartialEq, ::prost::Oneof)]
440    pub enum Target {
441        /// Object storage mounts
442        #[prost(message, tag = "10")]
443        ObjectStorage(ObjectStorage),
444        /// Working disk (worker-local non-shared read-write NBS disk templates)
445        #[prost(message, tag = "11")]
446        EphemeralDiskSpec(DiskSpec),
447    }
448}
449#[allow(clippy::derive_partial_eq_without_eq)]
450#[derive(Clone, PartialEq, ::prost::Message)]
451pub struct AsyncInvocationConfig {
452    /// Number of retries of version invocation
453    #[prost(int64, tag = "1")]
454    pub retries_count: i64,
455    /// Target for successful result of the version's invocation
456    #[prost(message, optional, tag = "2")]
457    pub success_target: ::core::option::Option<async_invocation_config::ResponseTarget>,
458    /// Target for unsuccessful result, if all retries failed
459    #[prost(message, optional, tag = "3")]
460    pub failure_target: ::core::option::Option<async_invocation_config::ResponseTarget>,
461    /// Service account which can invoke version
462    #[prost(string, tag = "4")]
463    pub service_account_id: ::prost::alloc::string::String,
464}
465/// Nested message and enum types in `AsyncInvocationConfig`.
466pub mod async_invocation_config {
467    /// Target to which a result of an invocation will be sent
468    #[allow(clippy::derive_partial_eq_without_eq)]
469    #[derive(Clone, PartialEq, ::prost::Message)]
470    pub struct ResponseTarget {
471        #[prost(oneof = "response_target::Target", tags = "1, 2")]
472        pub target: ::core::option::Option<response_target::Target>,
473    }
474    /// Nested message and enum types in `ResponseTarget`.
475    pub mod response_target {
476        #[allow(clippy::derive_partial_eq_without_eq)]
477        #[derive(Clone, PartialEq, ::prost::Oneof)]
478        pub enum Target {
479            /// Target to ignore a result
480            #[prost(message, tag = "1")]
481            EmptyTarget(super::super::EmptyTarget),
482            /// Target to send a result to ymq
483            #[prost(message, tag = "2")]
484            YmqTarget(super::super::YmqTarget),
485        }
486    }
487}
488#[allow(clippy::derive_partial_eq_without_eq)]
489#[derive(Clone, PartialEq, ::prost::Message)]
490pub struct YmqTarget {
491    /// Queue ARN
492    #[prost(string, tag = "1")]
493    pub queue_arn: ::prost::alloc::string::String,
494    /// Service account which has write permission on the queue.
495    #[prost(string, tag = "2")]
496    pub service_account_id: ::prost::alloc::string::String,
497}
498#[allow(clippy::derive_partial_eq_without_eq)]
499#[derive(Clone, PartialEq, ::prost::Message)]
500pub struct EmptyTarget {}
501#[allow(clippy::derive_partial_eq_without_eq)]
502#[derive(Clone, PartialEq, ::prost::Message)]
503pub struct MetadataOptions {
504    /// Enabled access to GCE flavored metadata
505    #[prost(enumeration = "MetadataOption", tag = "1")]
506    pub gce_http_endpoint: i32,
507    /// Enabled access to AWS flavored metadata (IMDSv1)
508    #[prost(enumeration = "MetadataOption", tag = "2")]
509    pub aws_v1_http_endpoint: i32,
510}
511#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
512#[repr(i32)]
513pub enum MetadataOption {
514    /// Option is default
515    Unspecified = 0,
516    /// Option is enabled
517    Enabled = 1,
518    /// Option is disabled
519    Disabled = 2,
520}
521impl MetadataOption {
522    /// String value of the enum field names used in the ProtoBuf definition.
523    ///
524    /// The values are not transformed in any way and thus are considered stable
525    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
526    pub fn as_str_name(&self) -> &'static str {
527        match self {
528            MetadataOption::Unspecified => "METADATA_OPTION_UNSPECIFIED",
529            MetadataOption::Enabled => "ENABLED",
530            MetadataOption::Disabled => "DISABLED",
531        }
532    }
533    /// Creates an enum from field names used in the ProtoBuf definition.
534    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
535        match value {
536            "METADATA_OPTION_UNSPECIFIED" => Some(Self::Unspecified),
537            "ENABLED" => Some(Self::Enabled),
538            "DISABLED" => Some(Self::Disabled),
539            _ => None,
540        }
541    }
542}
543#[allow(clippy::derive_partial_eq_without_eq)]
544#[derive(Clone, PartialEq, ::prost::Message)]
545pub struct GetFunctionRequest {
546    /// ID of the function to return.
547    ///
548    /// To get a function ID make a \[FunctionService.List\] request.
549    #[prost(string, tag = "1")]
550    pub function_id: ::prost::alloc::string::String,
551}
552#[allow(clippy::derive_partial_eq_without_eq)]
553#[derive(Clone, PartialEq, ::prost::Message)]
554pub struct GetFunctionVersionRequest {
555    /// ID of the version to return.
556    ///
557    /// To get a version ID make a \[FunctionService.ListVersions\] request.
558    #[prost(string, tag = "1")]
559    pub function_version_id: ::prost::alloc::string::String,
560}
561#[allow(clippy::derive_partial_eq_without_eq)]
562#[derive(Clone, PartialEq, ::prost::Message)]
563pub struct GetFunctionVersionByTagRequest {
564    /// ID of the function whose versions should be listed.
565    ///
566    /// To get a function ID use a \[FunctionService.List\] request.
567    #[prost(string, tag = "1")]
568    pub function_id: ::prost::alloc::string::String,
569    /// Version tag.
570    ///
571    /// To get the history of version tags make a \[FunctionService.ListTagHistory\] request.
572    #[prost(string, tag = "2")]
573    pub tag: ::prost::alloc::string::String,
574}
575#[allow(clippy::derive_partial_eq_without_eq)]
576#[derive(Clone, PartialEq, ::prost::Message)]
577pub struct ListFunctionsRequest {
578    /// ID of the folder to list functions in.
579    ///
580    /// To get a folder ID make a \[yandex.cloud.resourcemanager.v1.FolderService.List\] request.
581    #[prost(string, tag = "1")]
582    pub folder_id: ::prost::alloc::string::String,
583    /// The maximum number of results per page to return. If the number of available
584    /// results is larger than `pageSize`, the service returns a \[ListFunctionsResponse.next_page_token\]
585    /// that can be used to get the next page of results in subsequent list requests.
586    ///
587    /// Default value: 100.
588    #[prost(int64, tag = "2")]
589    pub page_size: i64,
590    /// Page token. To get the next page of results, set `pageToken` to the
591    /// \[ListFunctionsResponse.next_page_token\] returned by a previous list request.
592    #[prost(string, tag = "3")]
593    pub page_token: ::prost::alloc::string::String,
594    /// A filter expression that filters functions listed in the response.
595    ///
596    /// The expression must specify:
597    /// 1. The field name. Currently filtering can only be applied to the \[Function.name\] field.
598    /// 2. An `=` operator.
599    /// 3. The value in double quotes (`"`). Must be 3-63 characters long and match the regular expression `\[a-z][-a-z0-9]{1,61}[a-z0-9\]`.
600    /// Example of a filter: `name="my-function"`.
601    #[prost(string, tag = "4")]
602    pub filter: ::prost::alloc::string::String,
603}
604#[allow(clippy::derive_partial_eq_without_eq)]
605#[derive(Clone, PartialEq, ::prost::Message)]
606pub struct ListFunctionsResponse {
607    /// List of functions in the specified folder.
608    #[prost(message, repeated, tag = "1")]
609    pub functions: ::prost::alloc::vec::Vec<Function>,
610    /// Token for getting the next page of the list. If the number of results is greater than
611    /// the specified \[ListFunctionsRequest.page_size\], use `nextPageToken` as the value
612    /// for the \[ListFunctionsRequest.page_token\] parameter in the next list request.
613    ///
614    /// Each subsequent page will have its own `nextPageToken` to continue paging through the results.
615    #[prost(string, tag = "2")]
616    pub next_page_token: ::prost::alloc::string::String,
617}
618#[allow(clippy::derive_partial_eq_without_eq)]
619#[derive(Clone, PartialEq, ::prost::Message)]
620pub struct CreateFunctionRequest {
621    /// ID of the folder to create a function in.
622    ///
623    /// To get a folder ID make a \[yandex.cloud.resourcemanager.v1.FolderService.List\] request.
624    #[prost(string, tag = "1")]
625    pub folder_id: ::prost::alloc::string::String,
626    /// Name of the function.
627    /// The name must be unique within the folder.
628    #[prost(string, tag = "2")]
629    pub name: ::prost::alloc::string::String,
630    /// Description of the function.
631    #[prost(string, tag = "3")]
632    pub description: ::prost::alloc::string::String,
633    /// Resource labels as `key:value` pairs.
634    #[prost(map = "string, string", tag = "4")]
635    pub labels: ::std::collections::HashMap<
636        ::prost::alloc::string::String,
637        ::prost::alloc::string::String,
638    >,
639}
640#[allow(clippy::derive_partial_eq_without_eq)]
641#[derive(Clone, PartialEq, ::prost::Message)]
642pub struct CreateFunctionMetadata {
643    /// ID of the function that is being created.
644    #[prost(string, tag = "1")]
645    pub function_id: ::prost::alloc::string::String,
646}
647#[allow(clippy::derive_partial_eq_without_eq)]
648#[derive(Clone, PartialEq, ::prost::Message)]
649pub struct UpdateFunctionRequest {
650    /// ID of the function to update.
651    ///
652    /// To get a function ID make a \[FunctionService.List\] request.
653    #[prost(string, tag = "1")]
654    pub function_id: ::prost::alloc::string::String,
655    /// Field mask that specifies which attributes of the function should be updated.
656    #[prost(message, optional, tag = "2")]
657    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
658    /// New name for the function.
659    /// The name must be unique within the folder.
660    #[prost(string, tag = "3")]
661    pub name: ::prost::alloc::string::String,
662    /// New description for the function.
663    #[prost(string, tag = "4")]
664    pub description: ::prost::alloc::string::String,
665    /// Function labels as `key:value` pairs.
666    ///
667    /// Existing set of labels is completely replaced by the provided set, so if you just want
668    /// to add or remove a label, request the current set of labels with a \[FunctionService.Get\] request.
669    #[prost(map = "string, string", tag = "5")]
670    pub labels: ::std::collections::HashMap<
671        ::prost::alloc::string::String,
672        ::prost::alloc::string::String,
673    >,
674}
675#[allow(clippy::derive_partial_eq_without_eq)]
676#[derive(Clone, PartialEq, ::prost::Message)]
677pub struct UpdateFunctionMetadata {
678    /// ID of the function that is being updated.
679    #[prost(string, tag = "1")]
680    pub function_id: ::prost::alloc::string::String,
681}
682#[allow(clippy::derive_partial_eq_without_eq)]
683#[derive(Clone, PartialEq, ::prost::Message)]
684pub struct DeleteFunctionRequest {
685    /// ID of the function to delete.
686    /// To get a function ID make a \[FunctionService.List\] request.
687    #[prost(string, tag = "1")]
688    pub function_id: ::prost::alloc::string::String,
689}
690#[allow(clippy::derive_partial_eq_without_eq)]
691#[derive(Clone, PartialEq, ::prost::Message)]
692pub struct DeleteFunctionMetadata {
693    /// ID of the function that is being deleted.
694    #[prost(string, tag = "1")]
695    pub function_id: ::prost::alloc::string::String,
696}
697#[allow(clippy::derive_partial_eq_without_eq)]
698#[derive(Clone, PartialEq, ::prost::Message)]
699pub struct DeleteFunctionVersionRequest {
700    /// ID of the function's version to delete.
701    #[prost(string, tag = "2")]
702    pub function_version_id: ::prost::alloc::string::String,
703    /// Forces deletion of the version tags.
704    ///
705    /// If the value equals false and the function has tags with the selected version then request returns an error.
706    #[prost(bool, tag = "3")]
707    pub force: bool,
708}
709#[allow(clippy::derive_partial_eq_without_eq)]
710#[derive(Clone, PartialEq, ::prost::Message)]
711pub struct DeleteFunctionVersionMetadata {
712    /// ID of the function's version is being deleted.
713    #[prost(string, tag = "2")]
714    pub function_version_id: ::prost::alloc::string::String,
715}
716#[allow(clippy::derive_partial_eq_without_eq)]
717#[derive(Clone, PartialEq, ::prost::Message)]
718pub struct ListRuntimesRequest {}
719#[allow(clippy::derive_partial_eq_without_eq)]
720#[derive(Clone, PartialEq, ::prost::Message)]
721pub struct ListRuntimesResponse {
722    /// Runtime environments available for the specified function.
723    #[prost(string, repeated, tag = "1")]
724    pub runtimes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
725}
726#[allow(clippy::derive_partial_eq_without_eq)]
727#[derive(Clone, PartialEq, ::prost::Message)]
728pub struct ListFunctionsVersionsRequest {
729    /// The maximum number of results per page to return. If the number of available results
730    /// is larger than `pageSize`, the service returns a \[ListFunctionsVersionsResponse.next_page_token\]
731    /// that can be used to get the next page of results in subsequent list requests.
732    ///
733    /// Default value: 100.
734    #[prost(int64, tag = "3")]
735    pub page_size: i64,
736    /// Page token. To get the next page of results, set `pageToken` to the
737    /// \[ListFunctionsVersionsResponse.next_page_token\] returned by a previous list request.
738    #[prost(string, tag = "4")]
739    pub page_token: ::prost::alloc::string::String,
740    /// A filter expression that filters resources listed in the response.
741    ///
742    /// The expression must specify:
743    /// 1. The field name. Currently filtering can only be applied to the \[Version.status\] and \[Version.runtime\] fields.
744    /// 2. An `=` operator.
745    /// 3. The value in double quotes (`"`). Must be 3-63 characters long and match the regular expression `\[a-z][-a-z0-9]{1,61}[a-z0-9\]`.
746    /// Example of a filter: `status="ACTIVE"`.
747    #[prost(string, tag = "5")]
748    pub filter: ::prost::alloc::string::String,
749    #[prost(oneof = "list_functions_versions_request::Id", tags = "1, 2")]
750    pub id: ::core::option::Option<list_functions_versions_request::Id>,
751}
752/// Nested message and enum types in `ListFunctionsVersionsRequest`.
753pub mod list_functions_versions_request {
754    #[allow(clippy::derive_partial_eq_without_eq)]
755    #[derive(Clone, PartialEq, ::prost::Oneof)]
756    pub enum Id {
757        /// ID of the folder to list function versions for.
758        /// To get a folder ID make a \[yandex.cloud.resourcemanager.v1.FolderService.List\] request.
759        #[prost(string, tag = "1")]
760        FolderId(::prost::alloc::string::String),
761        /// ID of the function to list versions for.
762        /// To get a function ID use a \[FunctionService.List\] request.
763        #[prost(string, tag = "2")]
764        FunctionId(::prost::alloc::string::String),
765    }
766}
767#[allow(clippy::derive_partial_eq_without_eq)]
768#[derive(Clone, PartialEq, ::prost::Message)]
769pub struct ListFunctionsVersionsResponse {
770    /// List of versions for the specified folder or function.
771    #[prost(message, repeated, tag = "1")]
772    pub versions: ::prost::alloc::vec::Vec<Version>,
773    /// Token for getting the next page of the list. If the number of results is greater than
774    /// the specified \[ListFunctionsVersionsRequest.page_size\], use `nextPageToken` as the value
775    /// for the \[ListFunctionsVersionsRequest.page_token\] parameter in the next list request.
776    ///
777    /// Each subsequent page will have its own `nextPageToken` to continue paging through the results.
778    #[prost(string, tag = "2")]
779    pub next_page_token: ::prost::alloc::string::String,
780}
781#[allow(clippy::derive_partial_eq_without_eq)]
782#[derive(Clone, PartialEq, ::prost::Message)]
783pub struct ListFunctionOperationsRequest {
784    /// ID of the function to list operations for.
785    #[prost(string, tag = "1")]
786    pub function_id: ::prost::alloc::string::String,
787    /// The maximum number of results per page that should be returned. If the number of available
788    /// results is larger than `pageSize`, the service returns a \[ListFunctionOperationsResponse.next_page_token\]
789    /// that can be used to get the next page of results in subsequent list requests.
790    ///
791    /// Default value: 100.
792    #[prost(int64, tag = "2")]
793    pub page_size: i64,
794    /// Page token. To get the next page of results, set `pageToken` to the
795    /// \[ListFunctionOperationsResponse.next_page_token\] returned by a previous list request.
796    #[prost(string, tag = "3")]
797    pub page_token: ::prost::alloc::string::String,
798    /// A filter expression that filters resources listed in the response.
799    ///
800    /// The expression must specify:
801    /// 1. The field name. Currently filtering can be applied to the \[operation.Operation.done\], \[operation.Operation.created_by\] field.
802    /// 2. An `=` operator.
803    /// 3. The value in double quotes (`"`). Must be 3-63 characters long and match the regular expression `\[a-z][-a-z0-9]{1,61}[a-z0-9\]`.
804    /// Examples of a filter: `done=false`, `created_by='John.Doe'`.
805    #[prost(string, tag = "4")]
806    pub filter: ::prost::alloc::string::String,
807}
808#[allow(clippy::derive_partial_eq_without_eq)]
809#[derive(Clone, PartialEq, ::prost::Message)]
810pub struct ListFunctionOperationsResponse {
811    /// List of operations for the specified function.
812    #[prost(message, repeated, tag = "1")]
813    pub operations: ::prost::alloc::vec::Vec<super::super::super::operation::Operation>,
814    /// Token for getting the next page of the list. If the number of results is greater than
815    /// the specified \[ListFunctionOperationsRequest.page_size\], use `nextPageToken` as the value
816    /// for the \[ListFunctionOperationsRequest.page_token\] parameter in the next list request.
817    ///
818    /// Each subsequent page will have its own `nextPageToken` to continue paging through the results.
819    #[prost(string, tag = "2")]
820    pub next_page_token: ::prost::alloc::string::String,
821}
822#[allow(clippy::derive_partial_eq_without_eq)]
823#[derive(Clone, PartialEq, ::prost::Message)]
824pub struct CreateFunctionVersionRequest {
825    /// ID of the function to create a version for.
826    ///
827    /// To get a function ID, make a \[FunctionService.List\] request.
828    #[prost(string, tag = "1")]
829    pub function_id: ::prost::alloc::string::String,
830    /// Runtime environment for the version.
831    #[prost(string, tag = "2")]
832    pub runtime: ::prost::alloc::string::String,
833    /// Description of the version
834    #[prost(string, tag = "3")]
835    pub description: ::prost::alloc::string::String,
836    /// Entrypoint of the version.
837    #[prost(string, tag = "4")]
838    pub entrypoint: ::prost::alloc::string::String,
839    /// Resources allocated to the version.
840    #[prost(message, optional, tag = "5")]
841    pub resources: ::core::option::Option<Resources>,
842    /// Timeout for the execution of the version.
843    ///
844    /// If the timeout is exceeded, Cloud Functions responds with a 504 HTTP code.
845    #[prost(message, optional, tag = "6")]
846    pub execution_timeout: ::core::option::Option<::prost_types::Duration>,
847    /// ID of the service account to associate with the version.
848    #[prost(string, tag = "7")]
849    pub service_account_id: ::prost::alloc::string::String,
850    /// Environment settings for the version.
851    #[prost(map = "string, string", tag = "12")]
852    pub environment: ::std::collections::HashMap<
853        ::prost::alloc::string::String,
854        ::prost::alloc::string::String,
855    >,
856    /// Function version tags. For details, see [Version tag](/docs/functions/concepts/function#tag).
857    #[prost(string, repeated, tag = "13")]
858    pub tag: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
859    /// Function version connectivity. If specified the version will be attached to specified network/subnet(s).
860    #[prost(message, optional, tag = "17")]
861    pub connectivity: ::core::option::Option<Connectivity>,
862    /// Additional service accounts to be used by the version.
863    #[prost(map = "string, string", tag = "15")]
864    pub named_service_accounts: ::std::collections::HashMap<
865        ::prost::alloc::string::String,
866        ::prost::alloc::string::String,
867    >,
868    /// Yandex Lockbox secrets to be used by the version.
869    #[prost(message, repeated, tag = "18")]
870    pub secrets: ::prost::alloc::vec::Vec<Secret>,
871    /// Options for logging from the function
872    #[prost(message, optional, tag = "19")]
873    pub log_options: ::core::option::Option<LogOptions>,
874    /// S3 mounts to be used by the version.
875    #[prost(message, repeated, tag = "20")]
876    pub storage_mounts: ::prost::alloc::vec::Vec<StorageMount>,
877    /// Config for asynchronous invocations of the version
878    #[prost(message, optional, tag = "22")]
879    pub async_invocation_config: ::core::option::Option<AsyncInvocationConfig>,
880    /// Optional size of in-memory mounted /tmp directory in bytes.
881    /// Available for versions with resources.memory greater or equal to 1024 MiB.
882    ///
883    /// 0 or in range from 512 MiB to 3/4 of resources.memory.
884    #[prost(int64, tag = "23")]
885    pub tmpfs_size: i64,
886    /// The maximum number of requests processed by a function instance at the same time
887    #[prost(int64, tag = "24")]
888    pub concurrency: i64,
889    /// Mounts to be used by the version.
890    #[prost(message, repeated, tag = "25")]
891    pub mounts: ::prost::alloc::vec::Vec<Mount>,
892    /// Metadata options for the version.
893    #[prost(message, optional, tag = "26")]
894    pub metadata_options: ::core::option::Option<MetadataOptions>,
895    /// Source of the deployment package for the version.
896    #[prost(
897        oneof = "create_function_version_request::PackageSource",
898        tags = "9, 10, 11"
899    )]
900    pub package_source: ::core::option::Option<
901        create_function_version_request::PackageSource,
902    >,
903}
904/// Nested message and enum types in `CreateFunctionVersionRequest`.
905pub mod create_function_version_request {
906    /// Source of the deployment package for the version.
907    #[allow(clippy::derive_partial_eq_without_eq)]
908    #[derive(Clone, PartialEq, ::prost::Oneof)]
909    pub enum PackageSource {
910        /// Functions deployment package.
911        #[prost(message, tag = "9")]
912        Package(super::Package),
913        /// Content of the deployment package.
914        #[prost(bytes, tag = "10")]
915        Content(::prost::alloc::vec::Vec<u8>),
916        /// ID of the version to be copied from. Source version must belong to the same folder as the created version
917        /// and the user must have read permissions to the source version.
918        #[prost(string, tag = "11")]
919        VersionId(::prost::alloc::string::String),
920    }
921}
922#[allow(clippy::derive_partial_eq_without_eq)]
923#[derive(Clone, PartialEq, ::prost::Message)]
924pub struct CreateFunctionVersionMetadata {
925    /// ID of the version that is being created.
926    #[prost(string, tag = "1")]
927    pub function_version_id: ::prost::alloc::string::String,
928}
929#[allow(clippy::derive_partial_eq_without_eq)]
930#[derive(Clone, PartialEq, ::prost::Message)]
931pub struct SetFunctionTagRequest {
932    /// ID of the version to set the tag for.
933    ///
934    /// To get a version ID make a \[FunctionService.ListVersions\] request.
935    #[prost(string, tag = "1")]
936    pub function_version_id: ::prost::alloc::string::String,
937    /// Tag to set for the version.
938    #[prost(string, tag = "2")]
939    pub tag: ::prost::alloc::string::String,
940}
941#[allow(clippy::derive_partial_eq_without_eq)]
942#[derive(Clone, PartialEq, ::prost::Message)]
943pub struct RemoveFunctionTagRequest {
944    /// ID of the version to remove a tag from.
945    ///
946    /// To get the a version ID make a \[FunctionService.ListVersions\] request.
947    #[prost(string, tag = "1")]
948    pub function_version_id: ::prost::alloc::string::String,
949    /// Tag to remove from the specified version.
950    #[prost(string, tag = "2")]
951    pub tag: ::prost::alloc::string::String,
952}
953#[allow(clippy::derive_partial_eq_without_eq)]
954#[derive(Clone, PartialEq, ::prost::Message)]
955pub struct SetFunctionTagMetadata {
956    /// ID of the function versions that is being tagged.
957    #[prost(string, tag = "1")]
958    pub function_version_id: ::prost::alloc::string::String,
959}
960#[allow(clippy::derive_partial_eq_without_eq)]
961#[derive(Clone, PartialEq, ::prost::Message)]
962pub struct RemoveFunctionTagMetadata {
963    /// ID of the function versions that is being untagged.
964    #[prost(string, tag = "1")]
965    pub function_version_id: ::prost::alloc::string::String,
966}
967#[allow(clippy::derive_partial_eq_without_eq)]
968#[derive(Clone, PartialEq, ::prost::Message)]
969pub struct ListFunctionTagHistoryRequest {
970    /// ID of the function to retrieve tag history for.
971    ///
972    /// To get a function ID, make a \[FunctionService.List\] request.
973    #[prost(string, tag = "1")]
974    pub function_id: ::prost::alloc::string::String,
975    /// Specific tag that history should be limited to.
976    #[prost(string, tag = "2")]
977    pub tag: ::prost::alloc::string::String,
978    /// The maximum number of results per page that should be returned. If the number of available
979    /// results is larger than `pageSize`, the service returns a \[ListFunctionOperationsResponse.next_page_token\]
980    /// that can be used to get the next page of results in subsequent list requests.
981    /// Default value: 100.
982    #[prost(int64, tag = "3")]
983    pub page_size: i64,
984    /// Page token. To get the next page of results, set `pageToken` to the
985    /// \[ListFunctionOperationsResponse.next_page_token\] returned by a previous list request.
986    #[prost(string, tag = "4")]
987    pub page_token: ::prost::alloc::string::String,
988    /// A filter expression that filters resources listed in the response.
989    ///
990    /// The expression must specify:
991    /// 1. The field name. Currently filtering can only be applied to the \[FunctionTagHistoryRecord.effective_from\] and \[FunctionTagHistoryRecord.effective_to\] fields.
992    /// 2. An `=` or `>` or `<` operator.
993    /// 3. The value in double quotes (`"`). Must be 3-63 characters long and match the regular expression `\[a-z][-a-z0-9]{1,61}[a-z0-9\]`.
994    /// For example, `effective_to>2021-01-01T12:00:00Z`.
995    #[prost(string, tag = "5")]
996    pub filter: ::prost::alloc::string::String,
997}
998#[allow(clippy::derive_partial_eq_without_eq)]
999#[derive(Clone, PartialEq, ::prost::Message)]
1000pub struct ListFunctionTagHistoryResponse {
1001    /// Set of relevant tag history records.
1002    #[prost(message, repeated, tag = "1")]
1003    pub function_tag_history_record: ::prost::alloc::vec::Vec<
1004        list_function_tag_history_response::FunctionTagHistoryRecord,
1005    >,
1006    /// Token for getting the next page of the list. If the number of results is greater than
1007    /// the specified \[ListFunctionTagHistoryRequest.page_size\], use `nextPageToken` as the value
1008    /// for the \[ListFunctionTagHistoryRequest.page_token\] parameter in the next list request.
1009    ///
1010    /// Each subsequent page will have its own `nextPageToken` to continue paging through the results.
1011    #[prost(string, tag = "2")]
1012    pub next_page_token: ::prost::alloc::string::String,
1013}
1014/// Nested message and enum types in `ListFunctionTagHistoryResponse`.
1015pub mod list_function_tag_history_response {
1016    /// A record in the tag history.
1017    #[allow(clippy::derive_partial_eq_without_eq)]
1018    #[derive(Clone, PartialEq, ::prost::Message)]
1019    pub struct FunctionTagHistoryRecord {
1020        /// ID of the function that the record is about.
1021        #[prost(string, tag = "1")]
1022        pub function_id: ::prost::alloc::string::String,
1023        /// ID of the function version that the record is about.
1024        #[prost(string, tag = "3")]
1025        pub function_version_id: ::prost::alloc::string::String,
1026        /// Tag that was set for the version at some point.
1027        #[prost(string, tag = "2")]
1028        pub tag: ::prost::alloc::string::String,
1029        /// Timestamp when the tag started being active for the function.
1030        #[prost(message, optional, tag = "4")]
1031        pub effective_from: ::core::option::Option<::prost_types::Timestamp>,
1032        /// Timestamp when the tag stopped being active for the function.
1033        #[prost(message, optional, tag = "5")]
1034        pub effective_to: ::core::option::Option<::prost_types::Timestamp>,
1035    }
1036}
1037#[allow(clippy::derive_partial_eq_without_eq)]
1038#[derive(Clone, PartialEq, ::prost::Message)]
1039pub struct ListScalingPoliciesRequest {
1040    /// ID of the function to retrieve scaling policies for.
1041    ///
1042    /// To get a function ID, make a \[FunctionService.List\] request.
1043    #[prost(string, tag = "1")]
1044    pub function_id: ::prost::alloc::string::String,
1045    /// The maximum number of results per page that should be returned. If the number of available
1046    /// results is larger than `pageSize`, the service returns a \[ListScalingPoliciesResponse.next_page_token\]
1047    /// that can be used to get the next page of results in subsequent list requests.
1048    ///
1049    /// Default value: 100.
1050    #[prost(int64, tag = "2")]
1051    pub page_size: i64,
1052    /// Page token. To get the next page of results, set `pageToken` to the
1053    /// \[ListScalingPoliciesResponse.next_page_token\] returned by a previous list request.
1054    #[prost(string, tag = "3")]
1055    pub page_token: ::prost::alloc::string::String,
1056}
1057#[allow(clippy::derive_partial_eq_without_eq)]
1058#[derive(Clone, PartialEq, ::prost::Message)]
1059pub struct ListScalingPoliciesResponse {
1060    /// Set of relevant scaling policies.
1061    #[prost(message, repeated, tag = "1")]
1062    pub scaling_policies: ::prost::alloc::vec::Vec<ScalingPolicy>,
1063    /// Token for getting the next page of the list. If the number of results is greater than
1064    /// the specified \[ListScalingPoliciesRequest.page_size\], use `nextPageToken` as the value
1065    /// for the \[ListScalingPoliciesRequest.page_token\] parameter in the next list request.
1066    ///
1067    /// Each subsequent page will have its own `nextPageToken` to continue paging through the results.
1068    #[prost(string, tag = "2")]
1069    pub next_page_token: ::prost::alloc::string::String,
1070}
1071#[allow(clippy::derive_partial_eq_without_eq)]
1072#[derive(Clone, PartialEq, ::prost::Message)]
1073pub struct SetScalingPolicyRequest {
1074    /// ID of the function to retrieve scaling policies for.
1075    ///
1076    /// To get a function ID, make a \[FunctionService.List\] request.
1077    #[prost(string, tag = "1")]
1078    pub function_id: ::prost::alloc::string::String,
1079    /// Version tag.
1080    ///
1081    /// To get the history of version tags make a \[FunctionService.ListTagHistory\] request.
1082    #[prost(string, tag = "2")]
1083    pub tag: ::prost::alloc::string::String,
1084    /// Minimum guaranteed provisioned instances count for all zones in total.
1085    /// Billed separately.
1086    #[prost(int64, tag = "4")]
1087    pub provisioned_instances_count: i64,
1088    /// Upper limit for instance count in each zone.
1089    /// 0 means no limit.
1090    #[prost(int64, tag = "5")]
1091    pub zone_instances_limit: i64,
1092    /// Upper limit of requests count in each zone.
1093    /// 0 means no limit.
1094    #[prost(int64, tag = "6")]
1095    pub zone_requests_limit: i64,
1096}
1097#[allow(clippy::derive_partial_eq_without_eq)]
1098#[derive(Clone, PartialEq, ::prost::Message)]
1099pub struct SetScalingPolicyMetadata {
1100    /// ID of the function for which scaling policy was set.
1101    #[prost(string, tag = "1")]
1102    pub function_id: ::prost::alloc::string::String,
1103}
1104#[allow(clippy::derive_partial_eq_without_eq)]
1105#[derive(Clone, PartialEq, ::prost::Message)]
1106pub struct RemoveScalingPolicyRequest {
1107    /// ID of the function to remove scaling policies for.
1108    ///
1109    /// To get a function ID, make a \[FunctionService.List\] request.
1110    #[prost(string, tag = "1")]
1111    pub function_id: ::prost::alloc::string::String,
1112    /// Version tag.
1113    ///
1114    /// To get the history of version tags make a \[FunctionService.ListTagHistory\] request.
1115    #[prost(string, tag = "2")]
1116    pub tag: ::prost::alloc::string::String,
1117}
1118#[allow(clippy::derive_partial_eq_without_eq)]
1119#[derive(Clone, PartialEq, ::prost::Message)]
1120pub struct RemoveScalingPolicyMetadata {
1121    /// ID of the function for which scaling policy was removed.
1122    #[prost(string, tag = "1")]
1123    pub function_id: ::prost::alloc::string::String,
1124}
1125/// Generated client implementations.
1126pub mod function_service_client {
1127    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
1128    use tonic::codegen::*;
1129    use tonic::codegen::http::Uri;
1130    /// A set of methods for managing serverless functions.
1131    #[derive(Debug, Clone)]
1132    pub struct FunctionServiceClient<T> {
1133        inner: tonic::client::Grpc<T>,
1134    }
1135    impl FunctionServiceClient<tonic::transport::Channel> {
1136        /// Attempt to create a new client by connecting to a given endpoint.
1137        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1138        where
1139            D: TryInto<tonic::transport::Endpoint>,
1140            D::Error: Into<StdError>,
1141        {
1142            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1143            Ok(Self::new(conn))
1144        }
1145    }
1146    impl<T> FunctionServiceClient<T>
1147    where
1148        T: tonic::client::GrpcService<tonic::body::BoxBody>,
1149        T::Error: Into<StdError>,
1150        T::ResponseBody: Body<Data = Bytes> + Send + 'static,
1151        <T::ResponseBody as Body>::Error: Into<StdError> + Send,
1152    {
1153        pub fn new(inner: T) -> Self {
1154            let inner = tonic::client::Grpc::new(inner);
1155            Self { inner }
1156        }
1157        pub fn with_origin(inner: T, origin: Uri) -> Self {
1158            let inner = tonic::client::Grpc::with_origin(inner, origin);
1159            Self { inner }
1160        }
1161        pub fn with_interceptor<F>(
1162            inner: T,
1163            interceptor: F,
1164        ) -> FunctionServiceClient<InterceptedService<T, F>>
1165        where
1166            F: tonic::service::Interceptor,
1167            T::ResponseBody: Default,
1168            T: tonic::codegen::Service<
1169                http::Request<tonic::body::BoxBody>,
1170                Response = http::Response<
1171                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
1172                >,
1173            >,
1174            <T as tonic::codegen::Service<
1175                http::Request<tonic::body::BoxBody>,
1176            >>::Error: Into<StdError> + Send + Sync,
1177        {
1178            FunctionServiceClient::new(InterceptedService::new(inner, interceptor))
1179        }
1180        /// Compress requests with the given encoding.
1181        ///
1182        /// This requires the server to support it otherwise it might respond with an
1183        /// error.
1184        #[must_use]
1185        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1186            self.inner = self.inner.send_compressed(encoding);
1187            self
1188        }
1189        /// Enable decompressing responses.
1190        #[must_use]
1191        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1192            self.inner = self.inner.accept_compressed(encoding);
1193            self
1194        }
1195        /// Limits the maximum size of a decoded message.
1196        ///
1197        /// Default: `4MB`
1198        #[must_use]
1199        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1200            self.inner = self.inner.max_decoding_message_size(limit);
1201            self
1202        }
1203        /// Limits the maximum size of an encoded message.
1204        ///
1205        /// Default: `usize::MAX`
1206        #[must_use]
1207        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1208            self.inner = self.inner.max_encoding_message_size(limit);
1209            self
1210        }
1211        /// Returns the specified function.
1212        ///
1213        /// To get the list of all available functions, make a [List] request.
1214        pub async fn get(
1215            &mut self,
1216            request: impl tonic::IntoRequest<super::GetFunctionRequest>,
1217        ) -> std::result::Result<tonic::Response<super::Function>, tonic::Status> {
1218            self.inner
1219                .ready()
1220                .await
1221                .map_err(|e| {
1222                    tonic::Status::new(
1223                        tonic::Code::Unknown,
1224                        format!("Service was not ready: {}", e.into()),
1225                    )
1226                })?;
1227            let codec = tonic::codec::ProstCodec::default();
1228            let path = http::uri::PathAndQuery::from_static(
1229                "/yandex.cloud.serverless.functions.v1.FunctionService/Get",
1230            );
1231            let mut req = request.into_request();
1232            req.extensions_mut()
1233                .insert(
1234                    GrpcMethod::new(
1235                        "yandex.cloud.serverless.functions.v1.FunctionService",
1236                        "Get",
1237                    ),
1238                );
1239            self.inner.unary(req, path, codec).await
1240        }
1241        /// Retrieves the list of functions in the specified folder.
1242        pub async fn list(
1243            &mut self,
1244            request: impl tonic::IntoRequest<super::ListFunctionsRequest>,
1245        ) -> std::result::Result<
1246            tonic::Response<super::ListFunctionsResponse>,
1247            tonic::Status,
1248        > {
1249            self.inner
1250                .ready()
1251                .await
1252                .map_err(|e| {
1253                    tonic::Status::new(
1254                        tonic::Code::Unknown,
1255                        format!("Service was not ready: {}", e.into()),
1256                    )
1257                })?;
1258            let codec = tonic::codec::ProstCodec::default();
1259            let path = http::uri::PathAndQuery::from_static(
1260                "/yandex.cloud.serverless.functions.v1.FunctionService/List",
1261            );
1262            let mut req = request.into_request();
1263            req.extensions_mut()
1264                .insert(
1265                    GrpcMethod::new(
1266                        "yandex.cloud.serverless.functions.v1.FunctionService",
1267                        "List",
1268                    ),
1269                );
1270            self.inner.unary(req, path, codec).await
1271        }
1272        /// Creates a function in the specified folder.
1273        pub async fn create(
1274            &mut self,
1275            request: impl tonic::IntoRequest<super::CreateFunctionRequest>,
1276        ) -> std::result::Result<
1277            tonic::Response<super::super::super::super::operation::Operation>,
1278            tonic::Status,
1279        > {
1280            self.inner
1281                .ready()
1282                .await
1283                .map_err(|e| {
1284                    tonic::Status::new(
1285                        tonic::Code::Unknown,
1286                        format!("Service was not ready: {}", e.into()),
1287                    )
1288                })?;
1289            let codec = tonic::codec::ProstCodec::default();
1290            let path = http::uri::PathAndQuery::from_static(
1291                "/yandex.cloud.serverless.functions.v1.FunctionService/Create",
1292            );
1293            let mut req = request.into_request();
1294            req.extensions_mut()
1295                .insert(
1296                    GrpcMethod::new(
1297                        "yandex.cloud.serverless.functions.v1.FunctionService",
1298                        "Create",
1299                    ),
1300                );
1301            self.inner.unary(req, path, codec).await
1302        }
1303        /// Updates the specified function.
1304        pub async fn update(
1305            &mut self,
1306            request: impl tonic::IntoRequest<super::UpdateFunctionRequest>,
1307        ) -> std::result::Result<
1308            tonic::Response<super::super::super::super::operation::Operation>,
1309            tonic::Status,
1310        > {
1311            self.inner
1312                .ready()
1313                .await
1314                .map_err(|e| {
1315                    tonic::Status::new(
1316                        tonic::Code::Unknown,
1317                        format!("Service was not ready: {}", e.into()),
1318                    )
1319                })?;
1320            let codec = tonic::codec::ProstCodec::default();
1321            let path = http::uri::PathAndQuery::from_static(
1322                "/yandex.cloud.serverless.functions.v1.FunctionService/Update",
1323            );
1324            let mut req = request.into_request();
1325            req.extensions_mut()
1326                .insert(
1327                    GrpcMethod::new(
1328                        "yandex.cloud.serverless.functions.v1.FunctionService",
1329                        "Update",
1330                    ),
1331                );
1332            self.inner.unary(req, path, codec).await
1333        }
1334        /// Deletes the specified function.
1335        pub async fn delete(
1336            &mut self,
1337            request: impl tonic::IntoRequest<super::DeleteFunctionRequest>,
1338        ) -> std::result::Result<
1339            tonic::Response<super::super::super::super::operation::Operation>,
1340            tonic::Status,
1341        > {
1342            self.inner
1343                .ready()
1344                .await
1345                .map_err(|e| {
1346                    tonic::Status::new(
1347                        tonic::Code::Unknown,
1348                        format!("Service was not ready: {}", e.into()),
1349                    )
1350                })?;
1351            let codec = tonic::codec::ProstCodec::default();
1352            let path = http::uri::PathAndQuery::from_static(
1353                "/yandex.cloud.serverless.functions.v1.FunctionService/Delete",
1354            );
1355            let mut req = request.into_request();
1356            req.extensions_mut()
1357                .insert(
1358                    GrpcMethod::new(
1359                        "yandex.cloud.serverless.functions.v1.FunctionService",
1360                        "Delete",
1361                    ),
1362                );
1363            self.inner.unary(req, path, codec).await
1364        }
1365        /// Returns the specified version of a function.
1366        ///
1367        /// To get the list of available version, make a [ListVersions] request.
1368        pub async fn get_version(
1369            &mut self,
1370            request: impl tonic::IntoRequest<super::GetFunctionVersionRequest>,
1371        ) -> std::result::Result<tonic::Response<super::Version>, tonic::Status> {
1372            self.inner
1373                .ready()
1374                .await
1375                .map_err(|e| {
1376                    tonic::Status::new(
1377                        tonic::Code::Unknown,
1378                        format!("Service was not ready: {}", e.into()),
1379                    )
1380                })?;
1381            let codec = tonic::codec::ProstCodec::default();
1382            let path = http::uri::PathAndQuery::from_static(
1383                "/yandex.cloud.serverless.functions.v1.FunctionService/GetVersion",
1384            );
1385            let mut req = request.into_request();
1386            req.extensions_mut()
1387                .insert(
1388                    GrpcMethod::new(
1389                        "yandex.cloud.serverless.functions.v1.FunctionService",
1390                        "GetVersion",
1391                    ),
1392                );
1393            self.inner.unary(req, path, codec).await
1394        }
1395        /// Returns all versions with the specified tag.
1396        ///
1397        /// To get the list of all available versions, make a [ListVersions] request.
1398        pub async fn get_version_by_tag(
1399            &mut self,
1400            request: impl tonic::IntoRequest<super::GetFunctionVersionByTagRequest>,
1401        ) -> std::result::Result<tonic::Response<super::Version>, tonic::Status> {
1402            self.inner
1403                .ready()
1404                .await
1405                .map_err(|e| {
1406                    tonic::Status::new(
1407                        tonic::Code::Unknown,
1408                        format!("Service was not ready: {}", e.into()),
1409                    )
1410                })?;
1411            let codec = tonic::codec::ProstCodec::default();
1412            let path = http::uri::PathAndQuery::from_static(
1413                "/yandex.cloud.serverless.functions.v1.FunctionService/GetVersionByTag",
1414            );
1415            let mut req = request.into_request();
1416            req.extensions_mut()
1417                .insert(
1418                    GrpcMethod::new(
1419                        "yandex.cloud.serverless.functions.v1.FunctionService",
1420                        "GetVersionByTag",
1421                    ),
1422                );
1423            self.inner.unary(req, path, codec).await
1424        }
1425        /// Retrieves the list of versions for the specified function, or of all function versions
1426        /// in the specified folder.
1427        pub async fn list_versions(
1428            &mut self,
1429            request: impl tonic::IntoRequest<super::ListFunctionsVersionsRequest>,
1430        ) -> std::result::Result<
1431            tonic::Response<super::ListFunctionsVersionsResponse>,
1432            tonic::Status,
1433        > {
1434            self.inner
1435                .ready()
1436                .await
1437                .map_err(|e| {
1438                    tonic::Status::new(
1439                        tonic::Code::Unknown,
1440                        format!("Service was not ready: {}", e.into()),
1441                    )
1442                })?;
1443            let codec = tonic::codec::ProstCodec::default();
1444            let path = http::uri::PathAndQuery::from_static(
1445                "/yandex.cloud.serverless.functions.v1.FunctionService/ListVersions",
1446            );
1447            let mut req = request.into_request();
1448            req.extensions_mut()
1449                .insert(
1450                    GrpcMethod::new(
1451                        "yandex.cloud.serverless.functions.v1.FunctionService",
1452                        "ListVersions",
1453                    ),
1454                );
1455            self.inner.unary(req, path, codec).await
1456        }
1457        /// Deletes the specified version of a function.
1458        ///
1459        /// NOTE: old untagged function versions are deleted automatically.
1460        pub async fn delete_version(
1461            &mut self,
1462            request: impl tonic::IntoRequest<super::DeleteFunctionVersionRequest>,
1463        ) -> std::result::Result<
1464            tonic::Response<super::super::super::super::operation::Operation>,
1465            tonic::Status,
1466        > {
1467            self.inner
1468                .ready()
1469                .await
1470                .map_err(|e| {
1471                    tonic::Status::new(
1472                        tonic::Code::Unknown,
1473                        format!("Service was not ready: {}", e.into()),
1474                    )
1475                })?;
1476            let codec = tonic::codec::ProstCodec::default();
1477            let path = http::uri::PathAndQuery::from_static(
1478                "/yandex.cloud.serverless.functions.v1.FunctionService/DeleteVersion",
1479            );
1480            let mut req = request.into_request();
1481            req.extensions_mut()
1482                .insert(
1483                    GrpcMethod::new(
1484                        "yandex.cloud.serverless.functions.v1.FunctionService",
1485                        "DeleteVersion",
1486                    ),
1487                );
1488            self.inner.unary(req, path, codec).await
1489        }
1490        /// Set a tag for the specified version of a function.
1491        pub async fn set_tag(
1492            &mut self,
1493            request: impl tonic::IntoRequest<super::SetFunctionTagRequest>,
1494        ) -> std::result::Result<
1495            tonic::Response<super::super::super::super::operation::Operation>,
1496            tonic::Status,
1497        > {
1498            self.inner
1499                .ready()
1500                .await
1501                .map_err(|e| {
1502                    tonic::Status::new(
1503                        tonic::Code::Unknown,
1504                        format!("Service was not ready: {}", e.into()),
1505                    )
1506                })?;
1507            let codec = tonic::codec::ProstCodec::default();
1508            let path = http::uri::PathAndQuery::from_static(
1509                "/yandex.cloud.serverless.functions.v1.FunctionService/SetTag",
1510            );
1511            let mut req = request.into_request();
1512            req.extensions_mut()
1513                .insert(
1514                    GrpcMethod::new(
1515                        "yandex.cloud.serverless.functions.v1.FunctionService",
1516                        "SetTag",
1517                    ),
1518                );
1519            self.inner.unary(req, path, codec).await
1520        }
1521        /// Remove a tag from the specified version of a function.
1522        pub async fn remove_tag(
1523            &mut self,
1524            request: impl tonic::IntoRequest<super::RemoveFunctionTagRequest>,
1525        ) -> std::result::Result<
1526            tonic::Response<super::super::super::super::operation::Operation>,
1527            tonic::Status,
1528        > {
1529            self.inner
1530                .ready()
1531                .await
1532                .map_err(|e| {
1533                    tonic::Status::new(
1534                        tonic::Code::Unknown,
1535                        format!("Service was not ready: {}", e.into()),
1536                    )
1537                })?;
1538            let codec = tonic::codec::ProstCodec::default();
1539            let path = http::uri::PathAndQuery::from_static(
1540                "/yandex.cloud.serverless.functions.v1.FunctionService/RemoveTag",
1541            );
1542            let mut req = request.into_request();
1543            req.extensions_mut()
1544                .insert(
1545                    GrpcMethod::new(
1546                        "yandex.cloud.serverless.functions.v1.FunctionService",
1547                        "RemoveTag",
1548                    ),
1549                );
1550            self.inner.unary(req, path, codec).await
1551        }
1552        /// Returns the log of tags assigned to versions of the specified function.
1553        pub async fn list_tag_history(
1554            &mut self,
1555            request: impl tonic::IntoRequest<super::ListFunctionTagHistoryRequest>,
1556        ) -> std::result::Result<
1557            tonic::Response<super::ListFunctionTagHistoryResponse>,
1558            tonic::Status,
1559        > {
1560            self.inner
1561                .ready()
1562                .await
1563                .map_err(|e| {
1564                    tonic::Status::new(
1565                        tonic::Code::Unknown,
1566                        format!("Service was not ready: {}", e.into()),
1567                    )
1568                })?;
1569            let codec = tonic::codec::ProstCodec::default();
1570            let path = http::uri::PathAndQuery::from_static(
1571                "/yandex.cloud.serverless.functions.v1.FunctionService/ListTagHistory",
1572            );
1573            let mut req = request.into_request();
1574            req.extensions_mut()
1575                .insert(
1576                    GrpcMethod::new(
1577                        "yandex.cloud.serverless.functions.v1.FunctionService",
1578                        "ListTagHistory",
1579                    ),
1580                );
1581            self.inner.unary(req, path, codec).await
1582        }
1583        /// Creates a version for the specified function.
1584        pub async fn create_version(
1585            &mut self,
1586            request: impl tonic::IntoRequest<super::CreateFunctionVersionRequest>,
1587        ) -> std::result::Result<
1588            tonic::Response<super::super::super::super::operation::Operation>,
1589            tonic::Status,
1590        > {
1591            self.inner
1592                .ready()
1593                .await
1594                .map_err(|e| {
1595                    tonic::Status::new(
1596                        tonic::Code::Unknown,
1597                        format!("Service was not ready: {}", e.into()),
1598                    )
1599                })?;
1600            let codec = tonic::codec::ProstCodec::default();
1601            let path = http::uri::PathAndQuery::from_static(
1602                "/yandex.cloud.serverless.functions.v1.FunctionService/CreateVersion",
1603            );
1604            let mut req = request.into_request();
1605            req.extensions_mut()
1606                .insert(
1607                    GrpcMethod::new(
1608                        "yandex.cloud.serverless.functions.v1.FunctionService",
1609                        "CreateVersion",
1610                    ),
1611                );
1612            self.inner.unary(req, path, codec).await
1613        }
1614        /// Lists available runtime environments for the specified function.
1615        pub async fn list_runtimes(
1616            &mut self,
1617            request: impl tonic::IntoRequest<super::ListRuntimesRequest>,
1618        ) -> std::result::Result<
1619            tonic::Response<super::ListRuntimesResponse>,
1620            tonic::Status,
1621        > {
1622            self.inner
1623                .ready()
1624                .await
1625                .map_err(|e| {
1626                    tonic::Status::new(
1627                        tonic::Code::Unknown,
1628                        format!("Service was not ready: {}", e.into()),
1629                    )
1630                })?;
1631            let codec = tonic::codec::ProstCodec::default();
1632            let path = http::uri::PathAndQuery::from_static(
1633                "/yandex.cloud.serverless.functions.v1.FunctionService/ListRuntimes",
1634            );
1635            let mut req = request.into_request();
1636            req.extensions_mut()
1637                .insert(
1638                    GrpcMethod::new(
1639                        "yandex.cloud.serverless.functions.v1.FunctionService",
1640                        "ListRuntimes",
1641                    ),
1642                );
1643            self.inner.unary(req, path, codec).await
1644        }
1645        /// Lists operations for the specified function.
1646        pub async fn list_operations(
1647            &mut self,
1648            request: impl tonic::IntoRequest<super::ListFunctionOperationsRequest>,
1649        ) -> std::result::Result<
1650            tonic::Response<super::ListFunctionOperationsResponse>,
1651            tonic::Status,
1652        > {
1653            self.inner
1654                .ready()
1655                .await
1656                .map_err(|e| {
1657                    tonic::Status::new(
1658                        tonic::Code::Unknown,
1659                        format!("Service was not ready: {}", e.into()),
1660                    )
1661                })?;
1662            let codec = tonic::codec::ProstCodec::default();
1663            let path = http::uri::PathAndQuery::from_static(
1664                "/yandex.cloud.serverless.functions.v1.FunctionService/ListOperations",
1665            );
1666            let mut req = request.into_request();
1667            req.extensions_mut()
1668                .insert(
1669                    GrpcMethod::new(
1670                        "yandex.cloud.serverless.functions.v1.FunctionService",
1671                        "ListOperations",
1672                    ),
1673                );
1674            self.inner.unary(req, path, codec).await
1675        }
1676        /// Lists existing access bindings for the specified function.
1677        pub async fn list_access_bindings(
1678            &mut self,
1679            request: impl tonic::IntoRequest<
1680                super::super::super::super::access::ListAccessBindingsRequest,
1681            >,
1682        ) -> std::result::Result<
1683            tonic::Response<
1684                super::super::super::super::access::ListAccessBindingsResponse,
1685            >,
1686            tonic::Status,
1687        > {
1688            self.inner
1689                .ready()
1690                .await
1691                .map_err(|e| {
1692                    tonic::Status::new(
1693                        tonic::Code::Unknown,
1694                        format!("Service was not ready: {}", e.into()),
1695                    )
1696                })?;
1697            let codec = tonic::codec::ProstCodec::default();
1698            let path = http::uri::PathAndQuery::from_static(
1699                "/yandex.cloud.serverless.functions.v1.FunctionService/ListAccessBindings",
1700            );
1701            let mut req = request.into_request();
1702            req.extensions_mut()
1703                .insert(
1704                    GrpcMethod::new(
1705                        "yandex.cloud.serverless.functions.v1.FunctionService",
1706                        "ListAccessBindings",
1707                    ),
1708                );
1709            self.inner.unary(req, path, codec).await
1710        }
1711        /// Sets access bindings for the function.
1712        pub async fn set_access_bindings(
1713            &mut self,
1714            request: impl tonic::IntoRequest<
1715                super::super::super::super::access::SetAccessBindingsRequest,
1716            >,
1717        ) -> std::result::Result<
1718            tonic::Response<super::super::super::super::operation::Operation>,
1719            tonic::Status,
1720        > {
1721            self.inner
1722                .ready()
1723                .await
1724                .map_err(|e| {
1725                    tonic::Status::new(
1726                        tonic::Code::Unknown,
1727                        format!("Service was not ready: {}", e.into()),
1728                    )
1729                })?;
1730            let codec = tonic::codec::ProstCodec::default();
1731            let path = http::uri::PathAndQuery::from_static(
1732                "/yandex.cloud.serverless.functions.v1.FunctionService/SetAccessBindings",
1733            );
1734            let mut req = request.into_request();
1735            req.extensions_mut()
1736                .insert(
1737                    GrpcMethod::new(
1738                        "yandex.cloud.serverless.functions.v1.FunctionService",
1739                        "SetAccessBindings",
1740                    ),
1741                );
1742            self.inner.unary(req, path, codec).await
1743        }
1744        /// Updates access bindings for the specified function.
1745        pub async fn update_access_bindings(
1746            &mut self,
1747            request: impl tonic::IntoRequest<
1748                super::super::super::super::access::UpdateAccessBindingsRequest,
1749            >,
1750        ) -> std::result::Result<
1751            tonic::Response<super::super::super::super::operation::Operation>,
1752            tonic::Status,
1753        > {
1754            self.inner
1755                .ready()
1756                .await
1757                .map_err(|e| {
1758                    tonic::Status::new(
1759                        tonic::Code::Unknown,
1760                        format!("Service was not ready: {}", e.into()),
1761                    )
1762                })?;
1763            let codec = tonic::codec::ProstCodec::default();
1764            let path = http::uri::PathAndQuery::from_static(
1765                "/yandex.cloud.serverless.functions.v1.FunctionService/UpdateAccessBindings",
1766            );
1767            let mut req = request.into_request();
1768            req.extensions_mut()
1769                .insert(
1770                    GrpcMethod::new(
1771                        "yandex.cloud.serverless.functions.v1.FunctionService",
1772                        "UpdateAccessBindings",
1773                    ),
1774                );
1775            self.inner.unary(req, path, codec).await
1776        }
1777        /// Lists existing scaling policies for specified function
1778        pub async fn list_scaling_policies(
1779            &mut self,
1780            request: impl tonic::IntoRequest<super::ListScalingPoliciesRequest>,
1781        ) -> std::result::Result<
1782            tonic::Response<super::ListScalingPoliciesResponse>,
1783            tonic::Status,
1784        > {
1785            self.inner
1786                .ready()
1787                .await
1788                .map_err(|e| {
1789                    tonic::Status::new(
1790                        tonic::Code::Unknown,
1791                        format!("Service was not ready: {}", e.into()),
1792                    )
1793                })?;
1794            let codec = tonic::codec::ProstCodec::default();
1795            let path = http::uri::PathAndQuery::from_static(
1796                "/yandex.cloud.serverless.functions.v1.FunctionService/ListScalingPolicies",
1797            );
1798            let mut req = request.into_request();
1799            req.extensions_mut()
1800                .insert(
1801                    GrpcMethod::new(
1802                        "yandex.cloud.serverless.functions.v1.FunctionService",
1803                        "ListScalingPolicies",
1804                    ),
1805                );
1806            self.inner.unary(req, path, codec).await
1807        }
1808        /// Set scaling policy for specified function and tag
1809        pub async fn set_scaling_policy(
1810            &mut self,
1811            request: impl tonic::IntoRequest<super::SetScalingPolicyRequest>,
1812        ) -> std::result::Result<
1813            tonic::Response<super::super::super::super::operation::Operation>,
1814            tonic::Status,
1815        > {
1816            self.inner
1817                .ready()
1818                .await
1819                .map_err(|e| {
1820                    tonic::Status::new(
1821                        tonic::Code::Unknown,
1822                        format!("Service was not ready: {}", e.into()),
1823                    )
1824                })?;
1825            let codec = tonic::codec::ProstCodec::default();
1826            let path = http::uri::PathAndQuery::from_static(
1827                "/yandex.cloud.serverless.functions.v1.FunctionService/SetScalingPolicy",
1828            );
1829            let mut req = request.into_request();
1830            req.extensions_mut()
1831                .insert(
1832                    GrpcMethod::new(
1833                        "yandex.cloud.serverless.functions.v1.FunctionService",
1834                        "SetScalingPolicy",
1835                    ),
1836                );
1837            self.inner.unary(req, path, codec).await
1838        }
1839        /// Remove scaling policy for specified function and tag
1840        pub async fn remove_scaling_policy(
1841            &mut self,
1842            request: impl tonic::IntoRequest<super::RemoveScalingPolicyRequest>,
1843        ) -> std::result::Result<
1844            tonic::Response<super::super::super::super::operation::Operation>,
1845            tonic::Status,
1846        > {
1847            self.inner
1848                .ready()
1849                .await
1850                .map_err(|e| {
1851                    tonic::Status::new(
1852                        tonic::Code::Unknown,
1853                        format!("Service was not ready: {}", e.into()),
1854                    )
1855                })?;
1856            let codec = tonic::codec::ProstCodec::default();
1857            let path = http::uri::PathAndQuery::from_static(
1858                "/yandex.cloud.serverless.functions.v1.FunctionService/RemoveScalingPolicy",
1859            );
1860            let mut req = request.into_request();
1861            req.extensions_mut()
1862                .insert(
1863                    GrpcMethod::new(
1864                        "yandex.cloud.serverless.functions.v1.FunctionService",
1865                        "RemoveScalingPolicy",
1866                    ),
1867                );
1868            self.inner.unary(req, path, codec).await
1869        }
1870    }
1871}
1872/// A VPC network used in serverless resources.
1873#[allow(clippy::derive_partial_eq_without_eq)]
1874#[derive(Clone, PartialEq, ::prost::Message)]
1875pub struct UsedNetwork {
1876    /// ID of the VPC network.
1877    #[prost(string, tag = "1")]
1878    pub network_id: ::prost::alloc::string::String,
1879    /// ID of the cloud that the network belongs to.
1880    #[prost(string, tag = "2")]
1881    pub cloud_id: ::prost::alloc::string::String,
1882    /// ID of the folder that the network belongs to.
1883    #[prost(string, tag = "3")]
1884    pub folder_id: ::prost::alloc::string::String,
1885    /// Status of the network.
1886    #[prost(enumeration = "used_network::Status", tag = "4")]
1887    pub status: i32,
1888    /// Clean-up timestamp of the obsolete network.
1889    #[prost(message, optional, tag = "5")]
1890    pub will_be_cleaned_up_at: ::core::option::Option<::prost_types::Timestamp>,
1891    /// Number of serverless resources connected to the network.
1892    #[prost(int64, tag = "6")]
1893    pub connections_count: i64,
1894}
1895/// Nested message and enum types in `UsedNetwork`.
1896pub mod used_network {
1897    #[derive(
1898        Clone,
1899        Copy,
1900        Debug,
1901        PartialEq,
1902        Eq,
1903        Hash,
1904        PartialOrd,
1905        Ord,
1906        ::prost::Enumeration
1907    )]
1908    #[repr(i32)]
1909    pub enum Status {
1910        Unspecified = 0,
1911        /// Network is connecting to its first serverless resource.
1912        Creating = 1,
1913        /// Network is already being used by some serverless resources.
1914        Active = 2,
1915        /// Network is no longer used by any serverless resources.
1916        /// It will be cleaned-up after a while.
1917        Obsolete = 3,
1918    }
1919    impl Status {
1920        /// String value of the enum field names used in the ProtoBuf definition.
1921        ///
1922        /// The values are not transformed in any way and thus are considered stable
1923        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1924        pub fn as_str_name(&self) -> &'static str {
1925            match self {
1926                Status::Unspecified => "STATUS_UNSPECIFIED",
1927                Status::Creating => "CREATING",
1928                Status::Active => "ACTIVE",
1929                Status::Obsolete => "OBSOLETE",
1930            }
1931        }
1932        /// Creates an enum from field names used in the ProtoBuf definition.
1933        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1934            match value {
1935                "STATUS_UNSPECIFIED" => Some(Self::Unspecified),
1936                "CREATING" => Some(Self::Creating),
1937                "ACTIVE" => Some(Self::Active),
1938                "OBSOLETE" => Some(Self::Obsolete),
1939                _ => None,
1940            }
1941        }
1942    }
1943}
1944#[allow(clippy::derive_partial_eq_without_eq)]
1945#[derive(Clone, PartialEq, ::prost::Message)]
1946pub struct GetUsedNetworkRequest {
1947    /// ID of the network to return.
1948    #[prost(string, tag = "1")]
1949    pub network_id: ::prost::alloc::string::String,
1950}
1951#[allow(clippy::derive_partial_eq_without_eq)]
1952#[derive(Clone, PartialEq, ::prost::Message)]
1953pub struct ListUsedNetworksRequest {
1954    /// The maximum number of results per page to return. If the number of available
1955    /// results is larger than `pageSize`, the service returns a \[ListUsedNetworksResponse.next_page_token\]
1956    /// that can be used to get the next page of results in subsequent list requests.
1957    ///
1958    /// Default value: 100.
1959    #[prost(int64, tag = "1")]
1960    pub page_size: i64,
1961    /// Page token. To get the next page of results, set `pageToken` to the
1962    /// \[ListUsedNetworksResponse.next_page_token\] returned by a previous list request.
1963    #[prost(string, tag = "2")]
1964    pub page_token: ::prost::alloc::string::String,
1965    #[prost(oneof = "list_used_networks_request::Scope", tags = "3, 4")]
1966    pub scope: ::core::option::Option<list_used_networks_request::Scope>,
1967}
1968/// Nested message and enum types in `ListUsedNetworksRequest`.
1969pub mod list_used_networks_request {
1970    #[allow(clippy::derive_partial_eq_without_eq)]
1971    #[derive(Clone, PartialEq, ::prost::Oneof)]
1972    pub enum Scope {
1973        /// ID of the cloud to list used networks in.
1974        #[prost(string, tag = "3")]
1975        CloudId(::prost::alloc::string::String),
1976        /// ID of the folder to list used networks in.
1977        #[prost(string, tag = "4")]
1978        FolderId(::prost::alloc::string::String),
1979    }
1980}
1981#[allow(clippy::derive_partial_eq_without_eq)]
1982#[derive(Clone, PartialEq, ::prost::Message)]
1983pub struct ListUsedNetworksResponse {
1984    /// List of used networks in the specified scope.
1985    #[prost(message, repeated, tag = "1")]
1986    pub networks: ::prost::alloc::vec::Vec<UsedNetwork>,
1987    /// Token for getting the next page of the list. If the number of results is greater than
1988    /// the specified \[ListUsedNetworksRequest.page_size\], use `nextPageToken` as the value
1989    /// for the \[ListUsedNetworksRequest.page_token\] parameter in the next list request.
1990    ///
1991    /// Each subsequent page will have its own `nextPageToken` to continue paging through the results.
1992    #[prost(string, tag = "2")]
1993    pub next_page_token: ::prost::alloc::string::String,
1994}
1995#[allow(clippy::derive_partial_eq_without_eq)]
1996#[derive(Clone, PartialEq, ::prost::Message)]
1997pub struct ListConnectedResourcesRequest {
1998    /// The maximum number of results per page to return. If the number of available
1999    /// results is larger than `pageSize`, the service returns a \[ListConnectedResourcesResponse.next_page_token\]
2000    /// that can be used to get the next page of results in subsequent list requests.
2001    ///
2002    /// Default value: 100.
2003    #[prost(int64, tag = "1")]
2004    pub page_size: i64,
2005    /// Page token. To get the next page of results, set `pageToken` to the
2006    /// \[ListConnectedResourcesResponse.next_page_token\] returned by a previous list request.
2007    #[prost(string, tag = "2")]
2008    pub page_token: ::prost::alloc::string::String,
2009    #[prost(oneof = "list_connected_resources_request::NetworkScope", tags = "3, 4, 5")]
2010    pub network_scope: ::core::option::Option<
2011        list_connected_resources_request::NetworkScope,
2012    >,
2013}
2014/// Nested message and enum types in `ListConnectedResourcesRequest`.
2015pub mod list_connected_resources_request {
2016    #[allow(clippy::derive_partial_eq_without_eq)]
2017    #[derive(Clone, PartialEq, ::prost::Oneof)]
2018    pub enum NetworkScope {
2019        /// ID of the network to list serverless resources connected to it.
2020        #[prost(string, tag = "3")]
2021        NetworkId(::prost::alloc::string::String),
2022        /// ID of the cloud to list serverless resources connected to any network from it.
2023        #[prost(string, tag = "4")]
2024        CloudId(::prost::alloc::string::String),
2025        /// ID of the folder to list serverless resources connected to any network from it.
2026        #[prost(string, tag = "5")]
2027        FolderId(::prost::alloc::string::String),
2028    }
2029}
2030#[allow(clippy::derive_partial_eq_without_eq)]
2031#[derive(Clone, PartialEq, ::prost::Message)]
2032pub struct ListConnectedResourcesResponse {
2033    /// List of serverless resources connected to any network from the specified scope.
2034    #[prost(message, repeated, tag = "1")]
2035    pub resources: ::prost::alloc::vec::Vec<
2036        list_connected_resources_response::ConnectedResource,
2037    >,
2038    /// Token for getting the next page of the list. If the number of results is greater than
2039    /// the specified \[ListConnectedResourcesRequest.page_size\], use `nextPageToken` as the value
2040    /// for the \[ListConnectedResourcesRequest.page_token\] parameter in the next list request.
2041    ///
2042    /// Each subsequent page will have its own `nextPageToken` to continue paging through the results.
2043    #[prost(string, tag = "2")]
2044    pub next_page_token: ::prost::alloc::string::String,
2045}
2046/// Nested message and enum types in `ListConnectedResourcesResponse`.
2047pub mod list_connected_resources_response {
2048    /// Serverless resource connected to VPC network.
2049    #[allow(clippy::derive_partial_eq_without_eq)]
2050    #[derive(Clone, PartialEq, ::prost::Message)]
2051    pub struct ConnectedResource {
2052        /// ID of the network to which the resource is connected.
2053        #[prost(string, tag = "1")]
2054        pub network_id: ::prost::alloc::string::String,
2055        /// Type of the serverless resource.
2056        #[prost(string, tag = "2")]
2057        pub resource_type: ::prost::alloc::string::String,
2058        /// ID of the serverless resource.
2059        #[prost(string, tag = "3")]
2060        pub resource_id: ::prost::alloc::string::String,
2061        /// Type of the serverless subresource.
2062        #[prost(string, tag = "4")]
2063        pub subresource_type: ::prost::alloc::string::String,
2064        /// ID of the serverless subresource.
2065        #[prost(string, tag = "5")]
2066        pub subresource_id: ::prost::alloc::string::String,
2067        /// ID of the cloud that the resource belongs to.
2068        #[prost(string, tag = "6")]
2069        pub resource_cloud_id: ::prost::alloc::string::String,
2070        /// ID of the folder thar the resource belongs to.
2071        #[prost(string, tag = "7")]
2072        pub resource_folder_id: ::prost::alloc::string::String,
2073    }
2074}
2075#[allow(clippy::derive_partial_eq_without_eq)]
2076#[derive(Clone, PartialEq, ::prost::Message)]
2077pub struct TriggerUsedNetworkCleanupRequest {
2078    /// ID of the obsolete network to start the cleanup process for.
2079    #[prost(string, tag = "1")]
2080    pub network_id: ::prost::alloc::string::String,
2081}
2082#[allow(clippy::derive_partial_eq_without_eq)]
2083#[derive(Clone, PartialEq, ::prost::Message)]
2084pub struct TriggerUsedNetworkCleanupResponse {
2085    /// Timestamp when cleanup of the specified network will be started.
2086    #[prost(message, optional, tag = "1")]
2087    pub network_cleanup_time: ::core::option::Option<::prost_types::Timestamp>,
2088}
2089/// Generated client implementations.
2090pub mod network_service_client {
2091    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
2092    use tonic::codegen::*;
2093    use tonic::codegen::http::Uri;
2094    /// A set of methods for managing VPC networks connected to serverless resources.
2095    #[derive(Debug, Clone)]
2096    pub struct NetworkServiceClient<T> {
2097        inner: tonic::client::Grpc<T>,
2098    }
2099    impl NetworkServiceClient<tonic::transport::Channel> {
2100        /// Attempt to create a new client by connecting to a given endpoint.
2101        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
2102        where
2103            D: TryInto<tonic::transport::Endpoint>,
2104            D::Error: Into<StdError>,
2105        {
2106            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
2107            Ok(Self::new(conn))
2108        }
2109    }
2110    impl<T> NetworkServiceClient<T>
2111    where
2112        T: tonic::client::GrpcService<tonic::body::BoxBody>,
2113        T::Error: Into<StdError>,
2114        T::ResponseBody: Body<Data = Bytes> + Send + 'static,
2115        <T::ResponseBody as Body>::Error: Into<StdError> + Send,
2116    {
2117        pub fn new(inner: T) -> Self {
2118            let inner = tonic::client::Grpc::new(inner);
2119            Self { inner }
2120        }
2121        pub fn with_origin(inner: T, origin: Uri) -> Self {
2122            let inner = tonic::client::Grpc::with_origin(inner, origin);
2123            Self { inner }
2124        }
2125        pub fn with_interceptor<F>(
2126            inner: T,
2127            interceptor: F,
2128        ) -> NetworkServiceClient<InterceptedService<T, F>>
2129        where
2130            F: tonic::service::Interceptor,
2131            T::ResponseBody: Default,
2132            T: tonic::codegen::Service<
2133                http::Request<tonic::body::BoxBody>,
2134                Response = http::Response<
2135                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
2136                >,
2137            >,
2138            <T as tonic::codegen::Service<
2139                http::Request<tonic::body::BoxBody>,
2140            >>::Error: Into<StdError> + Send + Sync,
2141        {
2142            NetworkServiceClient::new(InterceptedService::new(inner, interceptor))
2143        }
2144        /// Compress requests with the given encoding.
2145        ///
2146        /// This requires the server to support it otherwise it might respond with an
2147        /// error.
2148        #[must_use]
2149        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2150            self.inner = self.inner.send_compressed(encoding);
2151            self
2152        }
2153        /// Enable decompressing responses.
2154        #[must_use]
2155        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2156            self.inner = self.inner.accept_compressed(encoding);
2157            self
2158        }
2159        /// Limits the maximum size of a decoded message.
2160        ///
2161        /// Default: `4MB`
2162        #[must_use]
2163        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2164            self.inner = self.inner.max_decoding_message_size(limit);
2165            self
2166        }
2167        /// Limits the maximum size of an encoded message.
2168        ///
2169        /// Default: `usize::MAX`
2170        #[must_use]
2171        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2172            self.inner = self.inner.max_encoding_message_size(limit);
2173            self
2174        }
2175        /// Returns the specified network used in serverless resources.
2176        pub async fn get_used(
2177            &mut self,
2178            request: impl tonic::IntoRequest<super::GetUsedNetworkRequest>,
2179        ) -> std::result::Result<tonic::Response<super::UsedNetwork>, tonic::Status> {
2180            self.inner
2181                .ready()
2182                .await
2183                .map_err(|e| {
2184                    tonic::Status::new(
2185                        tonic::Code::Unknown,
2186                        format!("Service was not ready: {}", e.into()),
2187                    )
2188                })?;
2189            let codec = tonic::codec::ProstCodec::default();
2190            let path = http::uri::PathAndQuery::from_static(
2191                "/yandex.cloud.serverless.functions.v1.NetworkService/GetUsed",
2192            );
2193            let mut req = request.into_request();
2194            req.extensions_mut()
2195                .insert(
2196                    GrpcMethod::new(
2197                        "yandex.cloud.serverless.functions.v1.NetworkService",
2198                        "GetUsed",
2199                    ),
2200                );
2201            self.inner.unary(req, path, codec).await
2202        }
2203        /// Retrieves the list of networks in the specified scope that are used in serverless resources.
2204        pub async fn list_used(
2205            &mut self,
2206            request: impl tonic::IntoRequest<super::ListUsedNetworksRequest>,
2207        ) -> std::result::Result<
2208            tonic::Response<super::ListUsedNetworksResponse>,
2209            tonic::Status,
2210        > {
2211            self.inner
2212                .ready()
2213                .await
2214                .map_err(|e| {
2215                    tonic::Status::new(
2216                        tonic::Code::Unknown,
2217                        format!("Service was not ready: {}", e.into()),
2218                    )
2219                })?;
2220            let codec = tonic::codec::ProstCodec::default();
2221            let path = http::uri::PathAndQuery::from_static(
2222                "/yandex.cloud.serverless.functions.v1.NetworkService/ListUsed",
2223            );
2224            let mut req = request.into_request();
2225            req.extensions_mut()
2226                .insert(
2227                    GrpcMethod::new(
2228                        "yandex.cloud.serverless.functions.v1.NetworkService",
2229                        "ListUsed",
2230                    ),
2231                );
2232            self.inner.unary(req, path, codec).await
2233        }
2234        /// Retrieves the list of serverless resources connected to any network from the specified scope.
2235        pub async fn list_connected_resources(
2236            &mut self,
2237            request: impl tonic::IntoRequest<super::ListConnectedResourcesRequest>,
2238        ) -> std::result::Result<
2239            tonic::Response<super::ListConnectedResourcesResponse>,
2240            tonic::Status,
2241        > {
2242            self.inner
2243                .ready()
2244                .await
2245                .map_err(|e| {
2246                    tonic::Status::new(
2247                        tonic::Code::Unknown,
2248                        format!("Service was not ready: {}", e.into()),
2249                    )
2250                })?;
2251            let codec = tonic::codec::ProstCodec::default();
2252            let path = http::uri::PathAndQuery::from_static(
2253                "/yandex.cloud.serverless.functions.v1.NetworkService/ListConnectedResources",
2254            );
2255            let mut req = request.into_request();
2256            req.extensions_mut()
2257                .insert(
2258                    GrpcMethod::new(
2259                        "yandex.cloud.serverless.functions.v1.NetworkService",
2260                        "ListConnectedResources",
2261                    ),
2262                );
2263            self.inner.unary(req, path, codec).await
2264        }
2265        /// Forces obsolete used network to start cleanup process as soon as possible.
2266        /// Invocation does not wait for start or end of the cleanup process.
2267        /// Second invocation with the same network does nothing until network is completely cleaned-up.
2268        pub async fn trigger_used_cleanup(
2269            &mut self,
2270            request: impl tonic::IntoRequest<super::TriggerUsedNetworkCleanupRequest>,
2271        ) -> std::result::Result<
2272            tonic::Response<super::TriggerUsedNetworkCleanupResponse>,
2273            tonic::Status,
2274        > {
2275            self.inner
2276                .ready()
2277                .await
2278                .map_err(|e| {
2279                    tonic::Status::new(
2280                        tonic::Code::Unknown,
2281                        format!("Service was not ready: {}", e.into()),
2282                    )
2283                })?;
2284            let codec = tonic::codec::ProstCodec::default();
2285            let path = http::uri::PathAndQuery::from_static(
2286                "/yandex.cloud.serverless.functions.v1.NetworkService/TriggerUsedCleanup",
2287            );
2288            let mut req = request.into_request();
2289            req.extensions_mut()
2290                .insert(
2291                    GrpcMethod::new(
2292                        "yandex.cloud.serverless.functions.v1.NetworkService",
2293                        "TriggerUsedCleanup",
2294                    ),
2295                );
2296            self.inner.unary(req, path, codec).await
2297        }
2298    }
2299}