1#[allow(clippy::derive_partial_eq_without_eq)]
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct Function {
5 #[prost(string, tag = "1")]
7 pub id: ::prost::alloc::string::String,
8 #[prost(string, tag = "2")]
10 pub folder_id: ::prost::alloc::string::String,
11 #[prost(message, optional, tag = "3")]
13 pub created_at: ::core::option::Option<::prost_types::Timestamp>,
14 #[prost(string, tag = "4")]
16 pub name: ::prost::alloc::string::String,
17 #[prost(string, tag = "5")]
19 pub description: ::prost::alloc::string::String,
20 #[prost(map = "string, string", tag = "6")]
22 pub labels: ::std::collections::HashMap<
23 ::prost::alloc::string::String,
24 ::prost::alloc::string::String,
25 >,
26 #[prost(string, tag = "8")]
28 pub http_invoke_url: ::prost::alloc::string::String,
29 #[prost(enumeration = "function::Status", tag = "9")]
31 pub status: i32,
32}
33pub 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 Creating = 1,
51 Active = 2,
53 Deleting = 3,
55 Error = 4,
57 }
58 impl Status {
59 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 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#[allow(clippy::derive_partial_eq_without_eq)]
87#[derive(Clone, PartialEq, ::prost::Message)]
88pub struct Version {
89 #[prost(string, tag = "1")]
91 pub id: ::prost::alloc::string::String,
92 #[prost(string, tag = "2")]
94 pub function_id: ::prost::alloc::string::String,
95 #[prost(string, tag = "3")]
97 pub description: ::prost::alloc::string::String,
98 #[prost(message, optional, tag = "5")]
100 pub created_at: ::core::option::Option<::prost_types::Timestamp>,
101 #[prost(string, tag = "6")]
105 pub runtime: ::prost::alloc::string::String,
106 #[prost(string, tag = "7")]
110 pub entrypoint: ::prost::alloc::string::String,
111 #[prost(message, optional, tag = "8")]
113 pub resources: ::core::option::Option<Resources>,
114 #[prost(message, optional, tag = "9")]
118 pub execution_timeout: ::core::option::Option<::prost_types::Duration>,
119 #[prost(string, tag = "10")]
121 pub service_account_id: ::prost::alloc::string::String,
122 #[prost(int64, tag = "12")]
124 pub image_size: i64,
125 #[prost(enumeration = "version::Status", tag = "13")]
127 pub status: i32,
128 #[prost(string, repeated, tag = "14")]
130 pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
131 #[prost(map = "string, string", tag = "16")]
133 pub environment: ::std::collections::HashMap<
134 ::prost::alloc::string::String,
135 ::prost::alloc::string::String,
136 >,
137 #[prost(message, optional, tag = "17")]
139 pub connectivity: ::core::option::Option<Connectivity>,
140 #[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 #[prost(message, repeated, tag = "19")]
148 pub secrets: ::prost::alloc::vec::Vec<Secret>,
149 #[prost(message, optional, tag = "20")]
151 pub log_options: ::core::option::Option<LogOptions>,
152 #[prost(message, repeated, tag = "21")]
154 pub storage_mounts: ::prost::alloc::vec::Vec<StorageMount>,
155 #[prost(message, optional, tag = "22")]
157 pub async_invocation_config: ::core::option::Option<AsyncInvocationConfig>,
158 #[prost(int64, tag = "23")]
160 pub tmpfs_size: i64,
161 #[prost(int64, tag = "24")]
163 pub concurrency: i64,
164 #[prost(message, repeated, tag = "25")]
166 pub mounts: ::prost::alloc::vec::Vec<Mount>,
167 #[prost(message, optional, tag = "26")]
169 pub metadata_options: ::core::option::Option<MetadataOptions>,
170}
171pub 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 Creating = 1,
189 Active = 2,
191 Obsolete = 3,
193 Deleting = 4,
195 }
196 impl Status {
197 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 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#[allow(clippy::derive_partial_eq_without_eq)]
225#[derive(Clone, PartialEq, ::prost::Message)]
226pub struct Resources {
227 #[prost(int64, tag = "1")]
229 pub memory: i64,
230}
231#[allow(clippy::derive_partial_eq_without_eq)]
233#[derive(Clone, PartialEq, ::prost::Message)]
234pub struct Package {
235 #[prost(string, tag = "1")]
237 pub bucket_name: ::prost::alloc::string::String,
238 #[prost(string, tag = "2")]
240 pub object_name: ::prost::alloc::string::String,
241 #[prost(string, tag = "3")]
243 pub sha256: ::prost::alloc::string::String,
244}
245#[allow(clippy::derive_partial_eq_without_eq)]
247#[derive(Clone, PartialEq, ::prost::Message)]
248pub struct Connectivity {
249 #[prost(string, tag = "1")]
252 pub network_id: ::prost::alloc::string::String,
253 #[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 #[prost(string, tag = "1")]
263 pub function_id: ::prost::alloc::string::String,
264 #[prost(string, tag = "2")]
266 pub tag: ::prost::alloc::string::String,
267 #[prost(message, optional, tag = "3")]
269 pub created_at: ::core::option::Option<::prost_types::Timestamp>,
270 #[prost(message, optional, tag = "4")]
272 pub modified_at: ::core::option::Option<::prost_types::Timestamp>,
273 #[prost(int64, tag = "6")]
276 pub provisioned_instances_count: i64,
277 #[prost(int64, tag = "7")]
280 pub zone_instances_limit: i64,
281 #[prost(int64, tag = "8")]
284 pub zone_requests_limit: i64,
285}
286#[allow(clippy::derive_partial_eq_without_eq)]
288#[derive(Clone, PartialEq, ::prost::Message)]
289pub struct Secret {
290 #[prost(string, tag = "1")]
292 pub id: ::prost::alloc::string::String,
293 #[prost(string, tag = "2")]
295 pub version_id: ::prost::alloc::string::String,
296 #[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}
302pub mod secret {
304 #[allow(clippy::derive_partial_eq_without_eq)]
305 #[derive(Clone, PartialEq, ::prost::Oneof)]
306 pub enum Reference {
307 #[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 #[prost(bool, tag = "1")]
317 pub disabled: bool,
318 #[prost(
322 enumeration = "super::super::super::logging::v1::log_level::Level",
323 tag = "4"
324 )]
325 pub min_level: i32,
326 #[prost(oneof = "log_options::Destination", tags = "2, 3")]
328 pub destination: ::core::option::Option<log_options::Destination>,
329}
330pub mod log_options {
332 #[allow(clippy::derive_partial_eq_without_eq)]
334 #[derive(Clone, PartialEq, ::prost::Oneof)]
335 pub enum Destination {
336 #[prost(string, tag = "2")]
338 LogGroupId(::prost::alloc::string::String),
339 #[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 #[prost(string, tag = "1")]
349 pub bucket_id: ::prost::alloc::string::String,
350 #[prost(string, tag = "2")]
352 pub prefix: ::prost::alloc::string::String,
353 #[prost(string, tag = "3")]
355 pub mount_point_name: ::prost::alloc::string::String,
356 #[prost(bool, tag = "4")]
358 pub read_only: bool,
359}
360#[allow(clippy::derive_partial_eq_without_eq)]
362#[derive(Clone, PartialEq, ::prost::Message)]
363pub struct Mount {
364 #[prost(string, tag = "1")]
366 pub name: ::prost::alloc::string::String,
367 #[prost(enumeration = "mount::Mode", tag = "3")]
369 pub mode: i32,
370 #[prost(oneof = "mount::Target", tags = "10, 11")]
372 pub target: ::core::option::Option<mount::Target>,
373}
374pub mod mount {
376 #[allow(clippy::derive_partial_eq_without_eq)]
378 #[derive(Clone, PartialEq, ::prost::Message)]
379 pub struct ObjectStorage {
380 #[prost(string, tag = "1")]
382 pub bucket_id: ::prost::alloc::string::String,
383 #[prost(string, tag = "2")]
385 pub prefix: ::prost::alloc::string::String,
386 }
387 #[allow(clippy::derive_partial_eq_without_eq)]
389 #[derive(Clone, PartialEq, ::prost::Message)]
390 pub struct DiskSpec {
391 #[prost(int64, tag = "1")]
393 pub size: i64,
394 #[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 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 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 #[allow(clippy::derive_partial_eq_without_eq)]
439 #[derive(Clone, PartialEq, ::prost::Oneof)]
440 pub enum Target {
441 #[prost(message, tag = "10")]
443 ObjectStorage(ObjectStorage),
444 #[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 #[prost(int64, tag = "1")]
454 pub retries_count: i64,
455 #[prost(message, optional, tag = "2")]
457 pub success_target: ::core::option::Option<async_invocation_config::ResponseTarget>,
458 #[prost(message, optional, tag = "3")]
460 pub failure_target: ::core::option::Option<async_invocation_config::ResponseTarget>,
461 #[prost(string, tag = "4")]
463 pub service_account_id: ::prost::alloc::string::String,
464}
465pub mod async_invocation_config {
467 #[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 pub mod response_target {
476 #[allow(clippy::derive_partial_eq_without_eq)]
477 #[derive(Clone, PartialEq, ::prost::Oneof)]
478 pub enum Target {
479 #[prost(message, tag = "1")]
481 EmptyTarget(super::super::EmptyTarget),
482 #[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 #[prost(string, tag = "1")]
493 pub queue_arn: ::prost::alloc::string::String,
494 #[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 #[prost(enumeration = "MetadataOption", tag = "1")]
506 pub gce_http_endpoint: i32,
507 #[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 Unspecified = 0,
516 Enabled = 1,
518 Disabled = 2,
520}
521impl MetadataOption {
522 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 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 #[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 #[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 #[prost(string, tag = "1")]
568 pub function_id: ::prost::alloc::string::String,
569 #[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 #[prost(string, tag = "1")]
582 pub folder_id: ::prost::alloc::string::String,
583 #[prost(int64, tag = "2")]
589 pub page_size: i64,
590 #[prost(string, tag = "3")]
593 pub page_token: ::prost::alloc::string::String,
594 #[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 #[prost(message, repeated, tag = "1")]
609 pub functions: ::prost::alloc::vec::Vec<Function>,
610 #[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 #[prost(string, tag = "1")]
625 pub folder_id: ::prost::alloc::string::String,
626 #[prost(string, tag = "2")]
629 pub name: ::prost::alloc::string::String,
630 #[prost(string, tag = "3")]
632 pub description: ::prost::alloc::string::String,
633 #[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 #[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 #[prost(string, tag = "1")]
654 pub function_id: ::prost::alloc::string::String,
655 #[prost(message, optional, tag = "2")]
657 pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
658 #[prost(string, tag = "3")]
661 pub name: ::prost::alloc::string::String,
662 #[prost(string, tag = "4")]
664 pub description: ::prost::alloc::string::String,
665 #[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 #[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 #[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 #[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 #[prost(string, tag = "2")]
702 pub function_version_id: ::prost::alloc::string::String,
703 #[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 #[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 #[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 #[prost(int64, tag = "3")]
735 pub page_size: i64,
736 #[prost(string, tag = "4")]
739 pub page_token: ::prost::alloc::string::String,
740 #[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}
752pub mod list_functions_versions_request {
754 #[allow(clippy::derive_partial_eq_without_eq)]
755 #[derive(Clone, PartialEq, ::prost::Oneof)]
756 pub enum Id {
757 #[prost(string, tag = "1")]
760 FolderId(::prost::alloc::string::String),
761 #[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 #[prost(message, repeated, tag = "1")]
772 pub versions: ::prost::alloc::vec::Vec<Version>,
773 #[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 #[prost(string, tag = "1")]
786 pub function_id: ::prost::alloc::string::String,
787 #[prost(int64, tag = "2")]
793 pub page_size: i64,
794 #[prost(string, tag = "3")]
797 pub page_token: ::prost::alloc::string::String,
798 #[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 #[prost(message, repeated, tag = "1")]
813 pub operations: ::prost::alloc::vec::Vec<super::super::super::operation::Operation>,
814 #[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 #[prost(string, tag = "1")]
829 pub function_id: ::prost::alloc::string::String,
830 #[prost(string, tag = "2")]
832 pub runtime: ::prost::alloc::string::String,
833 #[prost(string, tag = "3")]
835 pub description: ::prost::alloc::string::String,
836 #[prost(string, tag = "4")]
838 pub entrypoint: ::prost::alloc::string::String,
839 #[prost(message, optional, tag = "5")]
841 pub resources: ::core::option::Option<Resources>,
842 #[prost(message, optional, tag = "6")]
846 pub execution_timeout: ::core::option::Option<::prost_types::Duration>,
847 #[prost(string, tag = "7")]
849 pub service_account_id: ::prost::alloc::string::String,
850 #[prost(map = "string, string", tag = "12")]
852 pub environment: ::std::collections::HashMap<
853 ::prost::alloc::string::String,
854 ::prost::alloc::string::String,
855 >,
856 #[prost(string, repeated, tag = "13")]
858 pub tag: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
859 #[prost(message, optional, tag = "17")]
861 pub connectivity: ::core::option::Option<Connectivity>,
862 #[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 #[prost(message, repeated, tag = "18")]
870 pub secrets: ::prost::alloc::vec::Vec<Secret>,
871 #[prost(message, optional, tag = "19")]
873 pub log_options: ::core::option::Option<LogOptions>,
874 #[prost(message, repeated, tag = "20")]
876 pub storage_mounts: ::prost::alloc::vec::Vec<StorageMount>,
877 #[prost(message, optional, tag = "22")]
879 pub async_invocation_config: ::core::option::Option<AsyncInvocationConfig>,
880 #[prost(int64, tag = "23")]
885 pub tmpfs_size: i64,
886 #[prost(int64, tag = "24")]
888 pub concurrency: i64,
889 #[prost(message, repeated, tag = "25")]
891 pub mounts: ::prost::alloc::vec::Vec<Mount>,
892 #[prost(message, optional, tag = "26")]
894 pub metadata_options: ::core::option::Option<MetadataOptions>,
895 #[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}
904pub mod create_function_version_request {
906 #[allow(clippy::derive_partial_eq_without_eq)]
908 #[derive(Clone, PartialEq, ::prost::Oneof)]
909 pub enum PackageSource {
910 #[prost(message, tag = "9")]
912 Package(super::Package),
913 #[prost(bytes, tag = "10")]
915 Content(::prost::alloc::vec::Vec<u8>),
916 #[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 #[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 #[prost(string, tag = "1")]
936 pub function_version_id: ::prost::alloc::string::String,
937 #[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 #[prost(string, tag = "1")]
948 pub function_version_id: ::prost::alloc::string::String,
949 #[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 #[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 #[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 #[prost(string, tag = "1")]
974 pub function_id: ::prost::alloc::string::String,
975 #[prost(string, tag = "2")]
977 pub tag: ::prost::alloc::string::String,
978 #[prost(int64, tag = "3")]
983 pub page_size: i64,
984 #[prost(string, tag = "4")]
987 pub page_token: ::prost::alloc::string::String,
988 #[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 #[prost(message, repeated, tag = "1")]
1003 pub function_tag_history_record: ::prost::alloc::vec::Vec<
1004 list_function_tag_history_response::FunctionTagHistoryRecord,
1005 >,
1006 #[prost(string, tag = "2")]
1012 pub next_page_token: ::prost::alloc::string::String,
1013}
1014pub mod list_function_tag_history_response {
1016 #[allow(clippy::derive_partial_eq_without_eq)]
1018 #[derive(Clone, PartialEq, ::prost::Message)]
1019 pub struct FunctionTagHistoryRecord {
1020 #[prost(string, tag = "1")]
1022 pub function_id: ::prost::alloc::string::String,
1023 #[prost(string, tag = "3")]
1025 pub function_version_id: ::prost::alloc::string::String,
1026 #[prost(string, tag = "2")]
1028 pub tag: ::prost::alloc::string::String,
1029 #[prost(message, optional, tag = "4")]
1031 pub effective_from: ::core::option::Option<::prost_types::Timestamp>,
1032 #[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 #[prost(string, tag = "1")]
1044 pub function_id: ::prost::alloc::string::String,
1045 #[prost(int64, tag = "2")]
1051 pub page_size: i64,
1052 #[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 #[prost(message, repeated, tag = "1")]
1062 pub scaling_policies: ::prost::alloc::vec::Vec<ScalingPolicy>,
1063 #[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 #[prost(string, tag = "1")]
1078 pub function_id: ::prost::alloc::string::String,
1079 #[prost(string, tag = "2")]
1083 pub tag: ::prost::alloc::string::String,
1084 #[prost(int64, tag = "4")]
1087 pub provisioned_instances_count: i64,
1088 #[prost(int64, tag = "5")]
1091 pub zone_instances_limit: i64,
1092 #[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 #[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 #[prost(string, tag = "1")]
1111 pub function_id: ::prost::alloc::string::String,
1112 #[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 #[prost(string, tag = "1")]
1123 pub function_id: ::prost::alloc::string::String,
1124}
1125pub 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 #[derive(Debug, Clone)]
1132 pub struct FunctionServiceClient<T> {
1133 inner: tonic::client::Grpc<T>,
1134 }
1135 impl FunctionServiceClient<tonic::transport::Channel> {
1136 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 #[must_use]
1185 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1186 self.inner = self.inner.send_compressed(encoding);
1187 self
1188 }
1189 #[must_use]
1191 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1192 self.inner = self.inner.accept_compressed(encoding);
1193 self
1194 }
1195 #[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 #[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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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#[allow(clippy::derive_partial_eq_without_eq)]
1874#[derive(Clone, PartialEq, ::prost::Message)]
1875pub struct UsedNetwork {
1876 #[prost(string, tag = "1")]
1878 pub network_id: ::prost::alloc::string::String,
1879 #[prost(string, tag = "2")]
1881 pub cloud_id: ::prost::alloc::string::String,
1882 #[prost(string, tag = "3")]
1884 pub folder_id: ::prost::alloc::string::String,
1885 #[prost(enumeration = "used_network::Status", tag = "4")]
1887 pub status: i32,
1888 #[prost(message, optional, tag = "5")]
1890 pub will_be_cleaned_up_at: ::core::option::Option<::prost_types::Timestamp>,
1891 #[prost(int64, tag = "6")]
1893 pub connections_count: i64,
1894}
1895pub 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 Creating = 1,
1913 Active = 2,
1915 Obsolete = 3,
1918 }
1919 impl Status {
1920 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 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 #[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 #[prost(int64, tag = "1")]
1960 pub page_size: i64,
1961 #[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}
1968pub mod list_used_networks_request {
1970 #[allow(clippy::derive_partial_eq_without_eq)]
1971 #[derive(Clone, PartialEq, ::prost::Oneof)]
1972 pub enum Scope {
1973 #[prost(string, tag = "3")]
1975 CloudId(::prost::alloc::string::String),
1976 #[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 #[prost(message, repeated, tag = "1")]
1986 pub networks: ::prost::alloc::vec::Vec<UsedNetwork>,
1987 #[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 #[prost(int64, tag = "1")]
2004 pub page_size: i64,
2005 #[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}
2014pub mod list_connected_resources_request {
2016 #[allow(clippy::derive_partial_eq_without_eq)]
2017 #[derive(Clone, PartialEq, ::prost::Oneof)]
2018 pub enum NetworkScope {
2019 #[prost(string, tag = "3")]
2021 NetworkId(::prost::alloc::string::String),
2022 #[prost(string, tag = "4")]
2024 CloudId(::prost::alloc::string::String),
2025 #[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 #[prost(message, repeated, tag = "1")]
2035 pub resources: ::prost::alloc::vec::Vec<
2036 list_connected_resources_response::ConnectedResource,
2037 >,
2038 #[prost(string, tag = "2")]
2044 pub next_page_token: ::prost::alloc::string::String,
2045}
2046pub mod list_connected_resources_response {
2048 #[allow(clippy::derive_partial_eq_without_eq)]
2050 #[derive(Clone, PartialEq, ::prost::Message)]
2051 pub struct ConnectedResource {
2052 #[prost(string, tag = "1")]
2054 pub network_id: ::prost::alloc::string::String,
2055 #[prost(string, tag = "2")]
2057 pub resource_type: ::prost::alloc::string::String,
2058 #[prost(string, tag = "3")]
2060 pub resource_id: ::prost::alloc::string::String,
2061 #[prost(string, tag = "4")]
2063 pub subresource_type: ::prost::alloc::string::String,
2064 #[prost(string, tag = "5")]
2066 pub subresource_id: ::prost::alloc::string::String,
2067 #[prost(string, tag = "6")]
2069 pub resource_cloud_id: ::prost::alloc::string::String,
2070 #[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 #[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 #[prost(message, optional, tag = "1")]
2087 pub network_cleanup_time: ::core::option::Option<::prost_types::Timestamp>,
2088}
2089pub 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 #[derive(Debug, Clone)]
2096 pub struct NetworkServiceClient<T> {
2097 inner: tonic::client::Grpc<T>,
2098 }
2099 impl NetworkServiceClient<tonic::transport::Channel> {
2100 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 #[must_use]
2149 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2150 self.inner = self.inner.send_compressed(encoding);
2151 self
2152 }
2153 #[must_use]
2155 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2156 self.inner = self.inner.accept_compressed(encoding);
2157 self
2158 }
2159 #[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 #[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 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 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 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 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}