diff --git a/gcloud-sdk/genproto/google.api.rs b/gcloud-sdk/genproto/google.api.rs index 8f66089a1..980d50fe5 100644 --- a/gcloud-sdk/genproto/google.api.rs +++ b/gcloud-sdk/genproto/google.api.rs @@ -665,6 +665,362 @@ pub struct CustomHttpPattern { #[prost(string, tag = "2")] pub path: ::prost::alloc::string::String, } +/// The launch stage as defined by [Google Cloud Platform +/// Launch Stages](). +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum LaunchStage { + /// Do not use this default value. + Unspecified = 0, + /// The feature is not yet implemented. Users can not use it. + Unimplemented = 6, + /// Prelaunch features are hidden from users and are only visible internally. + Prelaunch = 7, + /// Early Access features are limited to a closed group of testers. To use + /// these features, you must sign up in advance and sign a Trusted Tester + /// agreement (which includes confidentiality provisions). These features may + /// be unstable, changed in backward-incompatible ways, and are not + /// guaranteed to be released. + EarlyAccess = 1, + /// Alpha is a limited availability test for releases before they are cleared + /// for widespread use. By Alpha, all significant design issues are resolved + /// and we are in the process of verifying functionality. Alpha customers + /// need to apply for access, agree to applicable terms, and have their + /// projects allowlisted. Alpha releases don't have to be feature complete, + /// no SLAs are provided, and there are no technical support obligations, but + /// they will be far enough along that customers can actually use them in + /// test environments or for limited-use tests -- just like they would in + /// normal production cases. + Alpha = 2, + /// Beta is the point at which we are ready to open a release for any + /// customer to use. There are no SLA or technical support obligations in a + /// Beta release. Products will be complete from a feature perspective, but + /// may have some open outstanding issues. Beta releases are suitable for + /// limited production use cases. + Beta = 3, + /// GA features are open to all developers and are considered stable and + /// fully qualified for production use. + Ga = 4, + /// Deprecated features are scheduled to be shut down and removed. For more + /// information, see the "Deprecation Policy" section of our [Terms of + /// Service]() + /// and the [Google Cloud Platform Subject to the Deprecation + /// Policy]() documentation. + Deprecated = 5, +} +impl LaunchStage { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + LaunchStage::Unspecified => "LAUNCH_STAGE_UNSPECIFIED", + LaunchStage::Unimplemented => "UNIMPLEMENTED", + LaunchStage::Prelaunch => "PRELAUNCH", + LaunchStage::EarlyAccess => "EARLY_ACCESS", + LaunchStage::Alpha => "ALPHA", + LaunchStage::Beta => "BETA", + LaunchStage::Ga => "GA", + LaunchStage::Deprecated => "DEPRECATED", + } + } +} +/// Required information for every language. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CommonLanguageSettings { + /// Link to automatically generated reference documentation. Example: + /// + #[prost(string, tag = "1")] + pub reference_docs_uri: ::prost::alloc::string::String, + /// The destination where API teams want this client library to be published. + #[prost(enumeration = "ClientLibraryDestination", repeated, tag = "2")] + pub destinations: ::prost::alloc::vec::Vec, +} +/// Details about how and where to publish client libraries. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ClientLibrarySettings { + /// Version of the API to apply these settings to. + #[prost(string, tag = "1")] + pub version: ::prost::alloc::string::String, + /// Launch stage of this version of the API. + #[prost(enumeration = "LaunchStage", tag = "2")] + pub launch_stage: i32, + /// When using transport=rest, the client request will encode enums as + /// numbers rather than strings. + #[prost(bool, tag = "3")] + pub rest_numeric_enums: bool, + /// Settings for legacy Java features, supported in the Service YAML. + #[prost(message, optional, tag = "21")] + pub java_settings: ::core::option::Option, + /// Settings for C++ client libraries. + #[prost(message, optional, tag = "22")] + pub cpp_settings: ::core::option::Option, + /// Settings for PHP client libraries. + #[prost(message, optional, tag = "23")] + pub php_settings: ::core::option::Option, + /// Settings for Python client libraries. + #[prost(message, optional, tag = "24")] + pub python_settings: ::core::option::Option, + /// Settings for Node client libraries. + #[prost(message, optional, tag = "25")] + pub node_settings: ::core::option::Option, + /// Settings for .NET client libraries. + #[prost(message, optional, tag = "26")] + pub dotnet_settings: ::core::option::Option, + /// Settings for Ruby client libraries. + #[prost(message, optional, tag = "27")] + pub ruby_settings: ::core::option::Option, + /// Settings for Go client libraries. + #[prost(message, optional, tag = "28")] + pub go_settings: ::core::option::Option, +} +/// This message configures the settings for publishing [Google Cloud Client +/// libraries]() +/// generated from the service config. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Publishing { + /// A list of API method settings, e.g. the behavior for methods that use the + /// long-running operation pattern. + #[prost(message, repeated, tag = "2")] + pub method_settings: ::prost::alloc::vec::Vec, + /// Link to a place that API users can report issues. Example: + /// + #[prost(string, tag = "101")] + pub new_issue_uri: ::prost::alloc::string::String, + /// Link to product home page. Example: + /// + #[prost(string, tag = "102")] + pub documentation_uri: ::prost::alloc::string::String, + /// Used as a tracking tag when collecting data about the APIs developer + /// relations artifacts like docs, packages delivered to package managers, + /// etc. Example: "speech". + #[prost(string, tag = "103")] + pub api_short_name: ::prost::alloc::string::String, + /// GitHub label to apply to issues and pull requests opened for this API. + #[prost(string, tag = "104")] + pub github_label: ::prost::alloc::string::String, + /// GitHub teams to be added to CODEOWNERS in the directory in GitHub + /// containing source code for the client libraries for this API. + #[prost(string, repeated, tag = "105")] + pub codeowner_github_teams: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// A prefix used in sample code when demarking regions to be included in + /// documentation. + #[prost(string, tag = "106")] + pub doc_tag_prefix: ::prost::alloc::string::String, + /// For whom the client library is being published. + #[prost(enumeration = "ClientLibraryOrganization", tag = "107")] + pub organization: i32, + /// Client library settings. If the same version string appears multiple + /// times in this list, then the last one wins. Settings from earlier + /// settings with the same version string are discarded. + #[prost(message, repeated, tag = "109")] + pub library_settings: ::prost::alloc::vec::Vec, +} +/// Settings for Java client libraries. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct JavaSettings { + /// The package name to use in Java. Clobbers the java_package option + /// set in the protobuf. This should be used **only** by APIs + /// who have already set the language_settings.java.package_name" field + /// in gapic.yaml. API teams should use the protobuf java_package option + /// where possible. + /// + /// Example of a YAML configuration:: + /// + /// publishing: + /// java_settings: + /// library_package: com.google.cloud.pubsub.v1 + #[prost(string, tag = "1")] + pub library_package: ::prost::alloc::string::String, + /// Configure the Java class name to use instead of the service's for its + /// corresponding generated GAPIC client. Keys are fully-qualified + /// service names as they appear in the protobuf (including the full + /// the language_settings.java.interface_names" field in gapic.yaml. API + /// teams should otherwise use the service name as it appears in the + /// protobuf. + /// + /// Example of a YAML configuration:: + /// + /// publishing: + /// java_settings: + /// service_class_names: + /// - google.pubsub.v1.Publisher: TopicAdmin + /// - google.pubsub.v1.Subscriber: SubscriptionAdmin + #[prost(map = "string, string", tag = "2")] + pub service_class_names: ::std::collections::HashMap< + ::prost::alloc::string::String, + ::prost::alloc::string::String, + >, + /// Some settings. + #[prost(message, optional, tag = "3")] + pub common: ::core::option::Option, +} +/// Settings for C++ client libraries. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CppSettings { + /// Some settings. + #[prost(message, optional, tag = "1")] + pub common: ::core::option::Option, +} +/// Settings for Php client libraries. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PhpSettings { + /// Some settings. + #[prost(message, optional, tag = "1")] + pub common: ::core::option::Option, +} +/// Settings for Python client libraries. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PythonSettings { + /// Some settings. + #[prost(message, optional, tag = "1")] + pub common: ::core::option::Option, +} +/// Settings for Node client libraries. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct NodeSettings { + /// Some settings. + #[prost(message, optional, tag = "1")] + pub common: ::core::option::Option, +} +/// Settings for Dotnet client libraries. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DotnetSettings { + /// Some settings. + #[prost(message, optional, tag = "1")] + pub common: ::core::option::Option, +} +/// Settings for Ruby client libraries. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RubySettings { + /// Some settings. + #[prost(message, optional, tag = "1")] + pub common: ::core::option::Option, +} +/// Settings for Go client libraries. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GoSettings { + /// Some settings. + #[prost(message, optional, tag = "1")] + pub common: ::core::option::Option, +} +/// Describes the generator configuration for a method. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MethodSettings { + /// The fully qualified name of the method, for which the options below apply. + /// This is used to find the method to apply the options. + #[prost(string, tag = "1")] + pub selector: ::prost::alloc::string::String, + /// Describes settings to use for long-running operations when generating + /// API methods for RPCs. Complements RPCs that use the annotations in + /// google/longrunning/operations.proto. + /// + /// Example of a YAML configuration:: + /// + /// publishing: + /// method_behavior: + /// - selector: CreateAdDomain + /// long_running: + /// initial_poll_delay: + /// seconds: 60 # 1 minute + /// poll_delay_multiplier: 1.5 + /// max_poll_delay: + /// seconds: 360 # 6 minutes + /// total_poll_timeout: + /// seconds: 54000 # 90 minutes + #[prost(message, optional, tag = "2")] + pub long_running: ::core::option::Option, +} +/// Nested message and enum types in `MethodSettings`. +pub mod method_settings { + /// Describes settings to use when generating API methods that use the + /// long-running operation pattern. + /// All default values below are from those used in the client library + /// generators (e.g. + /// \[Java\]()). + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct LongRunning { + /// Initial delay after which the first poll request will be made. + /// Default value: 5 seconds. + #[prost(message, optional, tag = "1")] + pub initial_poll_delay: ::core::option::Option<::prost_types::Duration>, + /// Multiplier to gradually increase delay between subsequent polls until it + /// reaches max_poll_delay. + /// Default value: 1.5. + #[prost(float, tag = "2")] + pub poll_delay_multiplier: f32, + /// Maximum time between two subsequent poll requests. + /// Default value: 45 seconds. + #[prost(message, optional, tag = "3")] + pub max_poll_delay: ::core::option::Option<::prost_types::Duration>, + /// Total polling timeout. + /// Default value: 5 minutes. + #[prost(message, optional, tag = "4")] + pub total_poll_timeout: ::core::option::Option<::prost_types::Duration>, + } +} +/// The organization for which the client libraries are being published. +/// Affects the url where generated docs are published, etc. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum ClientLibraryOrganization { + /// Not useful. + Unspecified = 0, + /// Google Cloud Platform Org. + Cloud = 1, + /// Ads (Advertising) Org. + Ads = 2, + /// Photos Org. + Photos = 3, + /// Street View Org. + StreetView = 4, +} +impl ClientLibraryOrganization { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ClientLibraryOrganization::Unspecified => { + "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" + } + ClientLibraryOrganization::Cloud => "CLOUD", + ClientLibraryOrganization::Ads => "ADS", + ClientLibraryOrganization::Photos => "PHOTOS", + ClientLibraryOrganization::StreetView => "STREET_VIEW", + } + } +} +/// To where should client libraries be published? +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum ClientLibraryDestination { + /// Client libraries will neither be generated nor published to package + /// managers. + Unspecified = 0, + /// Generate the client library in a repo under github.com/googleapis, + /// but don't publish it to package managers. + Github = 10, + /// Publish the library to package managers like nuget.org and npmjs.com. + PackageManager = 20, +} +impl ClientLibraryDestination { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ClientLibraryDestination::Unspecified => { + "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED" + } + ClientLibraryDestination::Github => "GITHUB", + ClientLibraryDestination::PackageManager => "PACKAGE_MANAGER", + } + } +} /// `Authentication` defines the authentication configuration for API methods /// provided by an API service. /// @@ -734,7 +1090,7 @@ pub struct JwtLocation { /// value_prefix="Bearer " with a space at the end. #[prost(string, tag = "3")] pub value_prefix: ::prost::alloc::string::String, - #[prost(oneof = "jwt_location::In", tags = "1, 2")] + #[prost(oneof = "jwt_location::In", tags = "1, 2, 4")] pub r#in: ::core::option::Option, } /// Nested message and enum types in `JwtLocation`. @@ -747,6 +1103,9 @@ pub mod jwt_location { /// Specifies URL query parameter name to extract JWT token. #[prost(string, tag = "2")] Query(::prost::alloc::string::String), + /// Specifies cookie name to extract JWT token. + #[prost(string, tag = "4")] + Cookie(::prost::alloc::string::String), } } /// Configuration for an authentication provider, including support for @@ -805,11 +1164,12 @@ pub struct AuthProvider { /// Implement authorizationUrl of securityDefinitions in OpenAPI spec. #[prost(string, tag = "5")] pub authorization_url: ::prost::alloc::string::String, - /// Defines the locations to extract the JWT. + /// Defines the locations to extract the JWT. For now it is only used by the + /// Cloud Endpoints to store the OpenAPI extension \[x-google-jwt-locations\] + /// () /// - /// JWT locations can be either from HTTP headers or URL query parameters. - /// The rule is that the first match wins. The checking order is: checking - /// all headers first, then URL query parameters. + /// JWT locations can be one of HTTP headers, URL query parameters or + /// cookies. The rule is that the first match wins. /// /// If not specified, default to use following 3 locations: /// 1) Authorization: Bearer @@ -929,8 +1289,8 @@ pub struct BackendRule { /// varies based on the request protocol and deployment environment. #[prost(double, tag = "3")] pub deadline: f64, - /// Minimum deadline in seconds needed for this method. Calls having deadline - /// value lower than this will be rejected. + /// Deprecated, do not use. + #[deprecated] #[prost(double, tag = "4")] pub min_deadline: f64, /// The number of seconds to wait for the completion of a long running @@ -1380,13 +1740,17 @@ pub struct ContextRule { ::prost::alloc::string::String, >, } -/// Selects and configures the service controller used by the service. The -/// service controller handles features like abuse, quota, billing, logging, -/// monitoring, etc. +/// Selects and configures the service controller used by the service. +/// +/// Example: +/// +/// control: +/// environment: servicecontrol.googleapis.com #[derive(Clone, PartialEq, ::prost::Message)] pub struct Control { - /// The service control environment to use. If empty, no control plane - /// feature (like quota and billing) will be enabled. + /// The service controller environment to use. If empty, no control plane + /// feature (like quota and billing) will be enabled. The recommended value for + /// most services is servicecontrol.googleapis.com #[prost(string, tag = "1")] pub environment: ::prost::alloc::string::String, } @@ -1649,8 +2013,10 @@ pub mod distribution { /// and is documented together with service config validation. #[derive(Clone, PartialEq, ::prost::Message)] pub struct Documentation { - /// A short summary of what the service does. Can only be provided by - /// plain text. + /// A short description of what the service does. The summary must be plain + /// text. It becomes the overview of the service displayed in Google Cloud + /// Console. + /// NOTE: This field is equivalent to the standard field `description`. #[prost(string, tag = "1")] pub summary: ::prost::alloc::string::String, /// The top level pages for the documentation set. @@ -1689,15 +2055,18 @@ pub struct Documentation { /// A documentation rule provides information about individual API elements. #[derive(Clone, PartialEq, ::prost::Message)] pub struct DocumentationRule { - /// The selector is a comma-separated list of patterns. Each pattern is a - /// qualified name of the element which may end in "*", indicating a wildcard. - /// Wildcards are only allowed at the end and for a whole component of the - /// qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". A - /// wildcard will match one or more components. To specify a default for all - /// applicable elements, the whole pattern "*" is used. + /// The selector is a comma-separated list of patterns for any element such as + /// a method, a field, an enum value. Each pattern is a qualified name of the + /// element which may end in "*", indicating a wildcard. Wildcards are only + /// allowed at the end and for a whole component of the qualified name, + /// i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". A wildcard will match + /// one or more components. To specify a default for all applicable elements, + /// the whole pattern "*" is used. #[prost(string, tag = "1")] pub selector: ::prost::alloc::string::String, - /// Description of the selected API(s). + /// Description of the selected proto element (e.g. a message, a method, a + /// 'service' definition, or a field). Defaults to leading & trailing comments + /// taken from the proto source definition of the proto element. #[prost(string, tag = "2")] pub description: ::prost::alloc::string::String, /// Deprecation description of the selected element(s). It can be provided if @@ -1726,7 +2095,8 @@ pub struct Page { #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, /// The Markdown content of the page. You can use (== include {path} - /// ==) to include content from a Markdown file. + /// ==) to include content from a Markdown file. The content can be + /// used to produce the documentation page such as HTML format page. #[prost(string, tag = "2")] pub content: ::prost::alloc::string::String, /// Subpages of this page. The order of subpages specified here will be @@ -1734,21 +2104,26 @@ pub struct Page { #[prost(message, repeated, tag = "3")] pub subpages: ::prost::alloc::vec::Vec, } -/// `Endpoint` describes a network endpoint of a service that serves a set of +/// `Endpoint` describes a network address of a service that serves a set of /// APIs. It is commonly known as a service endpoint. A service may expose /// any number of service endpoints, and all service endpoints share the same /// service definition, such as quota limits and monitoring metrics. /// -/// Example service configuration: +/// Example: /// +/// type: google.api.Service /// name: library-example.googleapis.com /// endpoints: -/// # Below entry makes 'google.example.library.v1.Library' -/// # API be served from endpoint address library-example.googleapis.com. -/// # It also allows HTTP OPTIONS calls to be passed to the backend, for -/// # it to decide whether the subsequent cross-origin request is -/// # allowed to proceed. +/// # Declares network address ` +/// # for service `library-example.googleapis.com`. The `https` scheme +/// # is implicit for all service endpoints. Other schemes may be +/// # supported in the future. /// - name: library-example.googleapis.com +/// allow_cors: false +/// - name: content-staging-library-example.googleapis.com +/// # Allows HTTP OPTIONS calls to be passed to the API frontend, for it +/// # to decide whether the subsequent cross-origin request is allowed +/// # to proceed. /// allow_cors: true #[derive(Clone, PartialEq, ::prost::Message)] pub struct Endpoint { @@ -1758,8 +2133,8 @@ pub struct Endpoint { /// Unimplemented. Dot not use. /// /// DEPRECATED: This field is no longer supported. Instead of using aliases, - /// please specify multiple \[google.api.Endpoint][google.api.Endpoint\] for each of the intended - /// aliases. + /// please specify multiple \[google.api.Endpoint][google.api.Endpoint\] for each + /// of the intended aliases. /// /// Additional names that this endpoint will be hosted on. #[deprecated] @@ -2136,6 +2511,136 @@ pub enum ErrorReason { /// } /// } AccessTokenTypeUnsupported = 19, + /// The request is denied because the request doesn't have any authentication + /// credentials. For more information regarding the supported authentication + /// strategies for Google Cloud APIs, see + /// + /// + /// Example of an ErrorInfo when the request is to the Cloud Storage API + /// without any authentication credentials. + /// + /// { "reason": "CREDENTIALS_MISSING", + /// "domain": "googleapis.com", + /// "metadata": { + /// "service": "storage.googleapis.com", + /// "method": "google.storage.v1.Storage.GetObject" + /// } + /// } + CredentialsMissing = 20, + /// The request is denied because the provided project owning the resource + /// which acts as the [API + /// consumer]() is + /// invalid. It may be in a bad format or empty. + /// + /// Example of an ErrorInfo when the request is to the Cloud Functions API, + /// but the offered resource project in the request in a bad format which can't + /// perform the ListFunctions method. + /// + /// { "reason": "RESOURCE_PROJECT_INVALID", + /// "domain": "googleapis.com", + /// "metadata": { + /// "service": "cloudfunctions.googleapis.com", + /// "method": + /// "google.cloud.functions.v1.CloudFunctionsService.ListFunctions" + /// } + /// } + ResourceProjectInvalid = 21, + /// The request is denied because the provided session cookie is missing, + /// invalid or failed to decode. + /// + /// Example of an ErrorInfo when the request is calling Cloud Storage service + /// with a SID cookie which can't be decoded. + /// + /// { "reason": "SESSION_COOKIE_INVALID", + /// "domain": "googleapis.com", + /// "metadata": { + /// "service": "storage.googleapis.com", + /// "method": "google.storage.v1.Storage.GetObject", + /// "cookie": "SID" + /// } + /// } + SessionCookieInvalid = 23, + /// The request is denied because the user is from a Google Workspace customer + /// that blocks their users from accessing a particular service. + /// + /// Example scenario: + /// + /// Example of an ErrorInfo when access to Google Cloud Storage service is + /// blocked by the Google Workspace administrator: + /// + /// { "reason": "USER_BLOCKED_BY_ADMIN", + /// "domain": "googleapis.com", + /// "metadata": { + /// "service": "storage.googleapis.com", + /// "method": "google.storage.v1.Storage.GetObject", + /// } + /// } + UserBlockedByAdmin = 24, + /// The request is denied because the resource service usage is restricted + /// by administrators according to the organization policy constraint. + /// For more information see + /// + /// + /// Example of an ErrorInfo when access to Google Cloud Storage service is + /// restricted by Resource Usage Restriction policy: + /// + /// { "reason": "RESOURCE_USAGE_RESTRICTION_VIOLATED", + /// "domain": "googleapis.com", + /// "metadata": { + /// "consumer": "projects/project-123", + /// "service": "storage.googleapis.com" + /// } + /// } + ResourceUsageRestrictionViolated = 25, + /// Unimplemented. Do not use. + /// + /// The request is denied because it contains unsupported system parameters in + /// URL query parameters or HTTP headers. For more information, + /// see + /// + /// Example of an ErrorInfo when access "pubsub.googleapis.com" service with + /// a request header of "x-goog-user-ip": + /// + /// { "reason": "SYSTEM_PARAMETER_UNSUPPORTED", + /// "domain": "googleapis.com", + /// "metadata": { + /// "service": "pubsub.googleapis.com" + /// "parameter": "x-goog-user-ip" + /// } + /// } + SystemParameterUnsupported = 26, + /// The request is denied because it violates Org Restriction: the requested + /// resource does not belong to allowed organizations specified in + /// "X-Goog-Allowed-Resources" header. + /// + /// Example of an ErrorInfo when accessing a GCP resource that is restricted by + /// Org Restriction for "pubsub.googleapis.com" service. + /// + /// { + /// reason: "ORG_RESTRICTION_VIOLATION" + /// domain: "googleapis.com" + /// metadata { + /// "consumer":"projects/123456" + /// "service": "pubsub.googleapis.com" + /// } + /// } + OrgRestrictionViolation = 27, + /// The request is denied because "X-Goog-Allowed-Resources" header is in a bad + /// format. + /// + /// Example of an ErrorInfo when + /// accessing "pubsub.googleapis.com" service with an invalid + /// "X-Goog-Allowed-Resources" request header. + /// + /// { + /// reason: "ORG_RESTRICTION_HEADER_INVALID" + /// domain: "googleapis.com" + /// metadata { + /// "consumer":"projects/123456" + /// "service": "pubsub.googleapis.com" + /// } + /// } + OrgRestrictionHeaderInvalid = 28, } impl ErrorReason { /// String value of the enum field names used in the ProtoBuf definition. @@ -2166,6 +2671,16 @@ impl ErrorReason { } ErrorReason::AccountStateInvalid => "ACCOUNT_STATE_INVALID", ErrorReason::AccessTokenTypeUnsupported => "ACCESS_TOKEN_TYPE_UNSUPPORTED", + ErrorReason::CredentialsMissing => "CREDENTIALS_MISSING", + ErrorReason::ResourceProjectInvalid => "RESOURCE_PROJECT_INVALID", + ErrorReason::SessionCookieInvalid => "SESSION_COOKIE_INVALID", + ErrorReason::UserBlockedByAdmin => "USER_BLOCKED_BY_ADMIN", + ErrorReason::ResourceUsageRestrictionViolated => { + "RESOURCE_USAGE_RESTRICTION_VIOLATED" + } + ErrorReason::SystemParameterUnsupported => "SYSTEM_PARAMETER_UNSUPPORTED", + ErrorReason::OrgRestrictionViolation => "ORG_RESTRICTION_VIOLATION", + ErrorReason::OrgRestrictionHeaderInvalid => "ORG_RESTRICTION_HEADER_INVALID", } } } @@ -2275,67 +2790,6 @@ pub mod label_descriptor { } } } -/// The launch stage as defined by [Google Cloud Platform -/// Launch Stages](). -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum LaunchStage { - /// Do not use this default value. - Unspecified = 0, - /// The feature is not yet implemented. Users can not use it. - Unimplemented = 6, - /// Prelaunch features are hidden from users and are only visible internally. - Prelaunch = 7, - /// Early Access features are limited to a closed group of testers. To use - /// these features, you must sign up in advance and sign a Trusted Tester - /// agreement (which includes confidentiality provisions). These features may - /// be unstable, changed in backward-incompatible ways, and are not - /// guaranteed to be released. - EarlyAccess = 1, - /// Alpha is a limited availability test for releases before they are cleared - /// for widespread use. By Alpha, all significant design issues are resolved - /// and we are in the process of verifying functionality. Alpha customers - /// need to apply for access, agree to applicable terms, and have their - /// projects allowlisted. Alpha releases don’t have to be feature complete, - /// no SLAs are provided, and there are no technical support obligations, but - /// they will be far enough along that customers can actually use them in - /// test environments or for limited-use tests -- just like they would in - /// normal production cases. - Alpha = 2, - /// Beta is the point at which we are ready to open a release for any - /// customer to use. There are no SLA or technical support obligations in a - /// Beta release. Products will be complete from a feature perspective, but - /// may have some open outstanding issues. Beta releases are suitable for - /// limited production use cases. - Beta = 3, - /// GA features are open to all developers and are considered stable and - /// fully qualified for production use. - Ga = 4, - /// Deprecated features are scheduled to be shut down and removed. For more - /// information, see the “Deprecation Policy” section of our [Terms of - /// Service]() - /// and the [Google Cloud Platform Subject to the Deprecation - /// Policy]() documentation. - Deprecated = 5, -} -impl LaunchStage { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - LaunchStage::Unspecified => "LAUNCH_STAGE_UNSPECIFIED", - LaunchStage::Unimplemented => "UNIMPLEMENTED", - LaunchStage::Prelaunch => "PRELAUNCH", - LaunchStage::EarlyAccess => "EARLY_ACCESS", - LaunchStage::Alpha => "ALPHA", - LaunchStage::Beta => "BETA", - LaunchStage::Ga => "GA", - LaunchStage::Deprecated => "DEPRECATED", - } - } -} /// A description of a log type. Example in YAML format: /// /// - name: library.googleapis.com/activity_history @@ -2743,6 +3197,10 @@ pub struct MonitoredResourceDescriptor { pub name: ::prost::alloc::string::String, /// Required. The monitored resource type. For example, the type /// `"cloudsql_database"` represents databases in Google Cloud SQL. + /// For a list of types, see [Monitoring resource + /// types]() + /// and [Logging resource + /// types](). #[prost(string, tag = "1")] pub r#type: ::prost::alloc::string::String, /// Optional. A concise name for the monitored resource type that might be @@ -2772,16 +3230,19 @@ pub struct MonitoredResourceDescriptor { /// its attributes according to the schema. For example, a particular Compute /// Engine VM instance could be represented by the following object, because the /// \[MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor\] for `"gce_instance"` has labels -/// `"instance_id"` and `"zone"`: +/// `"project_id"`, `"instance_id"` and `"zone"`: /// /// { "type": "gce_instance", -/// "labels": { "instance_id": "12345678901234", +/// "labels": { "project_id": "my-project", +/// "instance_id": "12345678901234", /// "zone": "us-central1-a" }} #[derive(Clone, PartialEq, ::prost::Message)] pub struct MonitoredResource { /// Required. The monitored resource type. This field must match /// the `type` field of a \[MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor\] object. For /// example, the type of a Compute Engine VM instance is `gce_instance`. + /// Some descriptors include the service name in the type; for example, + /// the type of a Datastream stream is `datastream.googleapis.com/Stream`. #[prost(string, tag = "1")] pub r#type: ::prost::alloc::string::String, /// Required. Values for all of the labels listed in the associated monitored @@ -2933,10 +3394,10 @@ pub mod monitoring { /// STANDARD: 10000 /// /// -/// # The metric rules bind all methods to the read_calls metric, -/// # except for the UpdateBook and DeleteBook methods. These two methods -/// # are mapped to the write_calls metric, with the UpdateBook method -/// # consuming at twice rate as the DeleteBook method. +/// (The metric rules bind all methods to the read_calls metric, +/// except for the UpdateBook and DeleteBook methods. These two methods +/// are mapped to the write_calls metric, with the UpdateBook method +/// consuming at twice rate as the DeleteBook method.) /// metric_rules: /// - selector: "*" /// metric_costs: @@ -2964,10 +3425,10 @@ pub mod monitoring { /// #[derive(Clone, PartialEq, ::prost::Message)] pub struct Quota { - /// List of `QuotaLimit` definitions for the service. + /// List of QuotaLimit definitions for the service. #[prost(message, repeated, tag = "3")] pub limits: ::prost::alloc::vec::Vec, - /// List of `MetricRule` definitions, each one mapping a selected method to one + /// List of MetricRule definitions, each one mapping a selected method to one /// or more metrics. #[prost(message, repeated, tag = "4")] pub metric_rules: ::prost::alloc::vec::Vec, @@ -3663,11 +4124,12 @@ pub struct UsageRule { #[prost(bool, tag = "3")] pub skip_service_control: bool, } -/// `Service` is the root object of Google service configuration schema. It -/// describes basic information about a service, such as the name and the -/// title, and delegates other aspects to sub-sections. Each sub-section is -/// either a proto message or a repeated proto message that configures a -/// specific aspect, such as auth. See each proto message definition for details. +/// `Service` is the root object of Google API service configuration (service +/// config). It describes the basic information about a logical service, +/// such as the service name and the user-facing title, and delegates other +/// aspects to sub-sections. Each sub-section is either a proto message or a +/// repeated proto message that configures a specific aspect, such as auth. +/// For more information, see each proto message definition. /// /// Example: /// @@ -3676,6 +4138,16 @@ pub struct UsageRule { /// title: Google Calendar API /// apis: /// - name: google.calendar.v3.Calendar +/// +/// visibility: +/// rules: +/// - selector: "google.calendar.v3.*" +/// restriction: PREVIEW +/// backend: +/// rules: +/// - selector: "google.calendar.v3.*" +/// address: calendar.example.com +/// /// authentication: /// providers: /// - id: google_calendar_auth @@ -3693,7 +4165,8 @@ pub struct Service { /// of the service also owns the DNS name. #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, - /// The product title for this service. + /// The product title for this service, it is the name displayed in Google + /// Cloud Console. #[prost(string, tag = "2")] pub title: ::prost::alloc::string::String, /// The Google project that owns this service. @@ -3713,19 +4186,19 @@ pub struct Service { #[prost(message, repeated, tag = "3")] pub apis: ::prost::alloc::vec::Vec<::prost_types::Api>, /// A list of all proto message types included in this API service. - /// Types referenced directly or indirectly by the `apis` are - /// automatically included. Messages which are not referenced but - /// shall be included, such as types used by the `google.protobuf.Any` type, - /// should be listed here by name. Example: + /// Types referenced directly or indirectly by the `apis` are automatically + /// included. Messages which are not referenced but shall be included, such as + /// types used by the `google.protobuf.Any` type, should be listed here by + /// name by the configuration author. Example: /// /// types: /// - name: google.protobuf.Int32 #[prost(message, repeated, tag = "4")] pub types: ::prost::alloc::vec::Vec<::prost_types::Type>, - /// A list of all enum types included in this API service. Enums - /// referenced directly or indirectly by the `apis` are automatically - /// included. Enums which are not referenced but shall be included - /// should be listed here by name. Example: + /// A list of all enum types included in this API service. Enums referenced + /// directly or indirectly by the `apis` are automatically included. Enums + /// which are not referenced but shall be included should be listed here by + /// name by the configuration author. Example: /// /// enums: /// - name: google.someapi.v1.SomeEnum @@ -3785,24 +4258,29 @@ pub struct Service { /// Output only. The source information for this configuration if available. #[prost(message, optional, tag = "37")] pub source_info: ::core::option::Option, + /// Settings for [Google Cloud Client + /// libraries]() + /// generated from APIs defined as protocol buffers. + #[prost(message, optional, tag = "45")] + pub publishing: ::core::option::Option, /// Obsolete. Do not use. /// /// This field has no semantic meaning. The service config compiler always /// sets this field to `3`. - #[deprecated] #[prost(message, optional, tag = "20")] pub config_version: ::core::option::Option, } -/// `Visibility` defines restrictions for the visibility of service -/// elements. Restrictions are specified using visibility labels -/// (e.g., PREVIEW) that are elsewhere linked to users and projects. +/// `Visibility` restricts service consumer's access to service elements, +/// such as whether an application can call a visibility-restricted method. +/// The restriction is expressed by applying visibility labels on service +/// elements. The visibility labels are elsewhere linked to service consumers. /// -/// Users and projects can have access to more than one visibility label. The -/// effective visibility for multiple labels is the union of each label's -/// elements, plus any unrestricted elements. +/// A service can define multiple visibility labels, but a service consumer +/// should be granted at most one visibility label. Multiple visibility +/// labels for a single service consumer are not supported. /// -/// If an element and its parents have no restrictions, visibility is -/// unconditionally granted. +/// If an element and all its parents have no visibility label, its visibility +/// is unconditionally granted. /// /// Example: /// @@ -3829,7 +4307,8 @@ pub struct Visibility { pub struct VisibilityRule { /// Selects methods, messages, fields, enums, etc. to which this rule applies. /// - /// Refer to \[selector][google.api.DocumentationRule.selector\] for syntax details. + /// Refer to \[selector][google.api.DocumentationRule.selector\] for syntax + /// details. #[prost(string, tag = "1")] pub selector: ::prost::alloc::string::String, /// A comma-separated list of visibility labels that apply to the `selector`. diff --git a/gcloud-sdk/genproto/google.cloud.aiplatform.v1.rs b/gcloud-sdk/genproto/google.cloud.aiplatform.v1.rs index d83a8170a..e3df7dd16 100644 --- a/gcloud-sdk/genproto/google.cloud.aiplatform.v1.rs +++ b/gcloud-sdk/genproto/google.cloud.aiplatform.v1.rs @@ -2410,6 +2410,15 @@ pub struct BatchPredictionJob { /// must be provided. #[prost(message, optional, tag = "7")] pub dedicated_resources: ::core::option::Option, + /// The service account that the DeployedModel's container runs as. If not + /// specified, a system generated one will be used, which + /// has minimal permissions and the custom container, if used, may not have + /// enough permission to access other GCP resources. + /// + /// Users deploying the Model must have the `iam.serviceAccounts.actAs` + /// permission on this service account. + #[prost(string, tag = "29")] + pub service_account: ::prost::alloc::string::String, /// Immutable. Parameters configuring the batch behavior. Currently only applicable when /// \[dedicated_resources][google.cloud.aiplatform.v1.BatchPredictionJob.dedicated_resources\] are used (in other cases Vertex AI does /// the tuning itself). diff --git a/gcloud-sdk/genproto/google.cloud.beyondcorp.appconnections.v1.rs b/gcloud-sdk/genproto/google.cloud.beyondcorp.appconnections.v1.rs index 94d289970..1a1e6f55a 100644 --- a/gcloud-sdk/genproto/google.cloud.beyondcorp.appconnections.v1.rs +++ b/gcloud-sdk/genproto/google.cloud.beyondcorp.appconnections.v1.rs @@ -433,12 +433,12 @@ pub mod app_connections_service_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; use tonic::codegen::http::Uri; - /// ## API Overview + /// API Overview: /// /// The `beyondcorp.googleapis.com` service implements the Google Cloud /// BeyondCorp API. /// - /// ## Data Model + /// Data Model: /// /// The AppConnectionsService exposes the following resources: /// diff --git a/gcloud-sdk/genproto/google.cloud.beyondcorp.appconnectors.v1.rs b/gcloud-sdk/genproto/google.cloud.beyondcorp.appconnectors.v1.rs index 8c058bd7d..f4d41513c 100644 --- a/gcloud-sdk/genproto/google.cloud.beyondcorp.appconnectors.v1.rs +++ b/gcloud-sdk/genproto/google.cloud.beyondcorp.appconnectors.v1.rs @@ -435,12 +435,12 @@ pub mod app_connectors_service_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; use tonic::codegen::http::Uri; - /// ## API Overview + /// API Overview: /// /// The `beyondcorp.googleapis.com` service implements the Google Cloud /// BeyondCorp API. /// - /// ## Data Model + /// Data Model: /// /// The AppConnectorsService exposes the following resource: /// diff --git a/gcloud-sdk/genproto/google.cloud.beyondcorp.appgateways.v1.rs b/gcloud-sdk/genproto/google.cloud.beyondcorp.appgateways.v1.rs index 3fd26b08c..b3a6b19de 100644 --- a/gcloud-sdk/genproto/google.cloud.beyondcorp.appgateways.v1.rs +++ b/gcloud-sdk/genproto/google.cloud.beyondcorp.appgateways.v1.rs @@ -315,12 +315,12 @@ pub mod app_gateways_service_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; use tonic::codegen::http::Uri; - /// ## API Overview + /// API Overview: /// /// The `beyondcorp.googleapis.com` service implements the Google Cloud /// BeyondCorp API. /// - /// ## Data Model + /// Data Model: /// /// The AppGatewaysService exposes the following resources: /// diff --git a/gcloud-sdk/genproto/google.cloud.beyondcorp.clientconnectorservices.v1.rs b/gcloud-sdk/genproto/google.cloud.beyondcorp.clientconnectorservices.v1.rs index 8ec8f4518..2fbdfef4c 100644 --- a/gcloud-sdk/genproto/google.cloud.beyondcorp.clientconnectorservices.v1.rs +++ b/gcloud-sdk/genproto/google.cloud.beyondcorp.clientconnectorservices.v1.rs @@ -353,12 +353,12 @@ pub mod client_connector_services_service_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; use tonic::codegen::http::Uri; - /// ## API Overview + /// API Overview: /// /// The `beyondcorp.googleapis.com` service implements the Google Cloud /// BeyondCorp API. /// - /// ## Data Model + /// Data Model: /// /// The ClientConnectorServicesService exposes the following resources: /// diff --git a/gcloud-sdk/genproto/google.cloud.beyondcorp.clientgateways.v1.rs b/gcloud-sdk/genproto/google.cloud.beyondcorp.clientgateways.v1.rs index 6fa9f63b9..907673f70 100644 --- a/gcloud-sdk/genproto/google.cloud.beyondcorp.clientgateways.v1.rs +++ b/gcloud-sdk/genproto/google.cloud.beyondcorp.clientgateways.v1.rs @@ -207,12 +207,12 @@ pub mod client_gateways_service_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; use tonic::codegen::http::Uri; - /// ## API Overview + /// API Overview: /// /// The `beyondcorp.googleapis.com` service implements the Google Cloud /// BeyondCorp API. /// - /// ## Data Model + /// Data Model: /// /// The ClientGatewaysService exposes the following resources: /// diff --git a/gcloud-sdk/genproto/google.cloud.bigquery.datatransfer.v1.rs b/gcloud-sdk/genproto/google.cloud.bigquery.datatransfer.v1.rs index 55b6efb4d..eef33af81 100644 --- a/gcloud-sdk/genproto/google.cloud.bigquery.datatransfer.v1.rs +++ b/gcloud-sdk/genproto/google.cloud.bigquery.datatransfer.v1.rs @@ -55,7 +55,9 @@ pub struct TransferConfig { /// User specified display name for the data transfer. #[prost(string, tag = "3")] pub display_name: ::prost::alloc::string::String, - /// Data source id. Cannot be changed once data transfer is created. + /// Data source ID. This cannot be changed once data transfer is created. The + /// full list of available data source IDs can be returned through an API call: + /// #[prost(string, tag = "5")] pub data_source_id: ::prost::alloc::string::String, /// Parameters specific to each data source. For more information see the @@ -360,7 +362,7 @@ pub struct DataSourceParameter { /// For integer and double values specifies minimum allowed value. #[prost(message, optional, tag = "9")] pub min_value: ::core::option::Option, - /// For integer and double values specifies maxminum allowed value. + /// For integer and double values specifies maximum allowed value. #[prost(message, optional, tag = "10")] pub max_value: ::core::option::Option, /// Deprecated. This field has no effect. @@ -604,7 +606,7 @@ pub struct GetDataSourceRequest { pub struct ListDataSourcesRequest { /// Required. The BigQuery project id for which data sources should be returned. /// Must be in the form: `projects/{project_id}` or - /// `projects/{project_id}/locations/{location_id} + /// `projects/{project_id}/locations/{location_id}` #[prost(string, tag = "1")] pub parent: ::prost::alloc::string::String, /// Pagination token, which can be used to request a specific page @@ -632,9 +634,9 @@ pub struct ListDataSourcesResponse { pub next_page_token: ::prost::alloc::string::String, } /// A request to create a data transfer configuration. If new credentials are -/// needed for this transfer configuration, an authorization code must be -/// provided. If an authorization code is provided, the transfer configuration -/// will be associated with the user id corresponding to the authorization code. +/// needed for this transfer configuration, authorization info must be provided. +/// If authorization info is provided, the transfer configuration will be +/// associated with the user id corresponding to the authorization info. /// Otherwise, the transfer configuration will be associated with the calling /// user. #[derive(Clone, PartialEq, ::prost::Message)] @@ -649,79 +651,100 @@ pub struct CreateTransferConfigRequest { #[prost(message, optional, tag = "2")] pub transfer_config: ::core::option::Option, /// Optional OAuth2 authorization code to use with this transfer configuration. - /// This is required if new credentials are needed, as indicated by - /// `CheckValidCreds`. - /// In order to obtain authorization_code, please make a - /// request to - /// &scope=&redirect_uri=> + /// This is required only if `transferConfig.dataSourceId` is 'youtube_channel' + /// and new credentials are needed, as indicated by `CheckValidCreds`. In order + /// to obtain authorization_code, make a request to the following URL: + ///
+    /// client_id&scope=data_source_scopes>
+    /// 
+ /// * The client_id is the OAuth client_id of the a data source as + /// returned by ListDataSources method. + /// * data_source_scopes are the scopes returned by ListDataSources + /// method. /// - /// * client_id should be OAuth client_id of BigQuery DTS API for the given - /// data source returned by ListDataSources method. - /// * data_source_scopes are the scopes returned by ListDataSources method. - /// * redirect_uri is an optional parameter. If not specified, then - /// authorization code is posted to the opener of authorization flow window. - /// Otherwise it will be sent to the redirect uri. A special value of - /// urn:ietf:wg:oauth:2.0:oob means that authorization code should be - /// returned in the title bar of the browser, with the page text prompting - /// the user to copy the code and paste it in the application. + /// Note that this should not be set when `service_account_name` is used to + /// create the transfer config. #[prost(string, tag = "3")] pub authorization_code: ::prost::alloc::string::String, - /// Optional version info. If users want to find a very recent access token, - /// that is, immediately after approving access, users have to set the - /// version_info claim in the token request. To obtain the version_info, users - /// must use the "none+gsession" response type. which be return a - /// version_info back in the authorization response which be be put in a JWT - /// claim in the token request. + /// Optional version info. This is required only if + /// `transferConfig.dataSourceId` is not 'youtube_channel' and new credentials + /// are needed, as indicated by `CheckValidCreds`. In order to obtain version + /// info, make a request to the following URL: + ///
+    /// client_id&scope=data_source_scopes>
+    /// 
+ /// * The client_id is the OAuth client_id of the a data source as + /// returned by ListDataSources method. + /// * data_source_scopes are the scopes returned by ListDataSources + /// method. + /// + /// Note that this should not be set when `service_account_name` is used to + /// create the transfer config. #[prost(string, tag = "5")] pub version_info: ::prost::alloc::string::String, - /// Optional service account name. If this field is set, transfer config will - /// be created with this service account credentials. It requires that - /// requesting user calling this API has permissions to act as this service + /// Optional service account name. If this field is set, the transfer config + /// will be created with this service account's credentials. It requires that + /// the requesting user calling this API has permissions to act as this service /// account. + /// + /// Note that not all data sources support service account credentials when + /// creating a transfer config. For the latest list of data sources, read about + /// [using service + /// accounts](). #[prost(string, tag = "6")] pub service_account_name: ::prost::alloc::string::String, } /// A request to update a transfer configuration. To update the user id of the -/// transfer configuration, an authorization code needs to be provided. +/// transfer configuration, authorization info needs to be provided. #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateTransferConfigRequest { /// Required. Data transfer configuration to create. #[prost(message, optional, tag = "1")] pub transfer_config: ::core::option::Option, /// Optional OAuth2 authorization code to use with this transfer configuration. - /// If it is provided, the transfer configuration will be associated with the - /// authorizing user. - /// In order to obtain authorization_code, please make a - /// request to - /// &scope=&redirect_uri=> + /// This is required only if `transferConfig.dataSourceId` is 'youtube_channel' + /// and new credentials are needed, as indicated by `CheckValidCreds`. In order + /// to obtain authorization_code, make a request to the following URL: + ///
+    /// client_id&scope=data_source_scopes>
+    /// 
+ /// * The client_id is the OAuth client_id of the a data source as + /// returned by ListDataSources method. + /// * data_source_scopes are the scopes returned by ListDataSources + /// method. /// - /// * client_id should be OAuth client_id of BigQuery DTS API for the given - /// data source returned by ListDataSources method. - /// * data_source_scopes are the scopes returned by ListDataSources method. - /// * redirect_uri is an optional parameter. If not specified, then - /// authorization code is posted to the opener of authorization flow window. - /// Otherwise it will be sent to the redirect uri. A special value of - /// urn:ietf:wg:oauth:2.0:oob means that authorization code should be - /// returned in the title bar of the browser, with the page text prompting - /// the user to copy the code and paste it in the application. + /// Note that this should not be set when `service_account_name` is used to + /// update the transfer config. #[prost(string, tag = "3")] pub authorization_code: ::prost::alloc::string::String, /// Required. Required list of fields to be updated in this request. #[prost(message, optional, tag = "4")] pub update_mask: ::core::option::Option<::prost_types::FieldMask>, - /// Optional version info. If users want to find a very recent access token, - /// that is, immediately after approving access, users have to set the - /// version_info claim in the token request. To obtain the version_info, users - /// must use the "none+gsession" response type. which be return a - /// version_info back in the authorization response which be be put in a JWT - /// claim in the token request. + /// Optional version info. This is required only if + /// `transferConfig.dataSourceId` is not 'youtube_channel' and new credentials + /// are needed, as indicated by `CheckValidCreds`. In order to obtain version + /// info, make a request to the following URL: + ///
+    /// client_id&scope=data_source_scopes>
+    /// 
+ /// * The client_id is the OAuth client_id of the a data source as + /// returned by ListDataSources method. + /// * data_source_scopes are the scopes returned by ListDataSources + /// method. + /// + /// Note that this should not be set when `service_account_name` is used to + /// update the transfer config. #[prost(string, tag = "5")] pub version_info: ::prost::alloc::string::String, - /// Optional service account name. If this field is set and - /// "service_account_name" is set in update_mask, transfer config will be - /// updated to use this service account credentials. It requires that - /// requesting user calling this API has permissions to act as this service + /// Optional service account name. If this field is set, the transfer config + /// will be created with this service account's credentials. It requires that + /// the requesting user calling this API has permissions to act as this service /// account. + /// + /// Note that not all data sources support service account credentials when + /// creating a transfer config. For the latest list of data sources, read about + /// [using service + /// accounts](). #[prost(string, tag = "6")] pub service_account_name: ::prost::alloc::string::String, } @@ -765,7 +788,7 @@ pub struct DeleteTransferRunRequest { /// A request to list data transfers configured for a BigQuery project. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListTransferConfigsRequest { - /// Required. The BigQuery project id for which data sources + /// Required. The BigQuery project id for which transfer configs /// should be returned: `projects/{project_id}` or /// `projects/{project_id}/locations/{location_id}` #[prost(string, tag = "1")] @@ -1007,8 +1030,7 @@ pub struct StartManualTransferRunsResponse { /// BigQuery UI's `Transfer` tab. #[derive(Clone, PartialEq, ::prost::Message)] pub struct EnrollDataSourcesRequest { - /// The name of the project resource in the form: - /// `projects/{project_id}` + /// The name of the project resource in the form: `projects/{project_id}` #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, /// Data sources that are enrolled. It is required to provide at least one @@ -1385,10 +1407,12 @@ pub mod data_transfer_service_client { } /// Enroll data sources in a user project. This allows users to create transfer /// configurations for these data sources. They will also appear in the - /// ListDataSources RPC and as such, will appear in the BigQuery UI - /// 'https://bigquery.cloud.google.com' (and the documents can be found at - /// https://cloud.google.com/bigquery/bigquery-web-ui and - /// https://cloud.google.com/bigquery/docs/working-with-transfers). + /// ListDataSources RPC and as such, will appear in the + /// [BigQuery UI](https://console.cloud.google.com/bigquery), and the documents + /// can be found in the public guide for + /// [BigQuery Web UI](https://cloud.google.com/bigquery/bigquery-web-ui) and + /// [Data Transfer + /// Service](https://cloud.google.com/bigquery/docs/working-with-transfers). pub async fn enroll_data_sources( &mut self, request: impl tonic::IntoRequest, diff --git a/gcloud-sdk/genproto/google.cloud.bigquery.storage.v1.rs b/gcloud-sdk/genproto/google.cloud.bigquery.storage.v1.rs index b830b34cc..598ea4f1b 100644 --- a/gcloud-sdk/genproto/google.cloud.bigquery.storage.v1.rs +++ b/gcloud-sdk/genproto/google.cloud.bigquery.storage.v1.rs @@ -857,6 +857,32 @@ pub struct AppendRowsRequest { /// respected. #[prost(string, tag = "6")] pub trace_id: ::prost::alloc::string::String, + /// A map to indicate how to interpret missing value for some fields. Missing + /// values are fields present in user schema but missing in rows. The key is + /// the field name. The value is the interpretation of missing values for the + /// field. + /// + /// For example, a map {'foo': NULL_VALUE, 'bar': DEFAULT_VALUE} means all + /// missing values in field foo are interpreted as NULL, all missing values in + /// field bar are interpreted as the default value of field bar in table + /// schema. + /// + /// If a field is not in this map and has missing values, the missing values + /// in this field are interpreted as NULL. + /// + /// This field only applies to the current request, it won't affect other + /// requests on the connection. + /// + /// Currently, field name can only be top-level column name, can't be a struct + /// field path like 'foo.bar'. + #[prost( + map = "string, enumeration(append_rows_request::MissingValueInterpretation)", + tag = "7" + )] + pub missing_value_interpretations: ::std::collections::HashMap< + ::prost::alloc::string::String, + i32, + >, /// Input rows. The `writer_schema` field must be specified at the initial /// request and currently, it will be ignored if specified in following /// requests. Following requests must have data in the same format as the @@ -882,6 +908,47 @@ pub mod append_rows_request { #[prost(message, optional, tag = "2")] pub rows: ::core::option::Option, } + /// An enum to indicate how to interpret missing values. Missing values are + /// fields present in user schema but missing in rows. A missing value can + /// represent a NULL or a column default value defined in BigQuery table + /// schema. + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum MissingValueInterpretation { + /// Invalid missing value interpretation. Requests with this value will be + /// rejected. + Unspecified = 0, + /// Missing value is interpreted as NULL. + NullValue = 1, + /// Missing value is interpreted as column default value if declared in the + /// table schema, NULL otherwise. + DefaultValue = 2, + } + impl MissingValueInterpretation { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + MissingValueInterpretation::Unspecified => { + "MISSING_VALUE_INTERPRETATION_UNSPECIFIED" + } + MissingValueInterpretation::NullValue => "NULL_VALUE", + MissingValueInterpretation::DefaultValue => "DEFAULT_VALUE", + } + } + } /// Input rows. The `writer_schema` field must be specified at the initial /// request and currently, it will be ignored if specified in following /// requests. Following requests must have data in the same format as the diff --git a/gcloud-sdk/genproto/google.cloud.billing.v1.rs b/gcloud-sdk/genproto/google.cloud.billing.v1.rs index c691712d7..dec88db63 100644 --- a/gcloud-sdk/genproto/google.cloud.billing.v1.rs +++ b/gcloud-sdk/genproto/google.cloud.billing.v1.rs @@ -1,8 +1,9 @@ -/// A billing account in [GCP Console](). -/// You can assign a billing account to one or more projects. +/// A billing account in the +/// [Google Cloud Console](). You can assign a +/// billing account to one or more projects. #[derive(Clone, PartialEq, ::prost::Message)] pub struct BillingAccount { - /// The resource name of the billing account. The resource name has the form + /// Output only. The resource name of the billing account. The resource name has the form /// `billingAccounts/{billing_account_id}`. For example, /// `billingAccounts/012345-567890-ABCDEF` would be the resource name for /// billing account `012345-567890-ABCDEF`. @@ -14,20 +15,20 @@ pub struct BillingAccount { #[prost(bool, tag = "2")] pub open: bool, /// The display name given to the billing account, such as `My Billing - /// Account`. This name is displayed in the GCP Console. + /// Account`. This name is displayed in the Google Cloud Console. #[prost(string, tag = "3")] pub display_name: ::prost::alloc::string::String, /// If this account is a /// \[subaccount\](), then this - /// will be the resource name of the master billing account that it is being + /// will be the resource name of the parent billing account that it is being /// resold through. /// Otherwise this will be empty. #[prost(string, tag = "4")] pub master_billing_account: ::prost::alloc::string::String, } -/// Encapsulation of billing information for a GCP Console project. A project -/// has at most one associated billing account at a time (but a billing account -/// can be assigned to multiple projects). +/// Encapsulation of billing information for a Google Cloud Console project. A +/// project has at most one associated billing account at a time (but a billing +/// account can be assigned to multiple projects). #[derive(Clone, PartialEq, ::prost::Message)] pub struct ProjectBillingInfo { /// The resource name for the `ProjectBillingInfo`; has the form @@ -98,7 +99,7 @@ pub struct ListBillingAccountsResponse { pub struct CreateBillingAccountRequest { /// Required. The billing account resource to create. /// Currently CreateBillingAccount only supports subaccount creation, so - /// any created billing accounts must be under a provided master billing + /// any created billing accounts must be under a provided parent billing /// account. #[prost(message, optional, tag = "1")] pub billing_account: ::core::option::Option, @@ -172,7 +173,8 @@ pub mod cloud_billing_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; use tonic::codegen::http::Uri; - /// Retrieves GCP Console billing accounts and associates them with projects. + /// Retrieves the Google Cloud Console billing accounts and associates them with + /// projects. #[derive(Debug, Clone)] pub struct CloudBillingClient { inner: tonic::client::Grpc, @@ -306,15 +308,20 @@ pub mod cloud_billing_client { ); self.inner.unary(request.into_request(), path, codec).await } - /// Creates a billing account. - /// This method can only be used to create - /// [billing subaccounts](https://cloud.google.com/billing/docs/concepts) - /// by GCP resellers. + /// This method creates [billing + /// subaccounts](https://cloud.google.com/billing/docs/concepts#subaccounts). + /// + /// Google Cloud resellers should use the + /// Channel Services APIs, + /// [accounts.customers.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers/create) + /// and + /// [accounts.customers.entitlements.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers.entitlements/create). + /// /// When creating a subaccount, the current authenticated user must have the - /// `billing.accounts.update` IAM permission on the master account, which is + /// `billing.accounts.update` IAM permission on the parent account, which is /// typically given to billing account /// [administrators](https://cloud.google.com/billing/docs/how-to/billing-access). - /// This method will return an error if the master account has not been + /// This method will return an error if the parent account has not been /// provisioned as a reseller account. pub async fn create_billing_account( &mut self, @@ -362,9 +369,10 @@ pub mod cloud_billing_client { self.inner.unary(request.into_request(), path, codec).await } /// Gets the billing information for a project. The current authenticated user - /// must have [permission to view the - /// project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo - /// ). + /// must have the `resourcemanager.projects.get` permission for the project, + /// which can be granted by assigning the [Project + /// Viewer](https://cloud.google.com/iam/docs/understanding-roles#predefined_roles) + /// role. pub async fn get_project_billing_info( &mut self, request: impl tonic::IntoRequest, @@ -393,7 +401,7 @@ pub mod cloud_billing_client { /// usage charges. /// /// *Note:* Incurred charges that have not yet been reported in the transaction - /// history of the GCP Console might be billed to the new billing + /// history of the Google Cloud Console might be billed to the new billing /// account, even if the charge occurred before the new billing account was /// assigned to the project. /// @@ -571,6 +579,9 @@ pub struct Sku { /// This is 'Google' for first party services in Google Cloud Platform. #[prost(string, tag = "7")] pub service_provider_name: ::prost::alloc::string::String, + /// The geographic taxonomy for this sku. + #[prost(message, optional, tag = "8")] + pub geo_taxonomy: ::core::option::Option, } /// Represents the category hierarchy of a SKU. #[derive(Clone, PartialEq, ::prost::Message)] @@ -637,6 +648,21 @@ pub struct PricingExpression { /// Example: usage_unit of "GiBy" means that usage is specified in "Gibi Byte". #[prost(string, tag = "1")] pub usage_unit: ::prost::alloc::string::String, + /// The recommended quantity of units for displaying pricing info. When + /// displaying pricing info it is recommended to display: + /// (unit_price * display_quantity) per display_quantity usage_unit. + /// This field does not affect the pricing formula and is for display purposes + /// only. + /// Example: If the unit_price is "0.0001 USD", the usage_unit is "GB" and + /// the display_quantity is "1000" then the recommended way of displaying the + /// pricing info is "0.10 USD per 1000 GB" + #[prost(double, tag = "2")] + pub display_quantity: f64, + /// The list of tiered rates for this pricing. The total cost is computed by + /// applying each of the tiered rates on usage. This repeated list is sorted + /// by ascending order of start_usage_amount. + #[prost(message, repeated, tag = "3")] + pub tiered_rates: ::prost::alloc::vec::Vec, /// The unit of usage in human readable form. /// Example: "gibi byte". #[prost(string, tag = "4")] @@ -656,21 +682,6 @@ pub struct PricingExpression { /// base_unit. #[prost(double, tag = "7")] pub base_unit_conversion_factor: f64, - /// The recommended quantity of units for displaying pricing info. When - /// displaying pricing info it is recommended to display: - /// (unit_price * display_quantity) per display_quantity usage_unit. - /// This field does not affect the pricing formula and is for display purposes - /// only. - /// Example: If the unit_price is "0.0001 USD", the usage_unit is "GB" and - /// the display_quantity is "1000" then the recommended way of displaying the - /// pricing info is "0.10 USD per 1000 GB" - #[prost(double, tag = "2")] - pub display_quantity: f64, - /// The list of tiered rates for this pricing. The total cost is computed by - /// applying each of the tiered rates on usage. This repeated list is sorted - /// by ascending order of start_usage_amount. - #[prost(message, repeated, tag = "3")] - pub tiered_rates: ::prost::alloc::vec::Vec, } /// Nested message and enum types in `PricingExpression`. pub mod pricing_expression { @@ -772,6 +783,59 @@ pub mod aggregation_info { } } } +/// Encapsulates the geographic taxonomy data for a sku. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GeoTaxonomy { + /// The type of Geo Taxonomy: GLOBAL, REGIONAL, or MULTI_REGIONAL. + #[prost(enumeration = "geo_taxonomy::Type", tag = "1")] + pub r#type: i32, + /// The list of regions associated with a sku. Empty for Global skus, which are + /// associated with all Google Cloud regions. + #[prost(string, repeated, tag = "2")] + pub regions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +/// Nested message and enum types in `GeoTaxonomy`. +pub mod geo_taxonomy { + /// The type of Geo Taxonomy: GLOBAL, REGIONAL, or MULTI_REGIONAL. + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum Type { + /// The type is not specified. + Unspecified = 0, + /// The sku is global in nature, e.g. a license sku. Global skus are + /// available in all regions, and so have an empty region list. + Global = 1, + /// The sku is available in a specific region, e.g. "us-west2". + Regional = 2, + /// The sku is associated with multiple regions, e.g. "us-west2" and + /// "us-east1". + MultiRegional = 3, + } + impl Type { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Type::Unspecified => "TYPE_UNSPECIFIED", + Type::Global => "GLOBAL", + Type::Regional => "REGIONAL", + Type::MultiRegional => "MULTI_REGIONAL", + } + } + } +} /// Request message for `ListServices`. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListServicesRequest { diff --git a/gcloud-sdk/genproto/google.cloud.dialogflow.cx.v3.rs b/gcloud-sdk/genproto/google.cloud.dialogflow.cx.v3.rs index 79ba54a3f..1ab6e3f2d 100644 --- a/gcloud-sdk/genproto/google.cloud.dialogflow.cx.v3.rs +++ b/gcloud-sdk/genproto/google.cloud.dialogflow.cx.v3.rs @@ -9636,12 +9636,11 @@ pub mod security_settings { /// a few days without allowing direct readings. #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum DataRetention { - /// Retains data in interaction logging for the specified number of days. - /// This does not apply to Cloud logging, which is owned by the user - not - /// Dialogflow. - /// User must set a value lower than Dialogflow's default 365d TTL (time to - /// live). Setting a value higher than that has no effect. A missing value or - /// setting to 0 also means we use Dialogflow's default TTL. + /// Retains the data for the specified number of days. + /// User must set a value lower than Dialogflow's default 365d TTL (30 days + /// for Agent Assist traffic), higher value will be ignored and use default. + /// Setting a value higher than that has no effect. A missing value or + /// setting to 0 also means we use default TTL. #[prost(int32, tag = "6")] RetentionWindowDays(i32), } diff --git a/gcloud-sdk/genproto/google.cloud.documentai.v1beta3.rs b/gcloud-sdk/genproto/google.cloud.documentai.v1beta3.rs index 3cf40d287..40493c794 100644 --- a/gcloud-sdk/genproto/google.cloud.documentai.v1beta3.rs +++ b/gcloud-sdk/genproto/google.cloud.documentai.v1beta3.rs @@ -3,41 +3,43 @@ pub struct Barcode { /// Format of a barcode. /// The supported formats are: - /// CODE_128: Code 128 type. - /// CODE_39: Code 39 type. - /// CODE_93: Code 93 type. - /// CODABAR: Codabar type. - /// DATA_MATRIX: 2D Data Matrix type. - /// ITF: ITF type. - /// EAN_13: EAN-13 type. - /// EAN_8: EAN-8 type. - /// QR_CODE: 2D QR code type. - /// UPC_A: UPC-A type. - /// UPC_E: UPC-E type. - /// PDF417: PDF417 type. - /// AZTEC: 2D Aztec code type. - /// DATABAR: GS1 DataBar code type. + /// + /// - `CODE_128`: Code 128 type. + /// - `CODE_39`: Code 39 type. + /// - `CODE_93`: Code 93 type. + /// - `CODABAR`: Codabar type. + /// - `DATA_MATRIX`: 2D Data Matrix type. + /// - `ITF`: ITF type. + /// - `EAN_13`: EAN-13 type. + /// - `EAN_8`: EAN-8 type. + /// - `QR_CODE`: 2D QR code type. + /// - `UPC_A`: UPC-A type. + /// - `UPC_E`: UPC-E type. + /// - `PDF417`: PDF417 type. + /// - `AZTEC`: 2D Aztec code type. + /// - `DATABAR`: GS1 DataBar code type. #[prost(string, tag = "1")] pub format: ::prost::alloc::string::String, /// Value format describes the format of the value that a barcode /// encodes. /// The supported formats are: - /// CONTACT_INFO: Contact information. - /// EMAIL: Email address. - /// ISBN: ISBN identifier. - /// PHONE: Phone number. - /// PRODUCT: Product. - /// SMS: SMS message. - /// TEXT: Text string. - /// URL: URL address. - /// WIFI: Wifi information. - /// GEO: Geo-localization. - /// CALENDAR_EVENT: Calendar event. - /// DRIVER_LICENSE: Driver's license. + /// + /// - `CONTACT_INFO`: Contact information. + /// - `EMAIL`: Email address. + /// - `ISBN`: ISBN identifier. + /// - `PHONE`: Phone number. + /// - `PRODUCT`: Product. + /// - `SMS`: SMS message. + /// - `TEXT`: Text string. + /// - `URL`: URL address. + /// - `WIFI`: Wifi information. + /// - `GEO`: Geo-localization. + /// - `CALENDAR_EVENT`: Calendar event. + /// - `DRIVER_LICENSE`: Driver's license. #[prost(string, tag = "2")] pub value_format: ::prost::alloc::string::String, /// Raw value encoded in the barcode. - /// For example, 'MEBKM:TITLE:Google;URL: + /// For example: `'MEBKM:TITLE:Google;URL: #[prost(string, tag = "3")] pub raw_value: ::prost::alloc::string::String, } @@ -101,9 +103,9 @@ pub struct Document { /// Placeholder. Relationship among \[Document.entities][google.cloud.documentai.v1beta3.Document.entities\]. #[prost(message, repeated, tag = "8")] pub entity_relations: ::prost::alloc::vec::Vec, - /// Placeholder. A list of text corrections made to \[Document.text\]. This is - /// usually used for annotating corrections to OCR mistakes. Text changes for - /// a given revision may not overlap with each other. + /// Placeholder. A list of text corrections made to \[Document.text][google.cloud.documentai.v1beta3.Document.text\]. This + /// is usually used for annotating corrections to OCR mistakes. Text changes + /// for a given revision may not overlap with each other. #[prost(message, repeated, tag = "14")] pub text_changes: ::prost::alloc::vec::Vec, /// Information about the sharding if this document is sharded part of a larger @@ -169,6 +171,10 @@ pub mod document { /// Font size. #[prost(message, optional, tag = "7")] pub font_size: ::core::option::Option, + /// Font family such as `Arial`, `Times New Roman`. + /// + #[prost(string, tag = "8")] + pub font_family: ::prost::alloc::string::String, } /// Nested message and enum types in `Style`. pub mod style { @@ -241,7 +247,11 @@ pub mod document { /// A list of detected barcodes. #[prost(message, repeated, tag = "15")] pub detected_barcodes: ::prost::alloc::vec::Vec, + /// Image Quality Scores. + #[prost(message, optional, tag = "17")] + pub image_quality_scores: ::core::option::Option, /// The history of this page. + #[deprecated] #[prost(message, optional, tag = "16")] pub provenance: ::core::option::Option, } @@ -304,7 +314,7 @@ pub mod document { pub text_anchor: ::core::option::Option, /// Confidence of the current \[Layout][google.cloud.documentai.v1beta3.Document.Page.Layout\] within context of the object this /// layout is for. e.g. confidence can be for a single token, a table, - /// a visual element, etc. depending on context. Range [0, 1]. + /// a visual element, etc. depending on context. Range `[0, 1]`. #[prost(float, tag = "2")] pub confidence: f32, /// The bounding polygon for the \[Layout][google.cloud.documentai.v1beta3.Document.Page.Layout\]. @@ -371,6 +381,7 @@ pub mod document { #[prost(message, repeated, tag = "2")] pub detected_languages: ::prost::alloc::vec::Vec, /// The history of this annotation. + #[deprecated] #[prost(message, optional, tag = "3")] pub provenance: ::core::option::Option, } @@ -384,6 +395,7 @@ pub mod document { #[prost(message, repeated, tag = "2")] pub detected_languages: ::prost::alloc::vec::Vec, /// The history of this annotation. + #[deprecated] #[prost(message, optional, tag = "3")] pub provenance: ::core::option::Option, } @@ -398,6 +410,7 @@ pub mod document { #[prost(message, repeated, tag = "2")] pub detected_languages: ::prost::alloc::vec::Vec, /// The history of this annotation. + #[deprecated] #[prost(message, optional, tag = "3")] pub provenance: ::core::option::Option, } @@ -413,7 +426,8 @@ pub mod document { /// A list of detected languages together with confidence. #[prost(message, repeated, tag = "3")] pub detected_languages: ::prost::alloc::vec::Vec, - /// The history of this annotation. + /// The history of this annotation. + #[deprecated] #[prost(message, optional, tag = "4")] pub provenance: ::core::option::Option, } @@ -506,6 +520,9 @@ pub mod document { /// A list of detected languages together with confidence. #[prost(message, repeated, tag = "4")] pub detected_languages: ::prost::alloc::vec::Vec, + /// The history of this table. + #[prost(message, optional, tag = "5")] + pub provenance: ::core::option::Option, } /// Nested message and enum types in `Table`. pub mod table { @@ -585,15 +602,50 @@ pub mod document { /// Detected language for a structural component. #[derive(Clone, PartialEq, ::prost::Message)] pub struct DetectedLanguage { - /// The BCP-47 language code, such as "en-US" or "sr-Latn". For more + /// The BCP-47 language code, such as `en-US` or `sr-Latn`. For more /// information, see /// #[prost(string, tag = "1")] pub language_code: ::prost::alloc::string::String, - /// Confidence of detected language. Range [0, 1]. + /// Confidence of detected language. Range `[0, 1]`. #[prost(float, tag = "2")] pub confidence: f32, } + /// Image Quality Scores for the page image + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ImageQualityScores { + /// The overall quality score. Range `[0, 1]` where 1 is perfect quality. + #[prost(float, tag = "1")] + pub quality_score: f32, + /// A list of detected defects. + #[prost(message, repeated, tag = "2")] + pub detected_defects: ::prost::alloc::vec::Vec< + image_quality_scores::DetectedDefect, + >, + } + /// Nested message and enum types in `ImageQualityScores`. + pub mod image_quality_scores { + /// Image Quality Defects + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct DetectedDefect { + /// Name of the defect type. Supported values are: + /// + /// - `quality/defect_blurry` + /// - `quality/defect_noisy` + /// - `quality/defect_dark` + /// - `quality/defect_faint` + /// - `quality/defect_text_too_small` + /// - `quality/defect_document_cutoff` + /// - `quality/defect_text_cutoff` + /// - `quality/defect_glare` + #[prost(string, tag = "1")] + pub r#type: ::prost::alloc::string::String, + /// Confidence of detected defect. Range `[0, 1]` where 1 indicates + /// strong confidence of that the defect exists. + #[prost(float, tag = "2")] + pub confidence: f32, + } + } } /// An entity that could be a phrase in the text or a property that belongs to /// the document. It is a known entity type, such as a person, an organization, @@ -607,14 +659,13 @@ pub mod document { /// Required. Entity type from a schema e.g. `Address`. #[prost(string, tag = "2")] pub r#type: ::prost::alloc::string::String, - /// Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. If the entity - /// is not present in the document, this field will be empty. + /// Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`. #[prost(string, tag = "3")] pub mention_text: ::prost::alloc::string::String, /// Optional. Deprecated. Use `id` field instead. #[prost(string, tag = "4")] pub mention_id: ::prost::alloc::string::String, - /// Optional. Confidence of detected Schema entity. Range [0, 1]. + /// Optional. Confidence of detected Schema entity. Range `[0, 1]`. #[prost(float, tag = "5")] pub confidence: f32, /// Optional. Represents the provenance of this entity wrt. the location on the @@ -654,6 +705,7 @@ pub mod document { /// or int normalized text by default. /// /// Below are sample formats mapped to structured values. + /// /// - Money/Currency type (`money_value`) is in the ISO 4217 text format. /// - Date type (`date_value`) is in the ISO 8601 text format. /// - Datetime type (`datetime_value`) is in the ISO 8601 text format. @@ -783,7 +835,7 @@ pub mod document { /// Optional. Identifies the bounding polygon of a layout element on the page. #[prost(message, optional, tag = "4")] pub bounding_poly: ::core::option::Option, - /// Optional. Confidence of detected page element, if applicable. Range [0, 1]. + /// Optional. Confidence of detected page element, if applicable. Range `[0, 1]`. #[prost(float, tag = "5")] pub confidence: f32, } @@ -993,6 +1045,7 @@ pub mod document { #[prost(string, tag = "2")] pub changed_text: ::prost::alloc::string::String, /// The history of this annotation. + #[deprecated] #[prost(message, repeated, tag = "3")] pub provenance: ::prost::alloc::vec::Vec, } @@ -1020,7 +1073,7 @@ pub struct RawDocument { #[prost(bytes = "vec", tag = "1")] pub content: ::prost::alloc::vec::Vec, /// An IANA MIME type (RFC6838) indicating the nature and format of the - /// \[content\]. + /// \[content][google.cloud.documentai.v1beta3.RawDocument.content\]. #[prost(string, tag = "2")] pub mime_type: ::prost::alloc::string::String, } @@ -1060,7 +1113,7 @@ pub mod batch_documents_input_config { /// The source. #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Source { - /// The set of documents that match the specified Cloud Storage \[gcs_prefix\]. + /// The set of documents that match the specified Cloud Storage `gcs_prefix`. #[prost(message, tag = "1")] GcsPrefix(super::GcsPrefix), /// The set of documents individually specified on Cloud Storage. @@ -1084,6 +1137,11 @@ pub mod document_output_config { /// The Cloud Storage uri (a directory) of the output. #[prost(string, tag = "1")] pub gcs_uri: ::prost::alloc::string::String, + /// Specifies which fields to include in the output documents. + /// Only supports top level document and pages field so it must be in the + /// form of `{document_field_name}` or `pages.{page_field_name}`. + #[prost(message, optional, tag = "2")] + pub field_mask: ::core::option::Option<::prost_types::FieldMask>, } /// The destination of the results. #[derive(Clone, PartialEq, ::prost::Oneof)] @@ -1122,15 +1180,16 @@ pub mod document_schema { /// Name of the type. It must be unique within the schema file and /// cannot be a 'Common Type'. Besides that we use the following naming /// conventions: - /// - *use snake_casing* + /// + /// - *use `snake_casing`* /// - name matching is case-insensitive /// - Maximum 64 characters. /// - Must start with a letter. /// - Allowed characters: ASCII letters `\[a-z0-9_-\]`. (For backward /// compatibility internal infrastructure and tooling can handle any ascii /// character) - /// - The '/' is sometimes used to denote a property of a type. For example - /// line_item/amount. This convention is deprecated, but will still be + /// - The `/` is sometimes used to denote a property of a type. For example + /// `line_item/amount`. This convention is deprecated, but will still be /// honored for backward compatibility. #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, @@ -1247,6 +1306,175 @@ pub mod document_schema { pub skip_naming_validation: bool, } } +/// An evaluation of a ProcessorVersion's performance. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Evaluation { + /// The resource name of the evaluation. + /// Format: + /// `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}` + #[prost(string, tag = "1")] + pub name: ::prost::alloc::string::String, + /// The time that the evaluation was created. + #[prost(message, optional, tag = "2")] + pub create_time: ::core::option::Option<::prost_types::Timestamp>, + /// Counters for the documents used in the evaluation. + #[prost(message, optional, tag = "5")] + pub document_counters: ::core::option::Option, + /// Metrics for all the entities in aggregate. + #[prost(message, optional, tag = "3")] + pub all_entities_metrics: ::core::option::Option, + /// Metrics across confidence levels, for different entities. + #[prost(map = "string, message", tag = "4")] + pub entity_metrics: ::std::collections::HashMap< + ::prost::alloc::string::String, + evaluation::MultiConfidenceMetrics, + >, + /// The KMS key name used for encryption. + #[prost(string, tag = "6")] + pub kms_key_name: ::prost::alloc::string::String, + /// The KMS key version with which data is encrypted. + #[prost(string, tag = "7")] + pub kms_key_version_name: ::prost::alloc::string::String, +} +/// Nested message and enum types in `Evaluation`. +pub mod evaluation { + /// Evaluation counters for the documents that were used. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Counters { + /// How many documents were sent for evaluation. + #[prost(int32, tag = "1")] + pub input_documents_count: i32, + /// How many documents were not included in the evaluation as they didn't + /// pass validation. + #[prost(int32, tag = "2")] + pub invalid_documents_count: i32, + /// How many documents were not included in the evaluation as Document AI + /// failed to process them. + #[prost(int32, tag = "3")] + pub failed_documents_count: i32, + /// How many documents were used in the evaluation. + #[prost(int32, tag = "4")] + pub evaluated_documents_count: i32, + } + /// Evaluation metrics, either in aggregate or about a specific entity. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Metrics { + /// The calculated precision. + #[prost(float, tag = "1")] + pub precision: f32, + /// The calculated recall. + #[prost(float, tag = "2")] + pub recall: f32, + /// The calculated f1 score. + #[prost(float, tag = "3")] + pub f1_score: f32, + /// The amount of occurrences in predicted documents. + #[prost(int32, tag = "4")] + pub predicted_occurrences_count: i32, + /// The amount of occurrences in ground truth documents. + #[prost(int32, tag = "5")] + pub ground_truth_occurrences_count: i32, + /// The amount of documents with a predicted occurrence. + #[prost(int32, tag = "10")] + pub predicted_document_count: i32, + /// The amount of documents with a ground truth occurrence. + #[prost(int32, tag = "11")] + pub ground_truth_document_count: i32, + /// The amount of true positives. + #[prost(int32, tag = "6")] + pub true_positives_count: i32, + /// The amount of false positives. + #[prost(int32, tag = "7")] + pub false_positives_count: i32, + /// The amount of false negatives. + #[prost(int32, tag = "8")] + pub false_negatives_count: i32, + /// The amount of documents that had an occurrence of this label. + #[prost(int32, tag = "9")] + pub total_documents_count: i32, + } + /// Evaluations metrics, at a specific confidence level. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ConfidenceLevelMetrics { + /// The confidence level. + #[prost(float, tag = "1")] + pub confidence_level: f32, + /// The metrics at the specific confidence level. + #[prost(message, optional, tag = "2")] + pub metrics: ::core::option::Option, + } + /// Metrics across multiple confidence levels. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct MultiConfidenceMetrics { + /// Metrics across confidence levels with fuzzy matching enabled. + #[prost(message, repeated, tag = "1")] + pub confidence_level_metrics: ::prost::alloc::vec::Vec, + /// Metrics across confidence levels with only exact matching. + #[prost(message, repeated, tag = "4")] + pub confidence_level_metrics_exact: ::prost::alloc::vec::Vec< + ConfidenceLevelMetrics, + >, + /// The calculated area under the precision recall curve (AUPRC), computed by + /// integrating over all confidence thresholds. + #[prost(float, tag = "2")] + pub auprc: f32, + /// The Estimated Calibration Error (ECE) of the confidence of the predicted + /// entities. + #[prost(float, tag = "3")] + pub estimated_calibration_error: f32, + /// The AUPRC for metrics with fuzzy matching disabled, i.e., exact matching + /// only. + #[prost(float, tag = "5")] + pub auprc_exact: f32, + /// The ECE for the predicted entities with fuzzy matching disabled, i.e., + /// exact matching only. + #[prost(float, tag = "6")] + pub estimated_calibration_error_exact: f32, + /// The metrics type for the label. + #[prost(enumeration = "multi_confidence_metrics::MetricsType", tag = "7")] + pub metrics_type: i32, + } + /// Nested message and enum types in `MultiConfidenceMetrics`. + pub mod multi_confidence_metrics { + /// A type that determines how metrics should be interpreted. + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum MetricsType { + /// The metrics type is unspecified. By default, metrics without a + /// particular specification are for leaf entity types (i.e., top-level + /// entity types without child types, or child types which are not + /// parent types themselves). + Unspecified = 0, + /// Indicates whether metrics for this particular label type represent an + /// aggregate of metrics for other types instead of being based on actual + /// TP/FP/FN values for the label type. Metrics for parent (i.e., non-leaf) + /// entity types are an aggregate of metrics for their children. + Aggregate = 1, + } + impl MetricsType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + MetricsType::Unspecified => "METRICS_TYPE_UNSPECIFIED", + MetricsType::Aggregate => "AGGREGATE", + } + } + } + } +} /// The common metadata for long running operations. #[derive(Clone, PartialEq, ::prost::Message)] pub struct CommonOperationMetadata { @@ -1327,6 +1555,9 @@ pub struct ProcessorVersion { /// The display name of the processor version. #[prost(string, tag = "2")] pub display_name: ::prost::alloc::string::String, + /// The schema of the processor version. Describes the output. + #[prost(message, optional, tag = "12")] + pub document_schema: ::core::option::Option, /// The state of the processor version. #[prost(enumeration = "processor_version::State", tag = "6")] pub state: i32, @@ -1416,7 +1647,7 @@ pub struct Processor { /// Format: `projects/{project}/locations/{location}/processors/{processor}` #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, - /// The processor type, e.g., OCR_PROCESSOR, INVOICE_PROCESSOR, etc. + /// The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, etc. /// To get a list of processors types, see /// \[FetchProcessorTypes][google.cloud.documentai.v1beta3.DocumentProcessorService.FetchProcessorTypes\]. #[prost(string, tag = "2")] @@ -1465,12 +1696,12 @@ pub mod processor { Enabled = 1, /// The processor is disabled. Disabled = 2, - /// The processor is being enabled, will become ENABLED if successful. + /// The processor is being enabled, will become `ENABLED` if successful. Enabling = 3, - /// The processor is being disabled, will become DISABLED if successful. + /// The processor is being disabled, will become `DISABLED` if successful. Disabling = 4, - /// The processor is being created, will become either ENABLED (for - /// successful creation) or FAILED (for failed ones). + /// The processor is being created, will become either `ENABLED` (for + /// successful creation) or `FAILED` (for failed ones). /// Once a processor is in this state, it can then be used for document /// processing, but the feature dependencies of the processor might not be /// fully created yet. @@ -1506,10 +1737,10 @@ pub mod processor { #[derive(Clone, PartialEq, ::prost::Message)] pub struct ProcessorType { /// The resource name of the processor type. - /// Format: projects/{project}/processorTypes/{processor_type} + /// Format: `projects/{project}/processorTypes/{processor_type}` #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, - /// The type of the processor, e.g., "invoice_parsing". + /// The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, etc. #[prost(string, tag = "2")] pub r#type: ::prost::alloc::string::String, /// The processor category, used by UI to group processor types. @@ -1556,6 +1787,8 @@ pub struct ProcessRequest { #[prost(bool, tag = "3")] pub skip_human_review: bool, /// Specifies which fields to include in ProcessResponse's document. + /// Only supports top level document and pages field so it must be in the form + /// of `{document_field_name}` or `pages.{page_field_name}`. #[prost(message, optional, tag = "6")] pub field_mask: ::core::option::Option<::prost_types::FieldMask>, /// The document payload. @@ -2054,6 +2287,93 @@ pub struct SetDefaultProcessorVersionMetadata { #[prost(message, optional, tag = "1")] pub common_metadata: ::core::option::Option, } +/// Request message for the create processor version method. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TrainProcessorVersionRequest { + /// Required. The parent (project, location and processor) to create the new version for. + /// Format: `projects/{project}/locations/{location}/processors/{processor}`. + #[prost(string, tag = "1")] + pub parent: ::prost::alloc::string::String, + /// Required. The processor version to be created. + #[prost(message, optional, tag = "2")] + pub processor_version: ::core::option::Option, + /// Optional. The schema the processor version will be trained with. + #[prost(message, optional, tag = "10")] + pub document_schema: ::core::option::Option, + /// Optional. The input data used to train the `ProcessorVersion`. + #[prost(message, optional, tag = "4")] + pub input_data: ::core::option::Option, + /// Optional. The processor version to use as a base for training. This processor version + /// must be a child of `parent`. Format: + /// `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`. + #[prost(string, tag = "8")] + pub base_processor_version: ::prost::alloc::string::String, +} +/// Nested message and enum types in `TrainProcessorVersionRequest`. +pub mod train_processor_version_request { + /// The input data used to train a new `ProcessorVersion`. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct InputData { + /// The documents used for training the new version. + #[prost(message, optional, tag = "3")] + pub training_documents: ::core::option::Option, + /// The documents used for testing the trained version. + #[prost(message, optional, tag = "4")] + pub test_documents: ::core::option::Option, + } +} +/// The response for the TrainProcessorVersion method. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TrainProcessorVersionResponse { + /// The resource name of the processor version produced by training. + #[prost(string, tag = "1")] + pub processor_version: ::prost::alloc::string::String, +} +/// The metadata that represents a processor version being created. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TrainProcessorVersionMetadata { + /// The basic metadata of the long running operation. + #[prost(message, optional, tag = "1")] + pub common_metadata: ::core::option::Option, + /// The training dataset validation information. + #[prost(message, optional, tag = "2")] + pub training_dataset_validation: ::core::option::Option< + train_processor_version_metadata::DatasetValidation, + >, + /// The test dataset validation information. + #[prost(message, optional, tag = "3")] + pub test_dataset_validation: ::core::option::Option< + train_processor_version_metadata::DatasetValidation, + >, +} +/// Nested message and enum types in `TrainProcessorVersionMetadata`. +pub mod train_processor_version_metadata { + /// The dataset validation information. + /// This includes any and all errors with documents and the dataset. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct DatasetValidation { + /// The total number of document errors. + #[prost(int32, tag = "3")] + pub document_error_count: i32, + /// The total number of dataset errors. + #[prost(int32, tag = "4")] + pub dataset_error_count: i32, + /// Error information pertaining to specific documents. A maximum of 10 + /// document errors will be returned. + /// Any document with errors will not be used throughout training. + #[prost(message, repeated, tag = "1")] + pub document_errors: ::prost::alloc::vec::Vec< + super::super::super::super::rpc::Status, + >, + /// Error information for the dataset as a whole. A maximum of 10 dataset + /// errors will be returned. + /// A single dataset error is terminal for training. + #[prost(message, repeated, tag = "2")] + pub dataset_errors: ::prost::alloc::vec::Vec< + super::super::super::super::rpc::Status, + >, + } +} /// Request message for review document method. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ReviewDocumentRequest { @@ -2240,6 +2560,68 @@ pub mod review_document_operation_metadata { } } } +/// Evaluates the given ProcessorVersion against the supplied documents. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EvaluateProcessorVersionRequest { + /// Required. The resource name of the \[ProcessorVersion][google.cloud.documentai.v1beta3.ProcessorVersion\] to evaluate. + /// `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` + #[prost(string, tag = "1")] + pub processor_version: ::prost::alloc::string::String, + /// Optional. The documents used in the evaluation. If unspecified, use the processor's + /// dataset as evaluation input. + #[prost(message, optional, tag = "3")] + pub evaluation_documents: ::core::option::Option, +} +/// Metadata of the EvaluateProcessorVersion method. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EvaluateProcessorVersionMetadata { + /// The basic metadata of the long running operation. + #[prost(message, optional, tag = "1")] + pub common_metadata: ::core::option::Option, +} +/// Metadata of the EvaluateProcessorVersion method. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EvaluateProcessorVersionResponse { + /// The resource name of the created evaluation. + #[prost(string, tag = "2")] + pub evaluation: ::prost::alloc::string::String, +} +/// Retrieves a specific Evaluation. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetEvaluationRequest { + /// Required. The resource name of the \[Evaluation][google.cloud.documentai.v1beta3.Evaluation\] to get. + /// `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}` + #[prost(string, tag = "1")] + pub name: ::prost::alloc::string::String, +} +/// Retrieves a list of evaluations for a given ProcessorVersion. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListEvaluationsRequest { + /// Required. The resource name of the \[ProcessorVersion][google.cloud.documentai.v1beta3.ProcessorVersion\] to list evaluations for. + /// `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` + #[prost(string, tag = "1")] + pub parent: ::prost::alloc::string::String, + /// The standard list page size. + /// If unspecified, at most 5 evaluations will be returned. + /// The maximum value is 100; values above 100 will be coerced to 100. + #[prost(int32, tag = "2")] + pub page_size: i32, + /// A page token, received from a previous `ListEvaluations` call. + /// Provide this to retrieve the subsequent page. + #[prost(string, tag = "3")] + pub page_token: ::prost::alloc::string::String, +} +/// The response from ListEvaluations. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListEvaluationsResponse { + /// The evaluations requested. + #[prost(message, repeated, tag = "1")] + pub evaluations: ::prost::alloc::vec::Vec, + /// A token, which can be sent as `page_token` to retrieve the next page. + /// If this field is omitted, there are no subsequent pages. + #[prost(string, tag = "2")] + pub next_page_token: ::prost::alloc::string::String, +} /// Generated client implementations. pub mod document_processor_service_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] @@ -2440,6 +2822,31 @@ pub mod document_processor_service_client { ); self.inner.unary(request.into_request(), path, codec).await } + /// Trains a new processor version. + /// Operation metadata is returned as + /// cloud_documentai_core.TrainProcessorVersionMetadata. + pub async fn train_processor_version( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.documentai.v1beta3.DocumentProcessorService/TrainProcessorVersion", + ); + self.inner.unary(request.into_request(), path, codec).await + } /// Gets a processor version detail. pub async fn get_processor_version( &mut self, @@ -2693,5 +3100,69 @@ pub mod document_processor_service_client { ); self.inner.unary(request.into_request(), path, codec).await } + /// Evaluates a ProcessorVersion against annotated documents, producing an + /// Evaluation. + pub async fn evaluate_processor_version( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.documentai.v1beta3.DocumentProcessorService/EvaluateProcessorVersion", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Retrieves a specific evaluation. + pub async fn get_evaluation( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.documentai.v1beta3.DocumentProcessorService/GetEvaluation", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Retrieves a set of evaluations for a given processor version. + pub async fn list_evaluations( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.documentai.v1beta3.DocumentProcessorService/ListEvaluations", + ); + self.inner.unary(request.into_request(), path, codec).await + } } } diff --git a/gcloud-sdk/genproto/google.cloud.identitytoolkit.v2.rs b/gcloud-sdk/genproto/google.cloud.identitytoolkit.v2.rs index a433364f4..e22dc23fb 100644 --- a/gcloud-sdk/genproto/google.cloud.identitytoolkit.v2.rs +++ b/gcloud-sdk/genproto/google.cloud.identitytoolkit.v2.rs @@ -121,6 +121,7 @@ pub mod finalize_mfa_enrollment_response { /// MFA verified enrollment information. #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum AuxiliaryAuthInfo { + /// Auxiliary auth info specific to phone auth. #[prost(message, tag = "3")] PhoneAuthInfo(super::FinalizeMfaPhoneResponseInfo), } diff --git a/gcloud-sdk/genproto/google.cloud.kms.v1.rs b/gcloud-sdk/genproto/google.cloud.kms.v1.rs index 4c8b16128..61faa3f32 100644 --- a/gcloud-sdk/genproto/google.cloud.kms.v1.rs +++ b/gcloud-sdk/genproto/google.cloud.kms.v1.rs @@ -834,6 +834,14 @@ pub mod crypto_key_version { EcSignSecp256k1Sha256 = 31, /// HMAC-SHA256 signing with a 256 bit key. HmacSha256 = 32, + /// HMAC-SHA1 signing with a 160 bit key. + HmacSha1 = 33, + /// HMAC-SHA384 signing with a 384 bit key. + HmacSha384 = 34, + /// HMAC-SHA512 signing with a 512 bit key. + HmacSha512 = 35, + /// HMAC-SHA224 signing with a 224 bit key. + HmacSha224 = 36, /// Algorithm representing symmetric encryption by an external key manager. ExternalSymmetricEncryption = 18, } @@ -910,6 +918,10 @@ pub mod crypto_key_version { "EC_SIGN_SECP256K1_SHA256" } CryptoKeyVersionAlgorithm::HmacSha256 => "HMAC_SHA256", + CryptoKeyVersionAlgorithm::HmacSha1 => "HMAC_SHA1", + CryptoKeyVersionAlgorithm::HmacSha384 => "HMAC_SHA384", + CryptoKeyVersionAlgorithm::HmacSha512 => "HMAC_SHA512", + CryptoKeyVersionAlgorithm::HmacSha224 => "HMAC_SHA224", CryptoKeyVersionAlgorithm::ExternalSymmetricEncryption => { "EXTERNAL_SYMMETRIC_ENCRYPTION" } diff --git a/gcloud-sdk/genproto/google.cloud.lifesciences.v2beta.rs b/gcloud-sdk/genproto/google.cloud.lifesciences.v2beta.rs index f62413108..5cc5ddbc7 100644 --- a/gcloud-sdk/genproto/google.cloud.lifesciences.v2beta.rs +++ b/gcloud-sdk/genproto/google.cloud.lifesciences.v2beta.rs @@ -48,6 +48,15 @@ pub struct Pipeline { ::prost::alloc::string::String, ::prost::alloc::string::String, >, + /// The encrypted environment to pass into every action. Each action can also + /// specify its own encrypted environment. + /// + /// The secret must decrypt to a JSON-encoded dictionary where key-value pairs + /// serve as environment variable names and their values. The decoded + /// environment variables can overwrite the values specified by the + /// `environment` field. + #[prost(message, optional, tag = "5")] + pub encrypted_environment: ::core::option::Option, /// The maximum amount of time to give the pipeline to complete. This includes /// the time spent waiting for a worker to be allocated. If the pipeline fails /// to complete before the timeout, it will be cancelled and the error code @@ -112,6 +121,17 @@ pub struct Action { ::prost::alloc::string::String, ::prost::alloc::string::String, >, + /// The encrypted environment to pass into the container. This environment is + /// merged with values specified in the + /// \[google.cloud.lifesciences.v2beta.Pipeline][google.cloud.lifesciences.v2beta.Pipeline\] message, overwriting any + /// duplicate values. + /// + /// The secret must decrypt to a JSON-encoded dictionary where key-value pairs + /// serve as environment variable names and their values. The decoded + /// environment variables can overwrite the values specified by the + /// `environment` field. + #[prost(message, optional, tag = "21")] + pub encrypted_environment: ::core::option::Option, /// An optional identifier for a PID namespace to run the action inside. /// Multiple actions should use the same string to share a namespace. If /// unspecified, a separate isolated namespace is used. @@ -360,6 +380,10 @@ pub struct VirtualMachine { /// Specify either the `volumes[]` field or the `disks[]` field, but not both. #[prost(message, repeated, tag = "14")] pub volumes: ::prost::alloc::vec::Vec, + /// If specified, the VM will only be allocated inside the matching + /// reservation. It will fail if the VM parameters don't match the reservation. + #[prost(string, tag = "15")] + pub reservation: ::prost::alloc::string::String, } /// Carries information about a Google Cloud service account. #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/gcloud-sdk/genproto/google.cloud.memcache.v1.rs b/gcloud-sdk/genproto/google.cloud.memcache.v1.rs index fbffca89f..d5229df11 100644 --- a/gcloud-sdk/genproto/google.cloud.memcache.v1.rs +++ b/gcloud-sdk/genproto/google.cloud.memcache.v1.rs @@ -1,16 +1,17 @@ +/// A Memorystore for Memcached instance #[derive(Clone, PartialEq, ::prost::Message)] pub struct Instance { /// Required. Unique name of the resource in this scope including project and /// location using the form: /// `projects/{project_id}/locations/{location_id}/instances/{instance_id}` /// - /// Note: Memcached instances are managed and addressed at regional level so - /// location_id here refers to a GCP region; however, users may choose which - /// zones Memcached nodes within an instances should be provisioned in. - /// Refer to \[zones\] field for more details. + /// Note: Memcached instances are managed and addressed at the regional level + /// so `location_id` here refers to a Google Cloud region; however, users may + /// choose which zones Memcached nodes should be provisioned in within an + /// instance. Refer to \[zones][google.cloud.memcache.v1.Instance.zones\] field for more details. #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, - /// User provided name for the instance only used for display + /// User provided name for the instance, which is only used for display /// purposes. Cannot be more than 80 characters. #[prost(string, tag = "2")] pub display_name: ::prost::alloc::string::String, @@ -28,7 +29,7 @@ pub struct Instance { /// will be used. #[prost(string, tag = "4")] pub authorized_network: ::prost::alloc::string::String, - /// Zones where Memcached nodes should be provisioned in. + /// Zones in which Memcached nodes should be provisioned. /// Memcached nodes will be equally distributed across these zones. If not /// provided, the service will by default create nodes in all zones in the /// region for the instance. @@ -42,17 +43,17 @@ pub struct Instance { pub node_config: ::core::option::Option, /// The major version of Memcached software. /// If not provided, latest supported version will be used. Currently the - /// latest supported major version is MEMCACHE_1_5. + /// latest supported major version is `MEMCACHE_1_5`. /// The minor version will be automatically determined by our system based on /// the latest supported minor version. #[prost(enumeration = "MemcacheVersion", tag = "9")] pub memcache_version: i32, - /// Optional: User defined parameters to apply to the memcached process + /// User defined parameters to apply to the memcached process /// on each node. #[prost(message, optional, tag = "11")] pub parameters: ::core::option::Option, /// Output only. List of Memcached nodes. - /// Refer to \[Node\] message for more details. + /// Refer to \[Node][google.cloud.memcache.v1.Instance.Node\] message for more details. #[prost(message, repeated, tag = "12")] pub memcache_nodes: ::prost::alloc::vec::Vec, /// Output only. The time the instance was created. @@ -70,12 +71,20 @@ pub struct Instance { /// The full version format will be "memcached-1.5.16". #[prost(string, tag = "18")] pub memcache_full_version: ::prost::alloc::string::String, - /// List of messages that describe current statuses of memcached instance. + /// List of messages that describe the current state of the Memcached instance. #[prost(message, repeated, tag = "19")] pub instance_messages: ::prost::alloc::vec::Vec, - /// Output only. Endpoint for Discovery API + /// Output only. Endpoint for the Discovery API. #[prost(string, tag = "20")] pub discovery_endpoint: ::prost::alloc::string::String, + /// The maintenance policy for the instance. If not provided, + /// the maintenance event will be performed based on Memorystore + /// internal rollout schedule. + #[prost(message, optional, tag = "21")] + pub maintenance_policy: ::core::option::Option, + /// Output only. Published maintenance schedule. + #[prost(message, optional, tag = "22")] + pub maintenance_schedule: ::core::option::Option, } /// Nested message and enum types in `Instance`. pub mod instance { @@ -217,6 +226,9 @@ pub mod instance { Creating = 1, /// Memcached instance has been created and ready to be used. Ready = 2, + /// Memcached instance is updating configuration such as maintenance policy + /// and schedule. + Updating = 3, /// Memcached instance is being deleted. Deleting = 4, /// Memcached instance is going through maintenance, e.g. data plane rollout. @@ -232,12 +244,117 @@ pub mod instance { State::Unspecified => "STATE_UNSPECIFIED", State::Creating => "CREATING", State::Ready => "READY", + State::Updating => "UPDATING", State::Deleting => "DELETING", State::PerformingMaintenance => "PERFORMING_MAINTENANCE", } } } } +/// Maintenance policy per instance. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MaintenancePolicy { + /// Output only. The time when the policy was created. + #[prost(message, optional, tag = "1")] + pub create_time: ::core::option::Option<::prost_types::Timestamp>, + /// Output only. The time when the policy was updated. + #[prost(message, optional, tag = "2")] + pub update_time: ::core::option::Option<::prost_types::Timestamp>, + /// Description of what this policy is for. Create/Update methods + /// return INVALID_ARGUMENT if the length is greater than 512. + #[prost(string, tag = "3")] + pub description: ::prost::alloc::string::String, + /// Required. Maintenance window that is applied to resources covered by this + /// policy. Minimum 1. For the current version, the maximum number of + /// weekly_maintenance_windows is expected to be one. + #[prost(message, repeated, tag = "4")] + pub weekly_maintenance_window: ::prost::alloc::vec::Vec, +} +/// Time window specified for weekly operations. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct WeeklyMaintenanceWindow { + /// Required. Allows to define schedule that runs specified day of the week. + #[prost(enumeration = "super::super::super::r#type::DayOfWeek", tag = "1")] + pub day: i32, + /// Required. Start time of the window in UTC. + #[prost(message, optional, tag = "2")] + pub start_time: ::core::option::Option, + /// Required. Duration of the time window. + #[prost(message, optional, tag = "3")] + pub duration: ::core::option::Option<::prost_types::Duration>, +} +/// Upcoming maintenance schedule. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MaintenanceSchedule { + /// Output only. The start time of any upcoming scheduled maintenance for this instance. + #[prost(message, optional, tag = "1")] + pub start_time: ::core::option::Option<::prost_types::Timestamp>, + /// Output only. The end time of any upcoming scheduled maintenance for this instance. + #[prost(message, optional, tag = "2")] + pub end_time: ::core::option::Option<::prost_types::Timestamp>, + /// Output only. The deadline that the maintenance schedule start time can not go beyond, + /// including reschedule. + #[prost(message, optional, tag = "4")] + pub schedule_deadline_time: ::core::option::Option<::prost_types::Timestamp>, +} +/// Request for \[RescheduleMaintenance][google.cloud.memcache.v1.CloudMemcache.RescheduleMaintenance\]. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RescheduleMaintenanceRequest { + /// Required. Memcache instance resource name using the form: + /// `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + /// where `location_id` refers to a GCP region. + #[prost(string, tag = "1")] + pub instance: ::prost::alloc::string::String, + /// Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well. + #[prost(enumeration = "reschedule_maintenance_request::RescheduleType", tag = "2")] + pub reschedule_type: i32, + /// Timestamp when the maintenance shall be rescheduled to if + /// reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for + /// example `2012-11-15T16:19:00.094Z`. + #[prost(message, optional, tag = "3")] + pub schedule_time: ::core::option::Option<::prost_types::Timestamp>, +} +/// Nested message and enum types in `RescheduleMaintenanceRequest`. +pub mod reschedule_maintenance_request { + /// Reschedule options. + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum RescheduleType { + /// Not set. + Unspecified = 0, + /// If the user wants to schedule the maintenance to happen now. + Immediate = 1, + /// If the user wants to use the existing maintenance policy to find the + /// next available window. + NextAvailableWindow = 2, + /// If the user wants to reschedule the maintenance to a specific time. + SpecificTime = 3, + } + impl RescheduleType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + RescheduleType::Unspecified => "RESCHEDULE_TYPE_UNSPECIFIED", + RescheduleType::Immediate => "IMMEDIATE", + RescheduleType::NextAvailableWindow => "NEXT_AVAILABLE_WINDOW", + RescheduleType::SpecificTime => "SPECIFIC_TIME", + } + } + } +} /// Request for \[ListInstances][google.cloud.memcache.v1.CloudMemcache.ListInstances\]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListInstancesRequest { @@ -249,18 +366,17 @@ pub struct ListInstancesRequest { /// The maximum number of items to return. /// /// If not specified, a default value of 1000 will be used by the service. - /// Regardless of the page_size value, the response may include a partial list - /// and a caller should only rely on response's - /// \[next_page_token][CloudMemcache.ListInstancesResponse.next_page_token\] + /// Regardless of the `page_size` value, the response may include a partial + /// list and a caller should only rely on response's + /// \[`next_page_token`][google.cloud.memcache.v1.ListInstancesResponse.next_page_token\] /// to determine if there are more instances left to be queried. #[prost(int32, tag = "2")] pub page_size: i32, - /// The next_page_token value returned from a previous List request, - /// if any. + /// The `next_page_token` value returned from a previous List request, if any. #[prost(string, tag = "3")] pub page_token: ::prost::alloc::string::String, /// List filter. For example, exclude all Memcached instances with name as - /// my-instance by specifying "name != my-instance". + /// my-instance by specifying `"name != my-instance"`. #[prost(string, tag = "4")] pub filter: ::prost::alloc::string::String, /// Sort results. Supported values are "name", "name desc" or "" (unsorted). @@ -309,9 +425,9 @@ pub struct CreateInstanceRequest { /// * Must start with a letter. /// * Must be between 1-40 characters. /// * Must end with a number or a letter. - /// * Must be unique within the user project / location + /// * Must be unique within the user project / location. /// - /// If any of the above are not met, will raise an invalid argument error. + /// If any of the above are not met, the API raises an invalid argument error. #[prost(string, tag = "2")] pub instance_id: ::prost::alloc::string::String, /// Required. A Memcached Instance @@ -322,6 +438,7 @@ pub struct CreateInstanceRequest { #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateInstanceRequest { /// Required. Mask of fields to update. + /// /// * `displayName` #[prost(message, optional, tag = "1")] pub update_mask: ::core::option::Option<::prost_types::FieldMask>, @@ -346,12 +463,12 @@ pub struct ApplyParametersRequest { /// should be applied. #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, - /// Nodes to which we should apply the instance-level parameter group. + /// Nodes to which the instance-level parameter group is applied. #[prost(string, repeated, tag = "2")] pub node_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, /// Whether to apply instance-level parameter group to all nodes. If set to - /// true, will explicitly restrict users from specifying any nodes, and apply - /// parameter group updates to all nodes within the instance. + /// true, users are restricted from specifying individual nodes, and + /// `ApplyParameters` updates all nodes within the instance. #[prost(bool, tag = "3")] pub apply_all: bool, } @@ -373,8 +490,9 @@ pub struct UpdateParametersRequest { pub struct MemcacheParameters { /// Output only. The unique ID associated with this set of parameters. Users /// can use this id to determine if the parameters associated with the instance - /// differ from the parameters associated with the nodes and any action needs - /// to be taken to apply parameters on nodes. + /// differ from the parameters associated with the nodes. A discrepancy between + /// parameter ids can inform users that they may need to take action to apply + /// parameters on nodes. #[prost(string, tag = "1")] pub id: ::prost::alloc::string::String, /// User defined set of parameters to use in the memcached process. @@ -412,6 +530,20 @@ pub struct OperationMetadata { #[prost(string, tag = "7")] pub api_version: ::prost::alloc::string::String, } +/// Metadata for the given \[google.cloud.location.Location][google.cloud.location.Location\]. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LocationMetadata { + /// Output only. The set of available zones in the location. The map is keyed + /// by the lowercase ID of each zone, as defined by GCE. These keys can be + /// specified in the `zones` field when creating a Memcached instance. + #[prost(map = "string, message", tag = "1")] + pub available_zones: ::std::collections::HashMap< + ::prost::alloc::string::String, + ZoneMetadata, + >, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ZoneMetadata {} /// Memcached versions supported by our service. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] @@ -602,9 +734,10 @@ pub mod cloud_memcache_client { ); self.inner.unary(request.into_request(), path, codec).await } - /// Updates the defined Memcached Parameters for an existing Instance. + /// Updates the defined Memcached parameters for an existing instance. /// This method only stages the parameters, it must be followed by - /// ApplyParameters to apply the parameters to nodes of the Memcached Instance. + /// `ApplyParameters` to apply the parameters to nodes of the Memcached + /// instance. pub async fn update_parameters( &mut self, request: impl tonic::IntoRequest, @@ -650,7 +783,7 @@ pub mod cloud_memcache_client { ); self.inner.unary(request.into_request(), path, codec).await } - /// ApplyParameters will restart the set of specified nodes in order to update + /// `ApplyParameters` restarts the set of specified nodes in order to update /// them to the current set of parameters for the Memcached Instance. pub async fn apply_parameters( &mut self, @@ -674,5 +807,28 @@ pub mod cloud_memcache_client { ); self.inner.unary(request.into_request(), path, codec).await } + /// Reschedules upcoming maintenance event. + pub async fn reschedule_maintenance( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.memcache.v1.CloudMemcache/RescheduleMaintenance", + ); + self.inner.unary(request.into_request(), path, codec).await + } } } diff --git a/gcloud-sdk/genproto/google.cloud.memcache.v1beta2.rs b/gcloud-sdk/genproto/google.cloud.memcache.v1beta2.rs index 30c7f6d49..34e1b794d 100644 --- a/gcloud-sdk/genproto/google.cloud.memcache.v1beta2.rs +++ b/gcloud-sdk/genproto/google.cloud.memcache.v1beta2.rs @@ -48,7 +48,7 @@ pub struct Instance { /// the latest supported minor version. #[prost(enumeration = "MemcacheVersion", tag = "9")] pub memcache_version: i32, - /// Optional: User defined parameters to apply to the memcached process + /// User defined parameters to apply to the memcached process /// on each node. #[prost(message, optional, tag = "11")] pub parameters: ::core::option::Option, @@ -80,6 +80,14 @@ pub struct Instance { /// Output only. Returns true if there is an update waiting to be applied #[prost(bool, tag = "21")] pub update_available: bool, + /// The maintenance policy for the instance. If not provided, + /// the maintenance event will be performed based on Memorystore + /// internal rollout schedule. + #[prost(message, optional, tag = "22")] + pub maintenance_policy: ::core::option::Option, + /// Output only. Published maintenance schedule. + #[prost(message, optional, tag = "23")] + pub maintenance_schedule: ::core::option::Option, } /// Nested message and enum types in `Instance`. pub mod instance { @@ -224,6 +232,9 @@ pub mod instance { Creating = 1, /// Memcached instance has been created and ready to be used. Ready = 2, + /// Memcached instance is updating configuration such as maintenance policy + /// and schedule. + Updating = 3, /// Memcached instance is being deleted. Deleting = 4, /// Memcached instance is going through maintenance, e.g. data plane rollout. @@ -239,12 +250,59 @@ pub mod instance { State::Unspecified => "STATE_UNSPECIFIED", State::Creating => "CREATING", State::Ready => "READY", + State::Updating => "UPDATING", State::Deleting => "DELETING", State::PerformingMaintenance => "PERFORMING_MAINTENANCE", } } } } +/// Maintenance policy per instance. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MaintenancePolicy { + /// Output only. The time when the policy was created. + #[prost(message, optional, tag = "1")] + pub create_time: ::core::option::Option<::prost_types::Timestamp>, + /// Output only. The time when the policy was updated. + #[prost(message, optional, tag = "2")] + pub update_time: ::core::option::Option<::prost_types::Timestamp>, + /// Description of what this policy is for. Create/Update methods + /// return INVALID_ARGUMENT if the length is greater than 512. + #[prost(string, tag = "3")] + pub description: ::prost::alloc::string::String, + /// Required. Maintenance window that is applied to resources covered by this + /// policy. Minimum 1. For the current version, the maximum number of + /// weekly_maintenance_windows is expected to be one. + #[prost(message, repeated, tag = "4")] + pub weekly_maintenance_window: ::prost::alloc::vec::Vec, +} +/// Time window specified for weekly operations. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct WeeklyMaintenanceWindow { + /// Required. Allows to define schedule that runs specified day of the week. + #[prost(enumeration = "super::super::super::r#type::DayOfWeek", tag = "1")] + pub day: i32, + /// Required. Start time of the window in UTC. + #[prost(message, optional, tag = "2")] + pub start_time: ::core::option::Option, + /// Required. Duration of the time window. + #[prost(message, optional, tag = "3")] + pub duration: ::core::option::Option<::prost_types::Duration>, +} +/// Upcoming maintenance schedule. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MaintenanceSchedule { + /// Output only. The start time of any upcoming scheduled maintenance for this instance. + #[prost(message, optional, tag = "1")] + pub start_time: ::core::option::Option<::prost_types::Timestamp>, + /// Output only. The end time of any upcoming scheduled maintenance for this instance. + #[prost(message, optional, tag = "2")] + pub end_time: ::core::option::Option<::prost_types::Timestamp>, + /// Output only. The deadline that the maintenance schedule start time can not go beyond, + /// including reschedule. + #[prost(message, optional, tag = "4")] + pub schedule_deadline_time: ::core::option::Option<::prost_types::Timestamp>, +} /// Request for \[ListInstances][google.cloud.memcache.v1beta2.CloudMemcache.ListInstances\]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListInstancesRequest { @@ -328,6 +386,7 @@ pub struct CreateInstanceRequest { #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateInstanceRequest { /// Required. Mask of fields to update. + /// /// * `displayName` #[prost(message, optional, tag = "1")] pub update_mask: ::core::option::Option<::prost_types::FieldMask>, @@ -345,6 +404,64 @@ pub struct DeleteInstanceRequest { #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, } +/// Request for \[RescheduleMaintenance][google.cloud.memcache.v1beta2.CloudMemcache.RescheduleMaintenance\]. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RescheduleMaintenanceRequest { + /// Required. Memcache instance resource name using the form: + /// `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + /// where `location_id` refers to a GCP region. + #[prost(string, tag = "1")] + pub instance: ::prost::alloc::string::String, + /// Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well. + #[prost(enumeration = "reschedule_maintenance_request::RescheduleType", tag = "2")] + pub reschedule_type: i32, + /// Timestamp when the maintenance shall be rescheduled to if + /// reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for + /// example `2012-11-15T16:19:00.094Z`. + #[prost(message, optional, tag = "3")] + pub schedule_time: ::core::option::Option<::prost_types::Timestamp>, +} +/// Nested message and enum types in `RescheduleMaintenanceRequest`. +pub mod reschedule_maintenance_request { + /// Reschedule options. + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum RescheduleType { + /// Not set. + Unspecified = 0, + /// If the user wants to schedule the maintenance to happen now. + Immediate = 1, + /// If the user wants to use the existing maintenance policy to find the + /// next available window. + NextAvailableWindow = 2, + /// If the user wants to reschedule the maintenance to a specific time. + SpecificTime = 3, + } + impl RescheduleType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + RescheduleType::Unspecified => "RESCHEDULE_TYPE_UNSPECIFIED", + RescheduleType::Immediate => "IMMEDIATE", + RescheduleType::NextAvailableWindow => "NEXT_AVAILABLE_WINDOW", + RescheduleType::SpecificTime => "SPECIFIC_TIME", + } + } + } +} /// Request for \[ApplyParameters][google.cloud.memcache.v1beta2.CloudMemcache.ApplyParameters\]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ApplyParametersRequest { @@ -392,14 +509,13 @@ pub struct ApplySoftwareUpdateRequest { #[prost(bool, tag = "3")] pub apply_all: bool, } -/// The unique ID associated with this set of parameters. Users -/// can use this id to determine if the parameters associated with the instance -/// differ from the parameters associated with the nodes. A discrepancy between -/// parameter ids can inform users that they may need to take action to apply -/// parameters on nodes. #[derive(Clone, PartialEq, ::prost::Message)] pub struct MemcacheParameters { - /// Output only. + /// Output only. The unique ID associated with this set of parameters. Users + /// can use this id to determine if the parameters associated with the instance + /// differ from the parameters associated with the nodes. A discrepancy between + /// parameter ids can inform users that they may need to take action to apply + /// parameters on nodes. #[prost(string, tag = "1")] pub id: ::prost::alloc::string::String, /// User defined set of parameters to use in the memcached process. @@ -737,5 +853,28 @@ pub mod cloud_memcache_client { ); self.inner.unary(request.into_request(), path, codec).await } + /// Performs the apply phase of the RescheduleMaintenance verb. + pub async fn reschedule_maintenance( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.memcache.v1beta2.CloudMemcache/RescheduleMaintenance", + ); + self.inner.unary(request.into_request(), path, codec).await + } } } diff --git a/gcloud-sdk/genproto/google.cloud.notebooks.v1.rs b/gcloud-sdk/genproto/google.cloud.notebooks.v1.rs index d5d2d3f5b..1a1f0ef4b 100644 --- a/gcloud-sdk/genproto/google.cloud.notebooks.v1.rs +++ b/gcloud-sdk/genproto/google.cloud.notebooks.v1.rs @@ -1,3 +1,37 @@ +/// Defines flags that are used to run the diagnostic tool +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DiagnosticConfig { + /// Required. User Cloud Storage bucket location (REQUIRED) + /// ## Must be formatted with path prefix (gs://$GCS_BUCKET) + /// + /// Permissions: + /// User Managed Notebooks: + /// - storage.buckets.writer: Must be given to the project's service account + /// attached to VM. + /// Google Managed Notebooks: + /// - storage.buckets.writer: Must be given to the project's service account or + /// ## user credentials attached to VM depending on authentication mode. + /// + /// Cloud Storage bucket Log file will be written to + /// gs://$GCS_BUCKET/$RELATIVE_PATH/$VM_DATE_$TIME.tar.gz + #[prost(string, tag = "1")] + pub gcs_bucket: ::prost::alloc::string::String, + /// Optional. Defines the relative storage path in the Cloud Storage bucket where the + /// diagnostic logs will be written: Default path will be the root directory of + /// the Cloud Storage bucket (gs://$GCS_BUCKET/$DATE_$TIME.tar.gz) Example of + /// full path where Log file will be written: gs://$GCS_BUCKET/$RELATIVE_PATH/ + #[prost(string, tag = "2")] + pub relative_path: ::prost::alloc::string::String, + /// Optional. Enables flag to repair service for instance + #[prost(bool, tag = "3")] + pub repair_flag_enabled: bool, + /// Optional. Enables flag to capture packets from the instance for 30 seconds + #[prost(bool, tag = "4")] + pub packet_capture_flag_enabled: bool, + /// Optional. Enables flag to copy all `/home/jupyter` folder contents + #[prost(bool, tag = "5")] + pub copy_home_files_flag_enabled: bool, +} /// Definition of a software environment that is used to start a notebook /// instance. #[derive(Clone, PartialEq, ::prost::Message)] @@ -1806,6 +1840,60 @@ pub struct RuntimeSoftwareConfig { /// Output only. Bool indicating whether an newer image is available in an image family. #[prost(bool, optional, tag = "9")] pub upgradeable: ::core::option::Option, + /// Behavior for the post startup script. + #[prost( + enumeration = "runtime_software_config::PostStartupScriptBehavior", + tag = "10" + )] + pub post_startup_script_behavior: i32, + /// Bool indicating whether JupyterLab terminal will be available or not. + /// Default: False + #[prost(bool, optional, tag = "11")] + pub disable_terminal: ::core::option::Option, + /// Output only. version of boot image such as M100, from release label of the image. + #[prost(string, optional, tag = "12")] + pub version: ::core::option::Option<::prost::alloc::string::String>, +} +/// Nested message and enum types in `RuntimeSoftwareConfig`. +pub mod runtime_software_config { + /// Behavior for the post startup script. + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum PostStartupScriptBehavior { + /// Unspecified post startup script behavior. Will run only once at creation. + Unspecified = 0, + /// Runs the post startup script provided during creation at every start. + RunEveryStart = 1, + /// Downloads and runs the provided post startup script at every start. + DownloadAndRunEveryStart = 2, + } + impl PostStartupScriptBehavior { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + PostStartupScriptBehavior::Unspecified => { + "POST_STARTUP_SCRIPT_BEHAVIOR_UNSPECIFIED" + } + PostStartupScriptBehavior::RunEveryStart => "RUN_EVERY_START", + PostStartupScriptBehavior::DownloadAndRunEveryStart => { + "DOWNLOAD_AND_RUN_EVERY_START" + } + } + } + } } /// Contains runtime daemon metrics, such as OS and kernels and sessions stats. #[derive(Clone, PartialEq, ::prost::Message)] @@ -1893,8 +1981,8 @@ pub struct VirtualMachineConfig { /// /// A full URL or partial URI. Examples: /// - /// * ` - /// * `projects/\[project_id\]/regions/global/default` + /// * ` + /// * `projects/\[project_id\]/global/networks/default` /// /// Runtimes are managed resources inside Google Infrastructure. /// Runtimes support the following network configurations: @@ -2139,6 +2227,19 @@ pub struct ResetRuntimeRequest { #[prost(string, tag = "2")] pub request_id: ::prost::alloc::string::String, } +/// Request for upgrading a Managed Notebook Runtime to the latest version. +/// option (google.api.message_visibility).restriction = +/// "TRUSTED_TESTER,SPECIAL_TESTER"; +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpgradeRuntimeRequest { + /// Required. Format: + /// `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + #[prost(string, tag = "1")] + pub name: ::prost::alloc::string::String, + /// Idempotent request UUID. + #[prost(string, tag = "2")] + pub request_id: ::prost::alloc::string::String, +} /// Request for reporting a Managed Notebook Event. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ReportRuntimeEventRequest { @@ -2154,6 +2255,41 @@ pub struct ReportRuntimeEventRequest { #[prost(message, optional, tag = "3")] pub event: ::core::option::Option, } +/// Request for updating a Managed Notebook configuration. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateRuntimeRequest { + /// Required. The Runtime to be updated. + #[prost(message, optional, tag = "1")] + pub runtime: ::core::option::Option, + /// Required. Specifies the path, relative to `Runtime`, of + /// the field to update. For example, to change the software configuration + /// kernels, the `update_mask` parameter would be + /// specified as `software_config.kernels`, + /// and the `PATCH` request body would specify the new value, as follows: + /// + /// { + /// "software_config":{ + /// "kernels": [{ + /// 'repository': + /// 'gcr.io/deeplearning-platform-release/pytorch-gpu', 'tag': + /// 'latest' }], + /// } + /// } + /// + /// + /// Currently, only the following fields can be updated: + /// - software_config.kernels + /// - software_config.post_startup_script + /// - software_config.custom_gpu_driver_path + /// - software_config.idle_shutdown + /// - software_config.idle_shutdown_timeout + /// - software_config.disable_terminal + #[prost(message, optional, tag = "2")] + pub update_mask: ::core::option::Option<::prost_types::FieldMask>, + /// Idempotent request UUID. + #[prost(string, tag = "3")] + pub request_id: ::prost::alloc::string::String, +} /// Request for getting a new access token. #[derive(Clone, PartialEq, ::prost::Message)] pub struct RefreshRuntimeTokenInternalRequest { @@ -2176,6 +2312,17 @@ pub struct RefreshRuntimeTokenInternalResponse { #[prost(message, optional, tag = "2")] pub expire_time: ::core::option::Option<::prost_types::Timestamp>, } +/// Request for creating a notebook instance diagnostic file. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DiagnoseRuntimeRequest { + /// Required. Format: + /// `projects/{project_id}/locations/{location}/runtimes/{runtimes_id}` + #[prost(string, tag = "1")] + pub name: ::prost::alloc::string::String, + /// Required. Defines flags that are used to run the diagnostic tool + #[prost(message, optional, tag = "2")] + pub diagnostic_config: ::core::option::Option, +} /// Generated client implementations. pub mod managed_notebook_service_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] @@ -2312,6 +2459,29 @@ pub mod managed_notebook_service_client { ); self.inner.unary(request.into_request(), path, codec).await } + /// Update Notebook Runtime configuration. + pub async fn update_runtime( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.notebooks.v1.ManagedNotebookService/UpdateRuntime", + ); + self.inner.unary(request.into_request(), path, codec).await + } /// Deletes a single Runtime. pub async fn delete_runtime( &mut self, @@ -2435,6 +2605,29 @@ pub mod managed_notebook_service_client { ); self.inner.unary(request.into_request(), path, codec).await } + /// Upgrades a Managed Notebook Runtime to the latest version. + pub async fn upgrade_runtime( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.notebooks.v1.ManagedNotebookService/UpgradeRuntime", + ); + self.inner.unary(request.into_request(), path, codec).await + } /// Report and process a runtime event. pub async fn report_runtime_event( &mut self, @@ -2482,6 +2675,29 @@ pub mod managed_notebook_service_client { ); self.inner.unary(request.into_request(), path, codec).await } + /// Creates a Diagnostic File and runs Diagnostic Tool given a Runtime. + pub async fn diagnose_runtime( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.notebooks.v1.ManagedNotebookService/DiagnoseRuntime", + ); + self.inner.unary(request.into_request(), path, codec).await + } } } /// The definition of a schedule. @@ -2990,6 +3206,17 @@ pub struct ListEnvironmentsRequest { #[prost(string, tag = "3")] pub page_token: ::prost::alloc::string::String, } +/// Request for creating a notebook instance diagnostic file. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DiagnoseInstanceRequest { + /// Required. Format: + /// `projects/{project_id}/locations/{location}/instances/{instance_id}` + #[prost(string, tag = "1")] + pub name: ::prost::alloc::string::String, + /// Required. Defines flags that are used to run the diagnostic tool + #[prost(message, optional, tag = "2")] + pub diagnostic_config: ::core::option::Option, +} /// Response for listing environments. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListEnvironmentsResponse { @@ -3717,6 +3944,29 @@ pub mod notebook_service_client { ); self.inner.unary(request.into_request(), path, codec).await } + /// Creates a Diagnostic File and runs Diagnostic Tool given an Instance. + pub async fn diagnose_instance( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.notebooks.v1.NotebookService/DiagnoseInstance", + ); + self.inner.unary(request.into_request(), path, codec).await + } /// Allows notebook instances to /// call this endpoint to upgrade themselves. Do not use this method directly. pub async fn upgrade_instance_internal( diff --git a/gcloud-sdk/genproto/google.cloud.notebooks.v1beta1.rs b/gcloud-sdk/genproto/google.cloud.notebooks.v1beta1.rs index b86612cf2..b09b02a4a 100644 --- a/gcloud-sdk/genproto/google.cloud.notebooks.v1beta1.rs +++ b/gcloud-sdk/genproto/google.cloud.notebooks.v1beta1.rs @@ -77,6 +77,60 @@ pub struct ContainerImage { #[prost(string, tag = "2")] pub tag: ::prost::alloc::string::String, } +/// Reservation Affinity for consuming Zonal reservation. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ReservationAffinity { + /// Optional. Type of reservation to consume + #[prost(enumeration = "reservation_affinity::Type", tag = "1")] + pub consume_reservation_type: i32, + /// Optional. Corresponds to the label key of reservation resource. + #[prost(string, tag = "2")] + pub key: ::prost::alloc::string::String, + /// Optional. Corresponds to the label values of reservation resource. + #[prost(string, repeated, tag = "3")] + pub values: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +/// Nested message and enum types in `ReservationAffinity`. +pub mod reservation_affinity { + /// Indicates whether to consume capacity from an reservation or not. + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum Type { + /// Default type. + Unspecified = 0, + /// Do not consume from any allocated capacity. + NoReservation = 1, + /// Consume any reservation available. + AnyReservation = 2, + /// Must consume from a specific reservation. Must specify key value fields + /// for specifying the reservations. + SpecificReservation = 3, + } + impl Type { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Type::Unspecified => "TYPE_UNSPECIFIED", + Type::NoReservation => "NO_RESERVATION", + Type::AnyReservation => "ANY_RESERVATION", + Type::SpecificReservation => "SPECIFIC_RESERVATION", + } + } + } +} /// The definition of a notebook instance. #[derive(Clone, PartialEq, ::prost::Message)] pub struct Instance { @@ -86,15 +140,13 @@ pub struct Instance { pub name: ::prost::alloc::string::String, /// Path to a Bash script that automatically runs after a notebook instance /// fully boots up. The path must be a URL or - /// Cloud Storage path (`gs://path-to-file/file-name`). + /// Cloud Storage path (gs://path-to-file/file-name). #[prost(string, tag = "4")] pub post_startup_script: ::prost::alloc::string::String, - /// Output only. The proxy endpoint that is used to access the Jupyter - /// notebook. + /// Output only. The proxy endpoint that is used to access the Jupyter notebook. #[prost(string, tag = "5")] pub proxy_uri: ::prost::alloc::string::String, - /// Input only. The owner of this instance after creation. Format: - /// `alias@example.com` + /// Input only. The owner of this instance after creation. Format: `alias@example.com` /// /// Currently supports one owner only. If not specified, all of the service /// account users of your VM instance's service account can use @@ -111,15 +163,14 @@ pub struct Instance { /// is used. #[prost(string, tag = "7")] pub service_account: ::prost::alloc::string::String, - /// Required. The [Compute Engine machine - /// type]() of this + /// Required. The [Compute Engine machine type](/compute/docs/machine-types) of this /// instance. #[prost(string, tag = "8")] pub machine_type: ::prost::alloc::string::String, /// The hardware accelerator used on this instance. If you use /// accelerators, make sure that your configuration has /// [enough vCPUs and memory to support the `machine_type` you - /// have selected](). + /// have selected](/compute/docs/gpus/#gpus-list). #[prost(message, optional, tag = "9")] pub accelerator_config: ::core::option::Option, /// Output only. The state of this instance. @@ -135,39 +186,37 @@ pub struct Instance { /// If not specified, we'll automatically choose from official GPU drivers. #[prost(string, tag = "12")] pub custom_gpu_driver_path: ::prost::alloc::string::String, - /// Input only. The type of the boot disk attached to this instance, defaults - /// to standard persistent disk (`PD_STANDARD`). + /// Input only. The type of the boot disk attached to this instance, defaults to + /// standard persistent disk (`PD_STANDARD`). #[prost(enumeration = "instance::DiskType", tag = "13")] pub boot_disk_type: i32, - /// Input only. The size of the boot disk in GB attached to this instance, up - /// to a maximum of 64000 GB (64 TB). The minimum recommended value - /// is 100 GB. If not specified, this defaults to 100. + /// Input only. The size of the boot disk in GB attached to this instance, up to a maximum + /// of 64000 GB (64 TB). The minimum recommended value is + /// 100 GB. If not specified, this defaults to 100. #[prost(int64, tag = "14")] pub boot_disk_size_gb: i64, - /// Input only. The type of the data disk attached to this instance, defaults - /// to standard persistent disk (`PD_STANDARD`). + /// Input only. The type of the data disk attached to this instance, defaults to + /// standard persistent disk (`PD_STANDARD`). #[prost(enumeration = "instance::DiskType", tag = "25")] pub data_disk_type: i32, - /// Input only. The size of the data disk in GB attached to this instance, up - /// to a maximum of 64000 GB (64 TB). You can choose the size of the - /// data disk based on how big your notebooks and data are. If not specified, - /// this defaults to 100. + /// Input only. The size of the data disk in GB attached to this instance, up to a maximum + /// of 64000 GB (64 TB). You can choose the size of the data disk + /// based on how big your notebooks and data are. If not specified, this + /// defaults to 100. #[prost(int64, tag = "26")] pub data_disk_size_gb: i64, - /// Input only. If true, the data disk will not be auto deleted when deleting - /// the instance. + /// Input only. If true, the data disk will not be auto deleted when deleting the instance. #[prost(bool, tag = "27")] pub no_remove_data_disk: bool, - /// Input only. Disk encryption method used on the boot and data disks, - /// defaults to GMEK. + /// Input only. Disk encryption method used on the boot and data disks, defaults to GMEK. #[prost(enumeration = "instance::DiskEncryption", tag = "15")] pub disk_encryption: i32, - /// Input only. The KMS key used to encrypt the disks, only applicable if - /// disk_encryption is CMEK. Format: + /// Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption + /// is CMEK. + /// Format: /// `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` /// - /// Learn more about [using your own encryption keys]( - /// ). + /// Learn more about [using your own encryption keys](/kms/docs/quickstart). #[prost(string, tag = "16")] pub kms_key: ::prost::alloc::string::String, /// If true, no public IP will be assigned to this instance. @@ -199,6 +248,20 @@ pub struct Instance { ::prost::alloc::string::String, ::prost::alloc::string::String, >, + /// Optional. The type of vNIC to be used on this interface. This may be gVNIC or + /// VirtioNet. + #[prost(enumeration = "instance::NicType", tag = "28")] + pub nic_type: i32, + /// Optional. The optional reservation affinity. Setting this field will apply + /// the specified [Zonal Compute + /// Reservation]() + /// to this notebook instance. + #[prost(message, optional, tag = "29")] + pub reservation_affinity: ::core::option::Option, + /// Optional. Flag to enable ip forwarding or not, default false/off. + /// + #[prost(bool, tag = "31")] + pub can_ip_forward: bool, /// Output only. Instance creation time. #[prost(message, optional, tag = "23")] pub create_time: ::core::option::Option<::prost_types::Timestamp>, @@ -247,7 +310,7 @@ pub mod instance { NvidiaTeslaP100 = 2, /// Accelerator type is Nvidia Tesla V100. NvidiaTeslaV100 = 3, - /// Accelerator type is Nvidia Tesla P_4. + /// Accelerator type is Nvidia Tesla P4. NvidiaTeslaP4 = 4, /// Accelerator type is Nvidia Tesla T4. NvidiaTeslaT4 = 5, @@ -255,7 +318,7 @@ pub mod instance { NvidiaTeslaT4Vws = 8, /// Accelerator type is NVIDIA Tesla P100 Virtual Workstations. NvidiaTeslaP100Vws = 9, - /// Accelerator type is NVIDIA Tesla P_4 Virtual Workstations. + /// Accelerator type is NVIDIA Tesla P4 Virtual Workstations. NvidiaTeslaP4Vws = 10, /// (Coming soon) Accelerator type is TPU V2. TpuV2 = 6, @@ -318,6 +381,10 @@ pub mod instance { Initializing = 8, /// The instance is getting registered. Registering = 9, + /// The instance is suspending. + Suspending = 10, + /// The instance is suspended. + Suspended = 11, } impl State { /// String value of the enum field names used in the ProtoBuf definition. @@ -336,6 +403,8 @@ pub mod instance { State::Upgrading => "UPGRADING", State::Initializing => "INITIALIZING", State::Registering => "REGISTERING", + State::Suspending => "SUSPENDING", + State::Suspended => "SUSPENDED", } } } @@ -410,6 +479,41 @@ pub mod instance { } } } + /// The type of vNIC driver. + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum NicType { + /// No type specified. Default should be UNSPECIFIED_NIC_TYPE. + UnspecifiedNicType = 0, + /// VIRTIO. Default in Notebooks DLVM. + VirtioNet = 1, + /// GVNIC. Alternative to VIRTIO. + /// + Gvnic = 2, + } + impl NicType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + NicType::UnspecifiedNicType => "UNSPECIFIED_NIC_TYPE", + NicType::VirtioNet => "VIRTIO_NET", + NicType::Gvnic => "GVNIC", + } + } + } /// Type of the environment; can be one of VM image, or container image. #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Environment { @@ -442,8 +546,7 @@ pub struct OperationMetadata { /// Identifies whether the user has requested cancellation /// of the operation. Operations that have successfully been cancelled /// have \[Operation.error][\] value with a - /// \[google.rpc.Status.code][google.rpc.Status.code\] of 1, corresponding to - /// `Code.CANCELLED`. + /// \[google.rpc.Status.code][google.rpc.Status.code\] of 1, corresponding to `Code.CANCELLED`. #[prost(bool, tag = "6")] pub requested_cancellation: bool, /// API version used to start the operation. @@ -530,10 +633,10 @@ pub struct SetInstanceAcceleratorRequest { /// Required. Type of this accelerator. #[prost(enumeration = "instance::AcceleratorType", tag = "2")] pub r#type: i32, - /// Required. Count of cores of this accelerator. Note that not all - /// combinations of `type` and `core_count` are valid. Check [GPUs on Compute - /// Engine]() to find a - /// valid combination. TPUs are not supported. + /// Required. Count of cores of this accelerator. Note that not all combinations + /// of `type` and `core_count` are valid. Check [GPUs on + /// Compute Engine]() to + /// find a valid combination. TPUs are not supported. #[prost(int64, tag = "3")] pub core_count: i64, } @@ -636,6 +739,11 @@ pub struct IsInstanceUpgradeableResponse { /// Additional information about upgrade. #[prost(string, tag = "3")] pub upgrade_info: ::prost::alloc::string::String, + /// The new image self link this instance will be upgraded to if calling the + /// upgrade endpoint. This field will only be populated if field upgradeable + /// is true. + #[prost(string, tag = "4")] + pub upgrade_image: ::prost::alloc::string::String, } /// Request for upgrading a notebook instance #[derive(Clone, PartialEq, ::prost::Message)] @@ -699,10 +807,10 @@ pub struct CreateEnvironmentRequest { /// Required. Format: `projects/{project_id}/locations/{location}` #[prost(string, tag = "1")] pub parent: ::prost::alloc::string::String, - /// Required. User-defined unique ID of this environment. The `environment_id` - /// must be 1 to 63 characters long and contain only lowercase letters, numeric - /// characters, and dashes. The first character must be a lowercase letter and - /// the last character cannot be a dash. + /// Required. User-defined unique ID of this environment. The `environment_id` must + /// be 1 to 63 characters long and contain only lowercase letters, + /// numeric characters, and dashes. The first character must be a lowercase + /// letter and the last character cannot be a dash. #[prost(string, tag = "2")] pub environment_id: ::prost::alloc::string::String, /// Required. The environment to be created. @@ -1064,6 +1172,7 @@ pub mod notebook_service_client { self.inner.unary(request.into_request(), path, codec).await } /// Check if a notebook instance is upgradable. + /// Deprecated. Please consider using v1. pub async fn is_instance_upgradeable( &mut self, request: impl tonic::IntoRequest, @@ -1087,6 +1196,7 @@ pub mod notebook_service_client { self.inner.unary(request.into_request(), path, codec).await } /// Upgrades a notebook instance to the latest version. + /// Deprecated. Please consider using v1. pub async fn upgrade_instance( &mut self, request: impl tonic::IntoRequest, @@ -1111,6 +1221,7 @@ pub mod notebook_service_client { } /// Allows notebook instances to /// call this endpoint to upgrade themselves. Do not use this method directly. + /// Deprecated. Please consider using v1. pub async fn upgrade_instance_internal( &mut self, request: impl tonic::IntoRequest, diff --git a/gcloud-sdk/genproto/google.cloud.osconfig.logging.rs b/gcloud-sdk/genproto/google.cloud.osconfig.logging.rs new file mode 100644 index 000000000..690956068 --- /dev/null +++ b/gcloud-sdk/genproto/google.cloud.osconfig.logging.rs @@ -0,0 +1,131 @@ +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PatchJobCompletedLog { + /// The patch job name. For example: + /// projects/PROJECT_ID/patchJobs/PATCH_JOB_ID + #[prost(string, tag = "1")] + pub patch_job: ::prost::alloc::string::String, + /// The current state of the PatchJob. + #[prost(enumeration = "patch_job_completed_log::State", tag = "2")] + pub state: i32, + /// Summary of instance details. + #[prost(message, optional, tag = "3")] + pub instance_details_summary: ::core::option::Option< + patch_job_completed_log::InstanceDetailsSummary, + >, + /// If this patch job is a dry run, the agent will report that it has + /// finished without running any updates on the VM. + #[prost(bool, tag = "4")] + pub dry_run: bool, + /// If this patch job failed, this message will provide information about the + /// failure. + #[prost(string, tag = "5")] + pub error_message: ::prost::alloc::string::String, + /// Time this PatchJob was created. + #[prost(message, optional, tag = "6")] + pub create_time: ::core::option::Option<::prost_types::Timestamp>, + /// Last time this PatchJob was updated. + #[prost(message, optional, tag = "7")] + pub update_time: ::core::option::Option<::prost_types::Timestamp>, +} +/// Nested message and enum types in `PatchJobCompletedLog`. +pub mod patch_job_completed_log { + /// A summary of the current patch state across all instances this patch job + /// affects. Contains counts of instances in different states. These states map + /// to InstancePatchState. List patch job instance details to see the specific + /// states of each instance. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct InstanceDetailsSummary { + /// Number of instances pending patch job. + #[prost(int64, tag = "1")] + pub instances_pending: i64, + /// Number of instances that are inactive. + #[prost(int64, tag = "2")] + pub instances_inactive: i64, + /// Number of instances notified about patch job. + #[prost(int64, tag = "3")] + pub instances_notified: i64, + /// Number of instances that have started. + #[prost(int64, tag = "4")] + pub instances_started: i64, + /// Number of instances that are downloading patches. + #[prost(int64, tag = "5")] + pub instances_downloading_patches: i64, + /// Number of instances that are applying patches. + #[prost(int64, tag = "6")] + pub instances_applying_patches: i64, + /// Number of instances rebooting. + #[prost(int64, tag = "7")] + pub instances_rebooting: i64, + /// Number of instances that have completed successfully. + #[prost(int64, tag = "8")] + pub instances_succeeded: i64, + /// Number of instances that require reboot. + #[prost(int64, tag = "9")] + pub instances_succeeded_reboot_required: i64, + /// Number of instances that failed. + #[prost(int64, tag = "10")] + pub instances_failed: i64, + /// Number of instances that have acked and will start shortly. + #[prost(int64, tag = "11")] + pub instances_acked: i64, + /// Number of instances that exceeded the time out while applying the patch. + #[prost(int64, tag = "12")] + pub instances_timed_out: i64, + /// Number of instances that are running the pre-patch step. + #[prost(int64, tag = "13")] + pub instances_running_pre_patch_step: i64, + /// Number of instances that are running the post-patch step. + #[prost(int64, tag = "14")] + pub instances_running_post_patch_step: i64, + } + /// Enumeration of the various states a patch job passes through as it + /// executes. + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum State { + /// State must be specified. + Unspecified = 0, + /// The patch job was successfully initiated. + Started = 1, + /// The patch job is looking up instances to run the patch on. + InstanceLookup = 2, + /// Instances are being patched. + Patching = 3, + /// Patch job completed successfully. + Succeeded = 4, + /// Patch job completed but there were errors. + CompletedWithErrors = 5, + /// The patch job was canceled. + Canceled = 6, + /// The patch job has timed out. + TimedOut = 7, + } + impl State { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + State::Unspecified => "STATE_UNSPECIFIED", + State::Started => "STARTED", + State::InstanceLookup => "INSTANCE_LOOKUP", + State::Patching => "PATCHING", + State::Succeeded => "SUCCEEDED", + State::CompletedWithErrors => "COMPLETED_WITH_ERRORS", + State::Canceled => "CANCELED", + State::TimedOut => "TIMED_OUT", + } + } + } +} diff --git a/gcloud-sdk/genproto/google.cloud.oslogin.v1.rs b/gcloud-sdk/genproto/google.cloud.oslogin.v1.rs index 0feb11e2b..6810f8dda 100644 --- a/gcloud-sdk/genproto/google.cloud.oslogin.v1.rs +++ b/gcloud-sdk/genproto/google.cloud.oslogin.v1.rs @@ -15,6 +15,16 @@ pub struct LoginProfile { super::common::SshPublicKey, >, } +/// A request message for creating an SSH public key. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateSshPublicKeyRequest { + /// Required. The unique ID for the user in format `users/{user}`. + #[prost(string, tag = "1")] + pub parent: ::prost::alloc::string::String, + /// Required. The SSH public key and expiration time. + #[prost(message, optional, tag = "2")] + pub ssh_public_key: ::core::option::Option, +} /// A request message for deleting a POSIX account entry. #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeletePosixAccountRequest { @@ -74,6 +84,9 @@ pub struct ImportSshPublicKeyResponse { /// The login profile information for the user. #[prost(message, optional, tag = "1")] pub login_profile: ::core::option::Option, + /// Detailed information about import results. + #[prost(string, tag = "2")] + pub details: ::prost::alloc::string::String, } /// A request message for updating an SSH public key. #[derive(Clone, PartialEq, ::prost::Message)] @@ -163,6 +176,26 @@ pub mod os_login_service_client { self.inner = self.inner.accept_compressed(encoding); self } + /// Create an SSH public key + pub async fn create_ssh_public_key( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.oslogin.v1.OsLoginService/CreateSshPublicKey", + ); + self.inner.unary(request.into_request(), path, codec).await + } /// Deletes a POSIX account. pub async fn delete_posix_account( &mut self, diff --git a/gcloud-sdk/genproto/google.cloud.oslogin.v1beta.rs b/gcloud-sdk/genproto/google.cloud.oslogin.v1beta.rs index 25b95d44c..20bffe302 100644 --- a/gcloud-sdk/genproto/google.cloud.oslogin.v1beta.rs +++ b/gcloud-sdk/genproto/google.cloud.oslogin.v1beta.rs @@ -14,6 +14,19 @@ pub struct LoginProfile { ::prost::alloc::string::String, super::common::SshPublicKey, >, + /// The registered security key credentials for a user. + #[prost(message, repeated, tag = "5")] + pub security_keys: ::prost::alloc::vec::Vec, +} +/// A request message for creating an SSH public key. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateSshPublicKeyRequest { + /// Required. The unique ID for the user in format `users/{user}`. + #[prost(string, tag = "1")] + pub parent: ::prost::alloc::string::String, + /// Required. The SSH public key and expiration time. + #[prost(message, optional, tag = "2")] + pub ssh_public_key: ::core::option::Option, } /// A request message for deleting a POSIX account entry. #[derive(Clone, PartialEq, ::prost::Message)] @@ -45,6 +58,9 @@ pub struct GetLoginProfileRequest { /// A system ID for filtering the results of the request. #[prost(string, tag = "3")] pub system_id: ::prost::alloc::string::String, + /// The view configures whether to retrieve security keys information. + #[prost(enumeration = "LoginProfileView", tag = "4")] + pub view: i32, } /// A request message for retrieving an SSH public key. #[derive(Clone, PartialEq, ::prost::Message)] @@ -67,6 +83,9 @@ pub struct ImportSshPublicKeyRequest { /// The project ID of the Google Cloud Platform project. #[prost(string, tag = "3")] pub project_id: ::prost::alloc::string::String, + /// The view configures whether to retrieve security keys information. + #[prost(enumeration = "LoginProfileView", tag = "4")] + pub view: i32, } /// A response message for importing an SSH public key. #[derive(Clone, PartialEq, ::prost::Message)] @@ -74,6 +93,9 @@ pub struct ImportSshPublicKeyResponse { /// The login profile information for the user. #[prost(message, optional, tag = "1")] pub login_profile: ::core::option::Option, + /// Detailed information about import results. + #[prost(string, tag = "2")] + pub details: ::prost::alloc::string::String, } /// A request message for updating an SSH public key. #[derive(Clone, PartialEq, ::prost::Message)] @@ -90,6 +112,71 @@ pub struct UpdateSshPublicKeyRequest { #[prost(message, optional, tag = "3")] pub update_mask: ::core::option::Option<::prost_types::FieldMask>, } +/// The credential information for a Google registered security key. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SecurityKey { + /// Public key text in SSH format, defined by + /// \[RFC4253\](") section 6.6. + #[prost(string, tag = "1")] + pub public_key: ::prost::alloc::string::String, + /// Hardware-backed private key text in SSH format. + #[prost(string, tag = "2")] + pub private_key: ::prost::alloc::string::String, + /// The FIDO protocol type used to register this credential. + #[prost(oneof = "security_key::ProtocolType", tags = "3, 4")] + pub protocol_type: ::core::option::Option, +} +/// Nested message and enum types in `SecurityKey`. +pub mod security_key { + /// The FIDO protocol type used to register this credential. + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum ProtocolType { + /// The U2F protocol type. + #[prost(message, tag = "3")] + UniversalTwoFactor(super::UniversalTwoFactor), + /// The Web Authentication protocol type. + #[prost(message, tag = "4")] + WebAuthn(super::WebAuthn), + } +} +/// Security key information specific to the U2F protocol. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UniversalTwoFactor { + /// Application ID for the U2F protocol. + #[prost(string, tag = "1")] + pub app_id: ::prost::alloc::string::String, +} +/// Security key information specific to the Web Authentication protocol. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct WebAuthn { + /// Relying party ID for Web Authentication. + #[prost(string, tag = "1")] + pub rp_id: ::prost::alloc::string::String, +} +/// The login profile view limits the user content retrieved. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum LoginProfileView { + /// The default login profile view. The API defaults to the BASIC view. + Unspecified = 0, + /// Includes POSIX and SSH key information. + Basic = 1, + /// Include security key information for the user. + SecurityKey = 2, +} +impl LoginProfileView { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + LoginProfileView::Unspecified => "LOGIN_PROFILE_VIEW_UNSPECIFIED", + LoginProfileView::Basic => "BASIC", + LoginProfileView::SecurityKey => "SECURITY_KEY", + } + } +} /// Generated client implementations. pub mod os_login_service_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] @@ -163,6 +250,26 @@ pub mod os_login_service_client { self.inner = self.inner.accept_compressed(encoding); self } + /// Create an SSH public key + pub async fn create_ssh_public_key( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.oslogin.v1beta.OsLoginService/CreateSshPublicKey", + ); + self.inner.unary(request.into_request(), path, codec).await + } /// Deletes a POSIX account. pub async fn delete_posix_account( &mut self, diff --git a/gcloud-sdk/genproto/google.cloud.paymentgateway.issuerswitch.v1.rs b/gcloud-sdk/genproto/google.cloud.paymentgateway.issuerswitch.v1.rs index 6a02d2f8f..adc45e1c2 100644 --- a/gcloud-sdk/genproto/google.cloud.paymentgateway.issuerswitch.v1.rs +++ b/gcloud-sdk/genproto/google.cloud.paymentgateway.issuerswitch.v1.rs @@ -308,8 +308,8 @@ pub enum ApiType { /// Check transaction status API. Maps to UPI's `ChkTxn` API. This is a /// metadata transaction API. CheckStatus = 2, - /// Complain API. Maps to UPI's `Complaint` API. This is a metadata transaction - /// API. + /// Complaint API. Maps to UPI's `Complaint` API. This is a dispute and issue + /// resolution API. Complaint = 3, /// Heart beat API. Maps to UPI's `Hbt` API. This is a metadata transaction /// API. @@ -323,17 +323,25 @@ pub enum ApiType { /// Mandate API. Maps to UPI's `Mandate` API. This is a metadata transaction /// API. Mandate = 7, + /// Mandate confirmation API. Maps to UPI's `MandateConfirmation` API. This is + /// a metadata transaction API. + MandateConfirmation = 8, /// Payment settlement API. Maps to UPI's `Pay` API. This is a financial /// transaction API. - SettlePayment = 8, + SettlePayment = 9, /// Update credentials API. Maps to UPI's `SetCre` API. This is a metadata /// transaction API. - UpdateCredentials = 9, + UpdateCredentials = 10, /// Validate registration API. Maps to UPI's `RegMob` API. This is a metadata /// transaction API. - ValidateRegistration = 10, + ValidateRegistration = 11, + /// Validate customer API. Maps to UPI's `ValCust` API. This is a validation + /// API. + ValidateCustomer = 12, + /// Voucher API. Maps to UPI's `Voucher` API. + Voucher = 13, /// Voucher confirmation API. Maps to UPI's `VoucherConfirmation` API. - VoucherConfirmation = 11, + VoucherConfirmation = 14, } impl ApiType { /// String value of the enum field names used in the ProtoBuf definition. @@ -350,9 +358,12 @@ impl ApiType { ApiType::InitiateRegistration => "INITIATE_REGISTRATION", ApiType::ListAccounts => "LIST_ACCOUNTS", ApiType::Mandate => "MANDATE", + ApiType::MandateConfirmation => "MANDATE_CONFIRMATION", ApiType::SettlePayment => "SETTLE_PAYMENT", ApiType::UpdateCredentials => "UPDATE_CREDENTIALS", ApiType::ValidateRegistration => "VALIDATE_REGISTRATION", + ApiType::ValidateCustomer => "VALIDATE_CUSTOMER", + ApiType::Voucher => "VOUCHER", ApiType::VoucherConfirmation => "VOUCHER_CONFIRMATION", } } @@ -370,64 +381,76 @@ pub enum TransactionType { Autoupdate = 1, /// Balance check transaction type. This is associated with the /// `BALANCE_ENQUIRY` API type. Maps to UPI's `BalChk` type. - BalanceCheck = 3, + BalanceCheck = 2, /// Balance enquiry transaction type. This is associated with the /// `BALANCE_ENQUIRY` API type. Maps to UPI's `BalEnq` type. - BalanceEnquiry = 4, + BalanceEnquiry = 3, /// Check status transaction type. This is associated with the `COMPLAINT` API /// type. Maps to UPI's `CHECKSTATUS` type. - CheckStatus = 5, + CheckStatus = 4, /// Check transaction type. This is associated with the `CHECK_STATUS` API /// type. Maps to UPI's `ChkTxn` type. - CheckTransaction = 6, + CheckTransaction = 5, /// Complaint transaction type. This is associated with the `COMPLAINT` API /// type. Maps to UPI's `COMPLAINT` type. - Complaint = 7, + Complaint = 6, /// Create transaction type. This is associated with the `MANDATE` API type. /// Maps to UPI's `CREATE` type. - Create = 8, + Create = 7, /// Credit transaction type. This is associated with the `SETTLE_PAYMENT` API /// type. Maps to UPI's `CREDIT` type. - Credit = 9, + Credit = 8, /// Debit transaction type. This is associated with the `SETTLE_PAYMENT` API /// type. Maps to UPI's `DEBIT` type. - Debit = 10, + Debit = 9, /// Dispute transaction type. This is associated with the `COMPLAINT` API /// type. Maps to UPI's `DISPUTE` type. - Dispute = 11, + Dispute = 10, /// Heart beat transaction type. This is associated with `HEART_BEAT` API type. /// Maps to UPI's `Hbt` type. - HeartBeat = 12, + HeartBeat = 11, /// List accounts transaction type. This is associated with `LIST_ACCOUNTS` API /// type. Maps to UPI's `ListAccount` type. - ListAccounts = 13, + ListAccounts = 12, + /// Mandate notification transaction type. This is associated with the + /// `VALIDATE_CUSTOMER` API type. Maps to UPI's `MandateNotification` type. + MandateNotification = 13, /// OTP transaction type. This is associated with the `INITIATE_REGISTRATION` /// API type. Maps to UPI's `Otp` type. Otp = 14, - /// Register mobile transaction type. This is associated with the - /// `VALIDATE_REGISTRATION` API type. Maps to UPI's `RegMob` type. - RegisterMobile = 15, + /// Pause transaction type. This is associated with the `MANDATE` API type. + /// Maps to UPI's `PAUSE` type. + Pause = 15, + /// Redeem transaction type. This is associated with the `VOUCHER_CONFIRMATION` + /// API type. Maps to UPI's `REDEEM` type. + Redeem = 16, /// Refund transaction type. This is associated with the `COMPLAINT` API /// type. Maps to UPI's `REFUND` type. - Refund = 16, + Refund = 17, + /// Register mobile transaction type. This is associated with the + /// `VALIDATE_REGISTRATION` API type. Maps to UPI's `RegMob` type. + RegisterMobile = 18, /// Reversal transaction type. This is associated with the `SETTLE_PAYMENT` and /// `COMPLAINT` API types. Maps to UPI's `REVERSAL` type. - Reversal = 17, + Reversal = 19, /// Revoke transaction type. This is associated with the `MANDATE` API type. /// Maps to UPI's `REVOKE` type. - Revoke = 18, + Revoke = 20, /// Status update transaction type. This is associated with the `COMPLAINT` API /// type. Maps to UPI's `STATUSUPDATE` type. - StatusUpdate = 19, + StatusUpdate = 21, + /// Update transaction type. This is associated with the `MANDATE` API type. + /// Maps to UPI's `UNPAUSE` type. + Unpause = 22, /// Update transaction type. This is associated with the `MANDATE` API type. /// Maps to UPI's `UPDATE` type. - Update = 20, + Update = 23, /// Update credentials transaction type. This is associated with /// `UPDATE_CREDENTIALS` API type. Maps to UPI's `SetCre` type. - UpdateCredentials = 21, - /// Redeem transaction type. This is associated with the `VOUCHER_CONFIRMATION` - /// API type. Maps to UPI's `REDEEM` type. - Redeem = 22, + UpdateCredentials = 24, + /// Validate customer transaction type. This is associated with + /// `VALIDATE_CUSTOMER` API type. Maps to UPI's `ValCust` type. + ValidateCustomer = 25, } impl TransactionType { /// String value of the enum field names used in the ProtoBuf definition. @@ -449,15 +472,136 @@ impl TransactionType { TransactionType::Dispute => "TRANSACTION_TYPE_DISPUTE", TransactionType::HeartBeat => "TRANSACTION_TYPE_HEART_BEAT", TransactionType::ListAccounts => "TRANSACTION_TYPE_LIST_ACCOUNTS", + TransactionType::MandateNotification => { + "TRANSACTION_TYPE_MANDATE_NOTIFICATION" + } TransactionType::Otp => "TRANSACTION_TYPE_OTP", - TransactionType::RegisterMobile => "TRANSACTION_TYPE_REGISTER_MOBILE", + TransactionType::Pause => "TRANSACTION_TYPE_PAUSE", + TransactionType::Redeem => "TRANSACTION_TYPE_REDEEM", TransactionType::Refund => "TRANSACTION_TYPE_REFUND", + TransactionType::RegisterMobile => "TRANSACTION_TYPE_REGISTER_MOBILE", TransactionType::Reversal => "TRANSACTION_TYPE_REVERSAL", TransactionType::Revoke => "TRANSACTION_TYPE_REVOKE", TransactionType::StatusUpdate => "TRANSACTION_TYPE_STATUS_UPDATE", + TransactionType::Unpause => "TRANSACTION_TYPE_UNPAUSE", TransactionType::Update => "TRANSACTION_TYPE_UPDATE", TransactionType::UpdateCredentials => "TRANSACTION_TYPE_UPDATE_CREDENTIALS", - TransactionType::Redeem => "TRANSACTION_TYPE_REDEEM", + TransactionType::ValidateCustomer => "TRANSACTION_TYPE_VALIDATE_CUSTOMER", + } + } +} +/// XmlApiType specifies the API type of the request or response as specified in +/// the XML payload. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum XmlApiType { + /// Unspecified API type. + Unspecified = 0, + /// Balance enquiry request API type. Maps to UPI's `ReqBalEnq` API. + ReqBalEnq = 1, + /// Check transaction request API type. Maps to UPI's `ReqChkTxn` API. + ReqChkTxn = 2, + /// Complaint request API type. Maps to UPI's `ReqComplaint` API. + ReqComplaint = 3, + /// Heart beat request API type. Maps to UPI's `ReqHbt` API. + ReqHbt = 4, + /// List accounts request API type. Maps to UPI's `ReqListAccount` API. + ReqListAccount = 5, + /// Mandate request API. Maps to UPI's `ReqMandate` API. + ReqMandate = 6, + /// Mandate confirmation request API type. Maps to UPI's + /// `ReqMandateConfirmation` API. + ReqMandateConfirmation = 7, + /// OTP request API. Maps to UPI's `ReqOtp` API. + ReqOtp = 8, + /// Payment settlement request API type. Maps to UPI's `ReqPay` API. + ReqPay = 9, + /// Register mobile request API type. Maps to UPI's `ReqRegMob` API. + ReqRegMob = 10, + /// Update credentials request API type. Maps to UPI's `ReqSetCre` API. + ReqSetCre = 11, + /// Validate customer request API type. Maps to UPI's `ReqValCust`. + ReqValCust = 12, + /// Create voucher request API type. Maps to UPI's `ReqVoucher`. + ReqVoucher = 13, + /// Voucher confirmation request API type. Maps to UPI's + /// `ReqVoucherConfirmation` API. + ReqVoucherConfirmation = 14, + /// Transaction confirmation request API type. Maps to UPI's + /// `ReqTxnConfirmation` API. + ReqTxnConfirmation = 15, + /// Balance enquiry response API type. Maps to UPI's `RespBalEnq` API. + RespBalEnq = 16, + /// Check transaction response API type. Maps to UPI's `RespChkTxn` API. + RespChkTxn = 17, + /// Complaint response API type. Maps to UPI's `RespComplaint` API. + RespComplaint = 18, + /// Heart beat response API type. Maps to UPI's `RespHbt` API. + RespHbt = 19, + /// List accounts response API type. Maps to UPI's `RespListAccount` API. + RespListAccount = 20, + /// Mandate response API type. Maps to UPI's `RespMandate` API. + RespMandate = 21, + /// Mandate confirmation response API type. Maps to UPI's + /// `RespMandateConfirmation` API. + RespMandateConfirmation = 22, + /// OTP response API. Maps to UPI's `RespOtp` API. + RespOtp = 23, + /// Payment settlement response API type. Maps to UPI's `RespPay` API. + RespPay = 24, + /// Register mobile response API type. Maps to UPI's `RespRegMob` API. + RespRegMob = 25, + /// Update credentials response API type. Maps to UPI's `RespSetCre` API. + RespSetCre = 26, + /// Validate customer response API type. Maps to UPI's `RespValCust`. + RespValCust = 27, + /// Create voucher response API type. Maps to UPI's `RespVoucher`. + RespVoucher = 28, + /// Voucher confirmation responseAPI type. Maps to UPI's + /// `RespVoucherConfirmation` API. + RespVoucherConfirmation = 29, + /// Transaction confirmation response API type. Maps to UPI's + /// `RespTxnConfirmation` API. + RespTxnConfirmation = 30, +} +impl XmlApiType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + XmlApiType::Unspecified => "XML_API_TYPE_UNSPECIFIED", + XmlApiType::ReqBalEnq => "REQ_BAL_ENQ", + XmlApiType::ReqChkTxn => "REQ_CHK_TXN", + XmlApiType::ReqComplaint => "REQ_COMPLAINT", + XmlApiType::ReqHbt => "REQ_HBT", + XmlApiType::ReqListAccount => "REQ_LIST_ACCOUNT", + XmlApiType::ReqMandate => "REQ_MANDATE", + XmlApiType::ReqMandateConfirmation => "REQ_MANDATE_CONFIRMATION", + XmlApiType::ReqOtp => "REQ_OTP", + XmlApiType::ReqPay => "REQ_PAY", + XmlApiType::ReqRegMob => "REQ_REG_MOB", + XmlApiType::ReqSetCre => "REQ_SET_CRE", + XmlApiType::ReqValCust => "REQ_VAL_CUST", + XmlApiType::ReqVoucher => "REQ_VOUCHER", + XmlApiType::ReqVoucherConfirmation => "REQ_VOUCHER_CONFIRMATION", + XmlApiType::ReqTxnConfirmation => "REQ_TXN_CONFIRMATION", + XmlApiType::RespBalEnq => "RESP_BAL_ENQ", + XmlApiType::RespChkTxn => "RESP_CHK_TXN", + XmlApiType::RespComplaint => "RESP_COMPLAINT", + XmlApiType::RespHbt => "RESP_HBT", + XmlApiType::RespListAccount => "RESP_LIST_ACCOUNT", + XmlApiType::RespMandate => "RESP_MANDATE", + XmlApiType::RespMandateConfirmation => "RESP_MANDATE_CONFIRMATION", + XmlApiType::RespOtp => "RESP_OTP", + XmlApiType::RespPay => "RESP_PAY", + XmlApiType::RespRegMob => "RESP_REG_MOB", + XmlApiType::RespSetCre => "RESP_SET_CRE", + XmlApiType::RespValCust => "RESP_VAL_CUST", + XmlApiType::RespVoucher => "RESP_VOUCHER", + XmlApiType::RespVoucherConfirmation => "RESP_VOUCHER_CONFIRMATION", + XmlApiType::RespTxnConfirmation => "RESP_TXN_CONFIRMATION", } } } @@ -1750,46 +1894,54 @@ pub mod issuer_switch_resolutions_client { } } } -/// A rule that is executed by the issuer switch while processing an -/// API transaction. +/// Information about a transaction processed by the issuer switch. +/// The fields in this type are common across both financial and metadata +/// transactions. #[derive(Clone, PartialEq, ::prost::Message)] -pub struct Rule { - /// The unique identifier for this resource. - /// Format: projects/{project}/rules/{rule} +pub struct TransactionInfo { + /// Output only. An identifier that is mandatorily present in every transaction processed + /// via UPI. This maps to UPI's transaction ID. #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, - /// The description of the rule. - #[prost(string, tag = "2")] - pub rule_description: ::prost::alloc::string::String, - /// The API Type for which this rule gets executed. A value of - /// `API_TYPE_UNSPECIFIED` indicates that the rule is executed for all API - /// transactions. - #[prost(enumeration = "ApiType", tag = "3")] + pub id: ::prost::alloc::string::String, + /// Output only. The API type of the transaction. + #[prost(enumeration = "ApiType", tag = "2")] pub api_type: i32, - /// The transaction type for which this rule gets executed. A value of - /// `TRANSACTION_TYPE_UNSPECIFIED` indicates that the rule is executed for - /// all transaction types. - #[prost(enumeration = "TransactionType", tag = "4")] + /// Output only. The transaction type. + #[prost(enumeration = "TransactionType", tag = "3")] pub transaction_type: i32, + /// Output only. The transaction sub-type. + #[prost(enumeration = "transaction_info::TransactionSubType", tag = "4")] + pub transaction_sub_type: i32, + /// Output only. The transaction's state. + #[prost(enumeration = "transaction_info::State", tag = "5")] + pub state: i32, + /// Output only. Error code of the failed transaction. + #[prost(string, tag = "6")] + pub error_code: ::prost::alloc::string::String, + /// Output only. Error description for the failed transaction. + #[prost(string, tag = "7")] + pub error_message: ::prost::alloc::string::String, + /// Output only. The time at which the transaction resource was created by the + /// issuer switch. + #[prost(message, optional, tag = "8")] + pub create_time: ::core::option::Option<::prost_types::Timestamp>, + /// Output only. The time at which the transaction resource was last updated by the + /// issuer switch. + #[prost(message, optional, tag = "9")] + pub update_time: ::core::option::Option<::prost_types::Timestamp>, + /// Output only. List of Request IDs (colon separated) used when + /// invoking the Bank Adapter APIs for fulfilling a transaction request. + #[prost(string, tag = "10")] + pub bank_adapter_request_ids: ::prost::alloc::string::String, + /// Output only. Error code as per the UPI specification. The issuer switch maps the + /// ErrorCode to an appropriate error code that complies with the UPI + /// specification. + #[prost(string, tag = "11")] + pub upi_error_code: ::prost::alloc::string::String, } -/// The metadata associated with a rule. This defines data that are used by the -/// rule during execution. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct RuleMetadata { - /// The unique identifier for this resource. - /// Format: projects/{project}/rules/{rule}/metadata/{metadata} - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, - /// The description of the rule metadata. - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - /// Type of rule metadata. - #[prost(enumeration = "rule_metadata::Type", tag = "3")] - pub r#type: i32, -} -/// Nested message and enum types in `RuleMetadata`. -pub mod rule_metadata { - /// The type of metadata. +/// Nested message and enum types in `TransactionInfo`. +pub mod transaction_info { + /// Specifies the current state of the transaction. #[derive( Clone, Copy, @@ -1802,453 +1954,258 @@ pub mod rule_metadata { ::prost::Enumeration )] #[repr(i32)] - pub enum Type { - /// Unspecified type. + pub enum State { + /// Unspecified state. Unspecified = 0, - /// List type. Indicates that the metadata contains a list of values which - /// the rule requires for execution. - List = 1, + /// The transaction has successfully completed. + Succeeded = 1, + /// The transaction has failed. + Failed = 2, } - impl Type { + impl State { /// String value of the enum field names used in the ProtoBuf definition. /// /// The values are not transformed in any way and thus are considered stable /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Type::Unspecified => "TYPE_UNSPECIFIED", - Type::List => "LIST", + State::Unspecified => "STATE_UNSPECIFIED", + State::Succeeded => "SUCCEEDED", + State::Failed => "FAILED", + } + } + } + /// The sub-type of a transaction. This value is used only for certain API type + /// and transaction type combinations. + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum TransactionSubType { + /// Unspecified transaction sub-type. + Unspecified = 0, + /// Collect sub type. This is used in a `SETTLE_PAYMENT` API type + /// transaction, with transaction type as either `CREDIT` or `DEBIT` when the + /// payment was initiated by a collect request. + Collect = 1, + /// Debit sub type. This is used in a `SETTLE_PAYMENT` API type transaction, + /// with transaction type as `REVERSAL` when the original payment was a + /// debit request. + Debit = 2, + /// Pay sub type. This is used in a `SETTLE_PAYMENT` API type transaction, + /// with transaction type as either `CREDIT` or `DEBIT` when the payment was + /// initiated by a pay request. + Pay = 3, + /// Beneficiary subtype. This is used in a `COMPLAINT` API type transaction, + /// when the complaint / dispute request is initiated / received by the + /// beneficiary bank. + Beneficiary = 4, + /// Remitter subtype. This is used in a `COMPLAINT` API type transaction, + /// when the complaint / dispute request is initiated / received by the + /// remitter bank. + Remitter = 5, + } + impl TransactionSubType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + TransactionSubType::Unspecified => "TRANSACTION_SUB_TYPE_UNSPECIFIED", + TransactionSubType::Collect => "COLLECT", + TransactionSubType::Debit => "DEBIT", + TransactionSubType::Pay => "PAY", + TransactionSubType::Beneficiary => "BENEFICIARY", + TransactionSubType::Remitter => "REMITTER", } } } } -/// Represent a single value in a rule's metadata. +/// A metadata API transaction processed by the issuer switch. This +/// includes UPI APIs such as List Accounts, Balance Enquiry, etc. #[derive(Clone, PartialEq, ::prost::Message)] -pub struct RuleMetadataValue { - /// Output only. The unique identifier for this resource. - /// Format: projects/{project}/rules/{rule}/metadata/{metadata}/values/{value} +pub struct MetadataTransaction { + /// The name of the metadata transaction. This uniquely identifies the + /// transaction. Format of name is + /// projects/{project_id}/metadataTransaction/{metadata_transaction_id}. #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, - /// The value of the resource which could be of type string or - /// AccountReference. The metadata values for rules - /// BlockedPayeeAccountReqPayDebitRule, BlockedPayerAccountReqPayDebitRule, - /// BlockedPayeeAccountReqPayCreditRule and BlockedPayerAccountReqPayCreditRule - /// should be of type AccountReference. For all other rules, metadata values - /// should be of type string. - /// - /// The length of the `value` field depends on the type of - /// the value being used for the rule metadata. The following are the minimum - /// and maximum lengths for the different types of values. - /// - /// Value Type | Minimum Length | Maximum Length | - /// -------- | -------- | -------- | - /// Bank account IFSC | 11 | 11 | - /// Bank account number | 1 | 255 | - /// Device identifier | 1 | 255 | - /// Mobile number | 12 | 12 | - /// Virtual private address (VPA) | 3 | 255 | - #[prost(oneof = "rule_metadata_value::Value", tags = "2, 3")] - pub value: ::core::option::Option, -} -/// Nested message and enum types in `RuleMetadataValue`. -pub mod rule_metadata_value { - /// The value of the resource which could be of type string or - /// AccountReference. The metadata values for rules - /// BlockedPayeeAccountReqPayDebitRule, BlockedPayerAccountReqPayDebitRule, - /// BlockedPayeeAccountReqPayCreditRule and BlockedPayerAccountReqPayCreditRule - /// should be of type AccountReference. For all other rules, metadata values - /// should be of type string. - /// - /// The length of the `value` field depends on the type of - /// the value being used for the rule metadata. The following are the minimum - /// and maximum lengths for the different types of values. - /// - /// Value Type | Minimum Length | Maximum Length | - /// -------- | -------- | -------- | - /// Bank account IFSC | 11 | 11 | - /// Bank account number | 1 | 255 | - /// Device identifier | 1 | 255 | - /// Mobile number | 12 | 12 | - /// Virtual private address (VPA) | 3 | 255 | - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Value { - /// The value for string metadata. - #[prost(string, tag = "2")] - Id(::prost::alloc::string::String), - /// The value for account reference metadata. - #[prost(message, tag = "3")] - AccountReference(super::AccountReference), - } + /// Information about the transaction. + #[prost(message, optional, tag = "2")] + pub info: ::core::option::Option, + /// Output only. Virtual Payment Address (VPA) which originated the request. + #[prost(string, tag = "3")] + pub origin_vpa: ::prost::alloc::string::String, } -/// Request body for the `ListRules` method. +/// A financial API transaction processed by the issuer switch. In UPI, this maps +/// to the Pay API. #[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListRulesRequest { - /// Required. The parent resource must have the format of `projects/{project}`. +pub struct FinancialTransaction { + /// The name of the financial transaction. This uniquely identifies the + /// transaction. Format of name is + /// projects/{project_id}/financialTransactions/{financial_transaction_id}. #[prost(string, tag = "1")] - pub parent: ::prost::alloc::string::String, - /// The maximum number of rules to return. The service may return fewer - /// than this value. If unspecified or if the specified value is less than 50, - /// at most 50 rules will be returned. The maximum value is 1000; values above - /// 1000 will be coerced to 1000. - #[prost(int32, tag = "2")] - pub page_size: i32, - /// A page token, received from a previous `ListRulesRequest` call. - /// Specify this parameter to retrieve the next page of rules. - #[prost(string, tag = "3")] - pub page_token: ::prost::alloc::string::String, -} -/// Response body for the `ListRules` method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListRulesResponse { - /// List of rules satisfying the specified filter criteria. - #[prost(message, repeated, tag = "1")] - pub rules: ::prost::alloc::vec::Vec, - /// Pass this token in a subsequent `ListRulesRequest` call to continue to list - /// results. If all results have been returned, this field is an empty string - /// or not present in the response. - #[prost(string, tag = "2")] - pub next_page_token: ::prost::alloc::string::String, - /// Total number of rules matching request criteria across all pages. - #[prost(int64, tag = "3")] - pub total_size: i64, -} -/// Request body for the `ListRuleMetadata` method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListRuleMetadataRequest { - /// Required. The parent resource. The format is `projects/{project}/rules/{rule}`. - #[prost(string, tag = "1")] - pub parent: ::prost::alloc::string::String, - /// The maximum number of rule metadata to return. The service may return fewer - /// than this value. If unspecified or if the specified value is less than 50, - /// at most 50 rule metadata will be returned. The maximum value is 1000; - /// values above 1000 will be coerced to 1000. - #[prost(int32, tag = "2")] - pub page_size: i32, - /// A page token, received from a previous `ListRuleMetadataRequest` call. - /// Specify this parameter to retrieve the next page of rule metadata. - #[prost(string, tag = "3")] - pub page_token: ::prost::alloc::string::String, -} -/// Response body for the `ListRuleMetadata` method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListRuleMetadataResponse { - /// List of rule metadata associated with the rule. - #[prost(message, repeated, tag = "1")] - pub rule_metadata: ::prost::alloc::vec::Vec, - /// Pass this token in a subsequent `ListRuleMetadataRequest` call to continue - /// to list results. If all results have been returned, this field is an empty - /// string or not present in the response. - #[prost(string, tag = "2")] - pub next_page_token: ::prost::alloc::string::String, - /// Total number of rule metadata matching request criteria across all pages. - #[prost(int64, tag = "3")] - pub total_size: i64, -} -/// Request body for the `ListRuleMetadataValues` method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListRuleMetadataValuesRequest { - /// Required. The parent resource. The format is - /// `projects/{project}/rules/{rule}/metadata/{metadata}`. - #[prost(string, tag = "1")] - pub parent: ::prost::alloc::string::String, - /// The maximum number of metadata values to return. The service may return - /// fewer than this value. If unspecified or if the specified value is less - /// than 1, at most 50 rule metadata values will be returned. The maximum - /// value is 1000; values above 1000 will be coerced to 1000. - #[prost(int32, tag = "2")] - pub page_size: i32, - /// A page token received from a previous `ListRuleMetadataValuesRequest` - /// call. Specify this parameter to retrieve the next page of rule metadata - /// values. + pub name: ::prost::alloc::string::String, + /// Information about the transaction. + #[prost(message, optional, tag = "2")] + pub info: ::core::option::Option, + /// Output only. A 12 digit numeric code associated with the request. It could contain + /// leading 0s. In UPI, this is also known as as the customer reference or the + /// UPI transaction ID. #[prost(string, tag = "3")] - pub page_token: ::prost::alloc::string::String, -} -/// Response body for ListRuleMetadataValues. Contains a List of values for a -/// given rule metadata resource. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListRuleMetadataValuesResponse { - /// List of values for a given rule metadata resource identifier. - #[prost(message, repeated, tag = "1")] - pub rule_metadata_values: ::prost::alloc::vec::Vec, - /// Pass this token in a subsequent `ListRuleMetadataValuesRequest` call to - /// continue to list results. If all results have been returned, this field is - /// an empty string or not present in the response. - #[prost(string, tag = "2")] - pub next_page_token: ::prost::alloc::string::String, -} -/// Request body for the `BatchCreateRuleMetadataValues` method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct BatchCreateRuleMetadataValuesRequest { - /// The parent resource shared by all ruleMetadataValue being created. The - /// format is `projects/{project}/rules/{rule}/metadata/{metadata}`. The - /// \[CreateRuleMetadataValueRequest.parent][google.cloud.paymentgateway.issuerswitch.v1.CreateRuleMetadataValueRequest.parent\] field in the - /// \[CreateRuleMetadataValueRequest][google.cloud.paymentgateway.issuerswitch.v1.CreateRuleMetadataValueRequest\] messages contained in this request must - /// match this field. - #[prost(string, tag = "1")] - pub parent: ::prost::alloc::string::String, - /// Required. The request message specifying the resources to create. - /// A maximum of 1000 RuleMetadataValues can be created in a batch. - #[prost(message, repeated, tag = "2")] - pub requests: ::prost::alloc::vec::Vec, -} -/// Response body for the `BatchCreateRuleMetadataValues` method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct BatchCreateRuleMetadataValuesResponse { - /// List of RuleMetadataValue created. - #[prost(message, repeated, tag = "1")] - pub rule_metadata_value: ::prost::alloc::vec::Vec, + pub retrieval_reference_number: ::prost::alloc::string::String, + /// Output only. The payer in the transaction. + #[prost(message, optional, tag = "4")] + pub payer: ::core::option::Option, + /// Output only. The payee in the transaction. + #[prost(message, optional, tag = "5")] + pub payee: ::core::option::Option, + /// Output only. The amount for payment settlement in the transaction. + #[prost(message, optional, tag = "6")] + pub amount: ::core::option::Option, } -/// Request for creating a single `RuleMetadataValue`. +/// A mandate processed by the issuer switch. In UPI, this maps to the Mandate +/// API. #[derive(Clone, PartialEq, ::prost::Message)] -pub struct CreateRuleMetadataValueRequest { - /// Required. The parent resource where this RuleMetadataValue will be created. The - /// format is `projects/{project}/rules/{rule}/metadata/{metadata}`. +pub struct MandateTransaction { + /// The name of the mandate transaction. This uniquely identifies the + /// transaction. Format of name is + /// projects/{project_id}/mandateTransactions/{mandate_transaction_id}. #[prost(string, tag = "1")] - pub parent: ::prost::alloc::string::String, - /// Required. The rule metadata value to create or add to a list. + pub name: ::prost::alloc::string::String, + /// Information about the transaction. #[prost(message, optional, tag = "2")] - pub rule_metadata_value: ::core::option::Option, -} -/// Request body for the `BatchDeleteRuleMetadataValues` method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct BatchDeleteRuleMetadataValuesRequest { - /// The parent resource shared by all RuleMetadataValues being deleted. The - /// format is `projects/{project}/rules/{rule}/metadata/{metadata}`. If this is - /// set, the parent of all of the RuleMetadataValues specified in the - /// list of names must match this field. - #[prost(string, tag = "1")] - pub parent: ::prost::alloc::string::String, - /// Required. The names of the rule metadata values to delete. - /// A maximum of 1000 RuleMetadataValue can be deleted in a batch. - /// Format: projects/{project}/rules/{rule}/metadata/{metadata}/values/{value} - #[prost(string, repeated, tag = "2")] - pub names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + pub transaction_info: ::core::option::Option, + /// Output only. This maps to Unique Mandate Number (UMN) in UPI specification. + #[prost(string, tag = "3")] + pub unique_mandate_number: ::prost::alloc::string::String, + /// Output only. The virtual payment address (VPA) of the payer. + #[prost(string, tag = "4")] + pub payer_vpa: ::prost::alloc::string::String, + /// Output only. The virtual payment address (VPA) of the payee. + #[prost(string, tag = "5")] + pub payee_vpa: ::prost::alloc::string::String, + /// Output only. A unique identifier for merchant. + #[prost(string, tag = "6")] + pub payee_merchant_id: ::prost::alloc::string::String, + /// Output only. The mobile number of the payer consisting of total twelve digits where + /// first two digits of country code (for eg. 91 for India) and then ten + /// digits mobile number. For eg. 911234567890 + #[prost(string, tag = "7")] + pub payer_mobile_number: ::prost::alloc::string::String, + /// Output only. The mobile number of the payer consisting of total twelve digits where + /// first two digits of country code (for eg. 91 for India) and then ten + /// digits mobile number. For eg. 911234567890 + #[prost(string, tag = "8")] + pub payee_mobile_number: ::prost::alloc::string::String, + /// Output only. The type of recurrence pattern of the mandate. + #[prost(enumeration = "mandate_transaction::RecurrencePatternType", tag = "9")] + pub recurrence_pattern: i32, + /// Output only. The type of recurrence rule of the mandate. + #[prost(enumeration = "mandate_transaction::RecurrenceRuleType", tag = "10")] + pub recurrence_rule_type: i32, + /// Output only. The recurrence rule value of the mandate. This is a value from 1 to 31. + #[prost(int32, tag = "11")] + pub recurrence_rule_value: i32, + /// Output only. The start date of the mandate. + #[prost(message, optional, tag = "12")] + pub start_date: ::core::option::Option, + /// Output only. The end date of the mandate. + #[prost(message, optional, tag = "13")] + pub end_date: ::core::option::Option, + /// Output only. If true, this specifies mandate can be revoked. + #[prost(bool, tag = "14")] + pub revokable: bool, + /// Output only. The amount of the mandate. + #[prost(double, tag = "15")] + pub amount: f64, + /// Output only. The amount rule type of the mandate. + #[prost(enumeration = "mandate_transaction::AmountRuleType", tag = "16")] + pub amount_rule: i32, + /// Output only. The Block funds reference generated by the bank, this will be available + /// only when Recurrence is ONETIME. + #[prost(string, tag = "17")] + pub approval_reference: ::prost::alloc::string::String, + /// Output only. If true, this specifies the mandate transaction requested funds to be + /// blocked. + #[prost(bool, tag = "18")] + pub block_funds: bool, + /// Output only. + #[prost(message, optional, tag = "19")] + pub last_update_time: ::core::option::Option<::prost_types::Timestamp>, } -/// Generated client implementations. -pub mod issuer_switch_rules_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - use tonic::codegen::http::Uri; - /// Manages rules used by the issuer switch's rules engine. - #[derive(Debug, Clone)] - pub struct IssuerSwitchRulesClient { - inner: tonic::client::Grpc, +/// Nested message and enum types in `MandateTransaction`. +pub mod mandate_transaction { + /// RecurrencePatternType specifies the recurrence pattern type of the mandate. + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum RecurrencePatternType { + /// Unspecified recurrence pattern. + Unspecified = 0, + /// As presented recurrence pattern. + AsPresented = 1, + /// Bi monthly recurrence pattern. + Bimonthly = 2, + /// Daily recurrence pattern. + Daily = 3, + /// Bi weekly recurrence pattern. + Fortnightly = 4, + /// Half yearly recurrence pattern. + HalfYearly = 5, + /// Monthly recurrence pattern. + Monthly = 6, + /// One time recurrence pattern. + OneTime = 7, + /// Quarterly recurrence pattern. + Quarterly = 8, + /// Weekly recurrence pattern. + Weekly = 9, + /// Yearly recurrence pattern. + Yearly = 10, } - impl IssuerSwitchRulesClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: std::convert::TryInto, - D::Error: Into, - { - let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; - Ok(Self::new(conn)) - } - } - impl IssuerSwitchRulesClient - where - T: tonic::client::GrpcService, - T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, - { - pub fn new(inner: T) -> Self { - let inner = tonic::client::Grpc::new(inner); - Self { inner } - } - pub fn with_origin(inner: T, origin: Uri) -> Self { - let inner = tonic::client::Grpc::with_origin(inner, origin); - Self { inner } - } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> IssuerSwitchRulesClient> - where - F: tonic::service::Interceptor, - T::ResponseBody: Default, - T: tonic::codegen::Service< - http::Request, - Response = http::Response< - >::ResponseBody, - >, - >, - , - >>::Error: Into + Send + Sync, - { - IssuerSwitchRulesClient::new(InterceptedService::new(inner, interceptor)) - } - /// Compress requests with the given encoding. + impl RecurrencePatternType { + /// String value of the enum field names used in the ProtoBuf definition. /// - /// This requires the server to support it otherwise it might respond with an - /// error. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.send_compressed(encoding); - self - } - /// Enable decompressing responses. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.accept_compressed(encoding); - self - } - /// List all rules that are applied on transactions by the issuer switch. Rules - /// can be filtered on API type and transaction type. - pub async fn list_rules( - &mut self, - request: impl tonic::IntoRequest, - ) -> Result, tonic::Status> { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/google.cloud.paymentgateway.issuerswitch.v1.IssuerSwitchRules/ListRules", - ); - self.inner.unary(request.into_request(), path, codec).await - } - /// List all rule metadata for a given rule identifier. - pub async fn list_rule_metadata( - &mut self, - request: impl tonic::IntoRequest, - ) -> Result, tonic::Status> { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/google.cloud.paymentgateway.issuerswitch.v1.IssuerSwitchRules/ListRuleMetadata", - ); - self.inner.unary(request.into_request(), path, codec).await - } - /// List all metadata values for a rule metadata identifier. - pub async fn list_rule_metadata_values( - &mut self, - request: impl tonic::IntoRequest, - ) -> Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/google.cloud.paymentgateway.issuerswitch.v1.IssuerSwitchRules/ListRuleMetadataValues", - ); - self.inner.unary(request.into_request(), path, codec).await - } - /// Create (add) multiple values to the list of values under the specified rule - /// metadata resource. - pub async fn batch_create_rule_metadata_values( - &mut self, - request: impl tonic::IntoRequest, - ) -> Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/google.cloud.paymentgateway.issuerswitch.v1.IssuerSwitchRules/BatchCreateRuleMetadataValues", - ); - self.inner.unary(request.into_request(), path, codec).await - } - /// Delete (remove) multiple values from the list of values under the specified - /// rules metadata resource. - pub async fn batch_delete_rule_metadata_values( - &mut self, - request: impl tonic::IntoRequest, - ) -> Result, tonic::Status> { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/google.cloud.paymentgateway.issuerswitch.v1.IssuerSwitchRules/BatchDeleteRuleMetadataValues", - ); - self.inner.unary(request.into_request(), path, codec).await + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + RecurrencePatternType::Unspecified => { + "RECURRENCE_PATTERN_TYPE_UNSPECIFIED" + } + RecurrencePatternType::AsPresented => "AS_PRESENTED", + RecurrencePatternType::Bimonthly => "BIMONTHLY", + RecurrencePatternType::Daily => "DAILY", + RecurrencePatternType::Fortnightly => "FORTNIGHTLY", + RecurrencePatternType::HalfYearly => "HALF_YEARLY", + RecurrencePatternType::Monthly => "MONTHLY", + RecurrencePatternType::OneTime => "ONE_TIME", + RecurrencePatternType::Quarterly => "QUARTERLY", + RecurrencePatternType::Weekly => "WEEKLY", + RecurrencePatternType::Yearly => "YEARLY", + } } } -} -/// Information about a transaction processed by the issuer switch. -/// The fields in this type are common across both financial and metadata -/// transactions. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TransactionInfo { - /// Output only. An identifier that is mandatorily present in every transaction processed - /// via UPI. This maps to UPI's transaction ID. - #[prost(string, tag = "1")] - pub id: ::prost::alloc::string::String, - /// Output only. The API type of the transaction. - #[prost(enumeration = "ApiType", tag = "2")] - pub api_type: i32, - /// Output only. The transaction type. - #[prost(enumeration = "TransactionType", tag = "3")] - pub transaction_type: i32, - /// Output only. The transaction sub-type. - #[prost(enumeration = "transaction_info::TransactionSubType", tag = "4")] - pub transaction_sub_type: i32, - /// Output only. The transaction's state. - #[prost(enumeration = "transaction_info::State", tag = "5")] - pub state: i32, - /// Output only. Error code of the failed transaction. - #[prost(string, tag = "6")] - pub error_code: ::prost::alloc::string::String, - /// Output only. Error description for the failed transaction. - #[prost(string, tag = "7")] - pub error_message: ::prost::alloc::string::String, - /// Output only. The time at which the transaction resource was created by the - /// issuer switch. - #[prost(message, optional, tag = "8")] - pub create_time: ::core::option::Option<::prost_types::Timestamp>, - /// Output only. List of Request IDs (colon separated) used when - /// invoking the Bank Adapter APIs for fulfilling a transaction request. - #[prost(string, tag = "9")] - pub bank_adapter_request_ids: ::prost::alloc::string::String, - /// Output only. Error code as per the UPI specification. The issuer switch maps the - /// ErrorCode to an appropriate error code that complies with the UPI - /// specification. - #[prost(string, tag = "10")] - pub upi_error_code: ::prost::alloc::string::String, -} -/// Nested message and enum types in `TransactionInfo`. -pub mod transaction_info { - /// Specifies the current state of the transaction. + /// RecurrenceRuleType specifies the recurrence rule type of mandate. #[derive( Clone, Copy, @@ -2261,29 +2218,32 @@ pub mod transaction_info { ::prost::Enumeration )] #[repr(i32)] - pub enum State { - /// Unspecicifed state. + pub enum RecurrenceRuleType { + /// Unspecified recurrence rule type. Unspecified = 0, - /// The transaction has successfully completed. - Succeeded = 1, - /// The transaction has failed. - Failed = 2, + /// After recurrence rule type. + After = 1, + /// Before recurrence rule type. + Before = 2, + /// On recurrence rule type. + On = 3, } - impl State { + impl RecurrenceRuleType { /// String value of the enum field names used in the ProtoBuf definition. /// /// The values are not transformed in any way and thus are considered stable /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - State::Unspecified => "STATE_UNSPECIFIED", - State::Succeeded => "SUCCEEDED", - State::Failed => "FAILED", + RecurrenceRuleType::Unspecified => "RECURRENCE_RULE_TYPE_UNSPECIFIED", + RecurrenceRuleType::After => "AFTER", + RecurrenceRuleType::Before => "BEFORE", + RecurrenceRuleType::On => "ON", } } } - /// The sub-type of a transaction. This value is used only for certain API type - /// and transaction type combinations. + /// AmountRuleType specifies the type of rule associated with the mandate + /// amount. #[derive( Clone, Copy, @@ -2296,854 +2256,1654 @@ pub mod transaction_info { ::prost::Enumeration )] #[repr(i32)] - pub enum TransactionSubType { - /// Unspecified transaction sub-type. + pub enum AmountRuleType { + /// Unspecified amount rule. Unspecified = 0, - /// Collect sub type. This is used in a `SETTLE_PAYMENT` API type - /// transaction, with transaction type as either `CREDIT` or `DEBIT` when the - /// payment was initiated by a collect request. - Collect = 1, - /// Debit sub type. This is used in a `SETTLE_PAYMENT` API type transaction, - /// with transaction type as `REVERSAL` when the original payment was a - /// debit request. - Debit = 2, - /// Pay sub type. This is used in a `SETTLE_PAYMENT` API type transaction, - /// with transaction type as either `CREDIT` or `DEBIT` when the payment was - /// initiated by a pay request. - Pay = 3, - /// Beneficiary subtype. This is used in a `COMPLAINT` API type transaction, - /// when the complaint / dispute request is initiated / received by the - /// beneficiary bank. - Beneficiary = 4, - /// Remitter subtype. This is used in a `COMPLAINT` API type transaction, - /// when the complaint / dispute request is initiated / received by the - /// remitter bank. - Remitter = 5, + /// Exact amount rule. Amount specified is the exact amount for which + /// mandate could be granted. + Exact = 1, + /// Max amount rule. Amount specified is the maximum amount for which + /// mandate could be granted. + Max = 2, } - impl TransactionSubType { + impl AmountRuleType { /// String value of the enum field names used in the ProtoBuf definition. /// /// The values are not transformed in any way and thus are considered stable /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - TransactionSubType::Unspecified => "TRANSACTION_SUB_TYPE_UNSPECIFIED", - TransactionSubType::Collect => "COLLECT", - TransactionSubType::Debit => "DEBIT", - TransactionSubType::Pay => "PAY", - TransactionSubType::Beneficiary => "BENEFICIARY", - TransactionSubType::Remitter => "REMITTER", + AmountRuleType::Unspecified => "AMOUNT_RULE_TYPE_UNSPECIFIED", + AmountRuleType::Exact => "EXACT", + AmountRuleType::Max => "MAX", } } } } -/// A metadata API transaction processed by the issuer switch. This -/// includes UPI APIs such as List Accounts, Balance Enquiry, etc. +/// A complaint API transaction processed by the issuer switch. In +/// UPI, this maps to the Complaint API. #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MetadataTransaction { - /// The name of the metadata transaction. This uniquely identifies the +pub struct ComplaintTransaction { + /// The name of the complaint transaction. This uniquely identifies the /// transaction. Format of name is - /// projects/{project_id}/metadataTransaction/{metadata_transaction_id}. + /// projects/{project_id}/complaintTransactions/{complaint_transaction_id}. #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, /// Information about the transaction. #[prost(message, optional, tag = "2")] pub info: ::core::option::Option, - /// Output only. Virtual Payment Address (VPA) which originated the request. - #[prost(string, tag = "3")] - pub origin_vpa: ::prost::alloc::string::String, + /// Information about the complaint transaction. It can be one of Complaint or + /// Dispute. + #[prost(oneof = "complaint_transaction::Case", tags = "3, 4")] + pub case: ::core::option::Option, } -/// A financial API transaction processed by the issuer switch. In UPI, this maps -/// to the Pay API. +/// Nested message and enum types in `ComplaintTransaction`. +pub mod complaint_transaction { + /// Information about the complaint transaction. It can be one of Complaint or + /// Dispute. + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Case { + /// Output only. Information about the complaint transaction when it is of type complaint. + #[prost(message, tag = "3")] + Complaint(super::Complaint), + /// Output only. Information about the complaint transaction when it is of type dispute. + #[prost(message, tag = "4")] + Dispute(super::Dispute), + } +} +/// Request for the `ListMetadataTransactions` method. Callers can request for +/// transactions to be filtered by the given filter criteria and specified +/// pagination parameters. #[derive(Clone, PartialEq, ::prost::Message)] -pub struct FinancialTransaction { - /// The name of the financial transaction. This uniquely identifies the - /// transaction. Format of name is - /// projects/{project_id}/financialTransactions/{financial_transaction_id}. +pub struct ListMetadataTransactionsRequest { + /// Required. The parent resource. The format is `projects/{project}`. #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, - /// Information about the transaction. - #[prost(message, optional, tag = "2")] - pub info: ::core::option::Option, - /// Output only. A 12 digit numeric code associated with the request. It could contain - /// leading 0s. In UPI, this is also known as as the customer reference or the - /// UPI transaction ID. + pub parent: ::prost::alloc::string::String, + /// The maximum number of transactions to return. The service may return fewer + /// than this value. If unspecified or if the specified value is less than 1, + /// at most 50 transactions will be returned. The maximum value is 1000; values + /// above 1000 will be coerced to 1000. While paginating, you can specify a new + /// page size parameter for each page of transactions to be listed. + #[prost(int32, tag = "2")] + pub page_size: i32, + /// A page token, received from a previous `ListMetadataTransactions` call. + /// Specify this parameter to retrieve the next page of transactions. + /// + /// When paginating, you must specify only the `page_token` parameter. The + /// filter that was specified in the initial call to the + /// `ListMetadataTransactions` method that returned the page token will be + /// reused for all further calls where the page token parameter is specified. #[prost(string, tag = "3")] - pub retrieval_reference_number: ::prost::alloc::string::String, - /// Output only. The payer in the transaction. - #[prost(message, optional, tag = "4")] - pub payer: ::core::option::Option, - /// Output only. The payee in the transaction. - #[prost(message, optional, tag = "5")] - pub payee: ::core::option::Option, - /// Output only. The amount for payment settlement in the transaction. - #[prost(message, optional, tag = "6")] - pub amount: ::core::option::Option, + pub page_token: ::prost::alloc::string::String, + /// An expression that filters the list of metadata transactions. + /// + /// A filter expression consists of a field name, a comparison + /// operator, and a value for filtering. The value must be a string, a + /// number, or a boolean. The comparison operator must be one of: `<`, `>` or + /// `=`. Filters are not case sensitive. + /// + /// The following fields in the `MetadataTransaction` are eligible for + /// filtering: + /// + /// * `apiType` - The API type of the metadata transaction. Must be one of + /// \[ApiType][google.cloud.paymentgateway.issuerswitch.v1.ApiType\] values. Allowed comparison operators: `=`. + /// * `transactionType` - The transaction type of the metadata transaction. + /// Must be one of \[TransactionType][google.cloud.paymentgateway.issuerswitch.v1.TransactionType\] values. Allowed comparison + /// operators: `=`. + /// * `transactionID` - The UPI transaction ID of the metadata transaction. + /// Allowed comparison operators: `=`. + /// * `originVPA` - The VPA of the orignitator of a metadata transaction. + /// Allowed comparison operators: `=`. + /// * `createTime` - The time at which the transaction was created + /// (received) by the issuer switch. The value should be in + /// the format `YYYY-MM-DDTHH:MM:SSZ`. Allowed comparison operators: `>`, + /// `<`. + /// * `state` - The state of the transaction. Must be one of + /// \[TransactionInfo.State][google.cloud.paymentgateway.issuerswitch.v1.TransactionInfo.State\] values. Allowed comparison operators: `=`. + /// * `errorCode` - Use this filter to list financial transactions which + /// have failed a particular error code. Allowed comparison operators: + /// `=`. + /// * `bankAdapterRequestID` - Request ID used when invoking the Bank + /// Adapter API for fulfilling a transaction request. Allowed comparison + /// operators: `=`. + /// + /// You can combine multiple expressions by enclosing each expression in + /// parentheses. Expressions are combined with AND logic. No other logical + /// operators are supported. + /// + /// Here are a few examples: + /// + /// * `apiType = LIST_ACCOUNTS` - - The API type is _LIST_ACCOUNTS_. + /// * `state = SUCCEEDED` - The transaction's state is _SUCCEEDED_. + /// * `(apiType = LIST_ACCOUNTS) AND (create_time < + /// \"2021-08-15T14:50:00Z\")` - The API type is _LIST_ACCOUNTS_ and + /// the transaction was received before _2021-08-15 14:50:00 UTC_. + #[prost(string, tag = "4")] + pub filter: ::prost::alloc::string::String, } -/// A mandate processed by the issuer switch. In UPI, this maps to the Mandate -/// API. +/// Request for the `ListFinancialTransactions` method. Callers can request for +/// transactions to be filtered by the given filter criteria and specified +/// pagination parameters. #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MandateTransaction { - /// The name of the mandate transaction. This uniquely identifies the - /// transaction. Format of name is - /// projects/{project_id}/mandateTransactions/{mandate_transaction_id}. +pub struct ListFinancialTransactionsRequest { + /// Required. The parent resource. The format is `projects/{project}`. #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, - /// Information about the transaction. - #[prost(message, optional, tag = "2")] - pub transaction_info: ::core::option::Option, - /// Output only. This maps to Unique Mandate Number (UMN) in UPI specification. + pub parent: ::prost::alloc::string::String, + /// The maximum number of transactions to return. The service may return fewer + /// than this value. If unspecified or if the specified value is less than 1, + /// at most 50 transactions will be returned. The maximum value is 1000; values + /// above 1000 will be coerced to 1000. While paginating, you can specify a new + /// page size parameter for each page of transactions to be listed. + #[prost(int32, tag = "2")] + pub page_size: i32, + /// A page token, received from a previous `ListFinancialTransactions` call. + /// Specify this parameter to retrieve the next page of transactions. + /// + /// When paginating, you must specify only the `page_token` parameter. The + /// filter that was specified in the initial call to the + /// `ListFinancialTransactions` method that returned the page token will be + /// reused for all further calls where the page token parameter is specified. #[prost(string, tag = "3")] - pub unique_mandate_number: ::prost::alloc::string::String, - /// Output only. The virtual payment address (VPA) of the payer. + pub page_token: ::prost::alloc::string::String, + /// An expression that filters the list of financial transactions. + /// + /// A filter expression consists of a field name, a comparison operator, and + /// a value for filtering. The value must be a string, a number, or a + /// boolean. The comparison operator must be one of: `<`, `>`, or `=`. + /// Filters are not case sensitive. + /// + /// The following fields in the `FinancialTransaction` are eligible for + /// filtering: + /// + /// * `transactionType` - The transaction type of the financial + /// transaction. Must be one of \[TransactionType][google.cloud.paymentgateway.issuerswitch.v1.TransactionType\] values. For financial + /// transactions, only valid transaction types are `TRANSACTION_TYPE_CREDIT`, + /// `TRANSACTION_TYPE_DEBIT` and `TRANSACTION_TYPE_REVERSAL`. Allowed + /// comparison operators: `=`. + /// * `transactionID` - The UPI transaction ID of the financial + /// transaction. Allowed comparison operators: `=`. + /// * `RRN` - The retrieval reference number of the transaction. Allowed + /// comparison operators: `=`. + /// * `payerVPA` - The VPA of the payer in a financial transaction. Allowed + /// comparison operators: `=`. + /// * `payeeVPA` - The VPA of the payee in a financial transaction. Allowed + /// comparison operators: `=`. + /// * `payerMobileNumber` - The mobile number of the payer in a financial + /// transaction. Allowed comparison operators: `=`. + /// * `payeeMobileNumber` - The mobile number of the payee in a financial + /// transaction. Allowed comparison operators: `=`. + /// * `payeeMerchantId` - The merchant id of the payee in a financial + /// transaction. Allowed comparison operators: `=`. + /// * `createTime` - The time at which the transaction was created + /// (received) by the issuer switch. The value should be in + /// the format `YYYY-MM-DDTHH:MM:SSZ`. Allowed comparison operators: `>`, + /// `<`. + /// * `state` - The state of the transaction. Must be one of + /// \[TransactionInfo.State][google.cloud.paymentgateway.issuerswitch.v1.TransactionInfo.State\] values. Allowed comparison operators: `=`. + /// * `errorCode` - Use this filter to list financial transactions which + /// have failed a particular error code. Allowed comparison operators: `=`. + /// * `bankAdapterRequestID` - Request ID used when invoking the Bank + /// Adapter API for fulfilling a transaction request. Allowed comparison + /// operators: `=`. + /// + /// You can combine multiple expressions by enclosing each expression in + /// parentheses. Expressions are combined with AND logic. No other logical + /// operators are supported. + /// + /// Here are a few examples: + /// + /// * `transactionType = CREDIT` - The transaction type is _CREDIT_. + /// * `state = SUCCEEDED` - The transaction's state is _SUCCEEDED_. + /// * `payerVpa = example@okbank` - The VPA of the payer is the string + /// _example@okbank_. + /// * `(transactionType = DEBIT) AND (createTime < "2021-08-15T14:50:00Z")` + /// - The transaction type is _DEBIT_ and the transaction was received + /// before _2021-08-15 14:50:00 UTC_. + /// * `createTime > "2021-08-15T14:50:00Z" AND createTime < + /// "2021-08-16T14:50:00Z"` - The transaction was received between + /// _2021-08-15 14:50:00 UTC_ and _2021-08-16 14:50:00 UTC_. #[prost(string, tag = "4")] - pub payer_vpa: ::prost::alloc::string::String, - /// Output only. The virtual payment address (VPA) of the payee. - #[prost(string, tag = "5")] - pub payee_vpa: ::prost::alloc::string::String, - /// Output only. A unique identifier for merchant. - #[prost(string, tag = "6")] - pub payee_merchant_id: ::prost::alloc::string::String, - /// Output only. The mobile number of the payer consisting of total twelve digits where - /// first two digits of country code (for eg. 91 for India) and then ten - /// digits mobile number. For eg. 911234567890 - #[prost(string, tag = "7")] - pub payer_mobile_number: ::prost::alloc::string::String, - /// Output only. The mobile number of the payer consisting of total twelve digits where - /// first two digits of country code (for eg. 91 for India) and then ten - /// digits mobile number. For eg. 911234567890 - #[prost(string, tag = "8")] - pub payee_mobile_number: ::prost::alloc::string::String, - /// Output only. The type of recurrence pattern of the mandate. - #[prost(enumeration = "mandate_transaction::RecurrencePatternType", tag = "9")] - pub recurrence_pattern: i32, - /// Output only. The type of recurrence rule of the mandate. - #[prost(enumeration = "mandate_transaction::RecurrenceRuleType", tag = "10")] - pub recurrence_rule_type: i32, - /// Output only. The recurrence rule value of the mandate. This is a value from 1 to 31. - #[prost(int32, tag = "11")] - pub recurrence_rule_value: i32, - /// Output only. The start date of the mandate. - #[prost(message, optional, tag = "12")] - pub start_date: ::core::option::Option, - /// Output only. The end date of the mandate. - #[prost(message, optional, tag = "13")] - pub end_date: ::core::option::Option, - /// Output only. If true, this specifies mandate can be revoked. - #[prost(bool, tag = "14")] - pub revokable: bool, - /// Output only. The amount of the mandate. - #[prost(double, tag = "15")] - pub amount: f64, - /// Output only. The amount rule type of the mandate. - #[prost(enumeration = "mandate_transaction::AmountRuleType", tag = "16")] - pub amount_rule: i32, - /// Output only. The Block funds reference generated by the bank, this will be available - /// only when Recurrence is ONETIME. - #[prost(string, tag = "17")] - pub approval_reference: ::prost::alloc::string::String, - /// Output only. If true, this specifies the mandate transaction requested funds to be - /// blocked. - #[prost(bool, tag = "18")] - pub block_funds: bool, - /// Output only. The last time at which the mandate resource was modified by the issuer - /// switch. - #[prost(message, optional, tag = "19")] - pub last_update_time: ::core::option::Option<::prost_types::Timestamp>, + pub filter: ::prost::alloc::string::String, } -/// Nested message and enum types in `MandateTransaction`. -pub mod mandate_transaction { - /// RecurrencePatternType specifies the recurrence pattern type of the mandate. - #[derive( - Clone, - Copy, - Debug, - PartialEq, - Eq, - Hash, - PartialOrd, - Ord, - ::prost::Enumeration - )] - #[repr(i32)] - pub enum RecurrencePatternType { - /// Unspecified recurrence pattern. - Unspecified = 0, - /// As presented recurrence pattern. - AsPresented = 1, - /// Bi monthly recurrence pattern. - Bimonthly = 2, - /// Daily recurrence pattern. - Daily = 3, - /// Bi weekly recurrence pattern. - Fortnightly = 4, - /// Half yearly recurrence pattern. - HalfYearly = 5, - /// Monthly recurrence pattern. - Monthly = 6, - /// One time recurrence pattern. - OneTime = 7, - /// Quarterly recurrence pattern. - Quarterly = 8, - /// Weekly recurrence pattern. - Weekly = 9, - /// Yearly recurrence pattern. - Yearly = 10, +/// Request for the `ListMandateTransactions` method. Callers can request for +/// transactions to be filtered by the given filter criteria and specified +/// pagination parameters. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMandateTransactionsRequest { + /// Required. The parent resource. The format is `projects/{project}`. + #[prost(string, tag = "1")] + pub parent: ::prost::alloc::string::String, + /// The maximum number of transactions to return. The service may return fewer + /// than this value. If unspecified or if the specified value is less than 1, + /// at most 50 transactions will be returned. The maximum value is 1000; values + /// above 1000 will be coerced to 1000. While paginating, you can specify a new + /// page size parameter for each page of transactions to be listed. + #[prost(int32, tag = "2")] + pub page_size: i32, + /// A page token, received from a previous `ListMandateTransactions` call. + /// Specify this parameter to retrieve the next page of transactions. + /// + /// When paginating, you must specify only the `page_token` parameter. The + /// filter that was specified in the initial call to the + /// `ListMandateTransactions` method that returned the page token will be + /// reused for all further calls where the page token parameter is specified. + #[prost(string, tag = "3")] + pub page_token: ::prost::alloc::string::String, + /// An expression that filters the list of mandate transactions. + /// + /// A filter expression consists of a field name, a comparison operator, and + /// a value for filtering. The value must be a string, a number, or a + /// boolean. The comparison operator must be one of: `<`, `>`, or `=`. + /// Filters are not case sensitive. + /// + /// The following fields in the `Mandate` are eligible for + /// filtering: + /// + /// * `uniqueMandateNumber` - UPI Unique Mandate Number (UMN). Allowed + /// comparison operators: `=`. + /// * `transactionID` - The transaction ID of the mandate transaction. + /// Allowed comparison operators: `=`. + /// * `transactionType` - The transaction type of the mandate + /// transaction. Must be one of \[TransactionType][google.cloud.paymentgateway.issuerswitch.v1.TransactionType\] values. For mandate + /// transactions, only valid transaction types are + /// `TRANSACTION_TYPE_CREATE`, `TRANSACTION_TYPE_REVOKE` and + /// `TRANSACTION_TYPE_UPDATE`. Allowed comparison operators: `=`. + /// * `payerVPA` - The VPA of the payer in a mandate transaction. Allowed + /// comparison operators: `=`. + /// * `payeeVPA` - The VPA of the payee in a mandate transaction. Allowed + /// comparison operators: `=`. + /// * `payeeMerchantID` - The merchant ID of the payee in a mandate + /// transaction. Allowed comparison operators: `=`. + /// * `payerMobileNumber` - The mobile number of the payer in a mandate + /// transaction. Allowed comparison operators: `=`. + /// * `payeeMobileNumber` - The mobile number of the payee in a mandate + /// transaction. Allowed comparison operators: `=`. + /// * `createTime` - The time at which the transaction was created + /// (received) by the issuer switch. The value should be in + /// the format `YYYY-MM-DDTHH:MM:SSZ`. Allowed comparison + /// operators: `>`, `<`. + /// * `state` - The state of the transaction. Must be one of + /// \[TransactionInfo.State][google.cloud.paymentgateway.issuerswitch.v1.TransactionInfo.State\] values. Allowed comparison operators: `=`. + /// * `recurrencePattern` - The recurrence pattern of the mandate. Must be + /// one of \[MandateTransaction.RecurrencePatternType][google.cloud.paymentgateway.issuerswitch.v1.MandateTransaction.RecurrencePatternType\] values. Allowed + /// comparison operators: `=`. + /// * `startDate` - The start date of the mandate. The value should be in + /// the format `YYYY-MM-DD`. Allowed comparison operators: `<` and `>`. + /// * `endDate` - The end date of the mandate. The value should be in + /// the format `YYYY-MM-DD`. Allowed comparison operators: `<` and `>`. + /// * `errorCode` - Use this filter to list mandate transactions which + /// have failed a particular error code. Allowed comparison + /// operators: `=`. + /// * `bankAdapterRequestID` - Request ID used when invoking the Bank + /// Adapter API for fulfilling a transaction request. Allowed comparison + /// operators: `=`. + /// You can combine multiple expressions by enclosing each expression in + /// parentheses. Expressions are combined with AND logic. No other logical + /// operators are supported. + /// + /// Here are a few examples: + /// * `recurrencePattern = MONTHLY` - The recurrence pattern type is + /// monthly. + /// * `state = SUCCEEDED` - The transaction's state is _SUCCEEDED_. + /// * `payerVPA = example@okbank` - The VPA of the payer is the string + /// _example@okbank_. + /// * `(payerVPA = example@okbank) AND (createTime < + /// "2021-08-15T14:50:00Z")` + /// - The payer VPA example@okbank and the transaction was received + /// before _2021-08-15 14:50:00 UTC_. + /// * `createTime > "2021-08-15T14:50:00Z" AND createTime < + /// "2021-08-16T14:50:00Z"` - The transaction was received between + /// _2021-08-15 14:50:00 UTC_ and _2021-08-16 14:50:00 UTC_. + /// * `startDate > "2021-08-15" AND startDate < "2021-08-17"` - The start + /// date for mandate is between _2021-08-15_ and _2021-08-17_. + #[prost(string, tag = "4")] + pub filter: ::prost::alloc::string::String, +} +/// Request for the `ListComplaintTransactions` method. Callers can request for +/// transactions to be filtered by the given filter criteria and specified +/// pagination parameters. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListComplaintTransactionsRequest { + /// Required. The parent resource. The format is `projects/{project}`. + #[prost(string, tag = "1")] + pub parent: ::prost::alloc::string::String, + /// The maximum number of transactions to return. The service may return fewer + /// than this value. If unspecified or if the specified value is less than 1, + /// at most 50 transactions will be returned. The maximum value is 1000; values + /// above 1000 will be coerced to 1000. While paginating, you can specify a new + /// page size parameter for each page of transactions to be listed. + #[prost(int32, tag = "2")] + pub page_size: i32, + /// A page token, received from a previous `ListComplaintTransactions` call. + /// Specify this parameter to retrieve the next page of transactions. + /// + /// When paginating, you must specify only the `page_token` parameter. The + /// filter that was specified in the initial call to the + /// `ListComplaintTransactions` method that returned the page token will be + /// reused for all further calls where the page token parameter is specified. + #[prost(string, tag = "3")] + pub page_token: ::prost::alloc::string::String, + /// An expression that filters the list of complaint transactions. + /// + /// A filter expression consists of a field name, a comparison operator, and + /// a value for filtering. The value must be a string, a number, or a + /// boolean. The comparison operator must be one of: `<`, `>`, or `=`. + /// Filters are not case sensitive. + /// + /// The following fields in the `Complaint` are eligible for + /// filtering: + /// + /// * `transactionID` - The transaction ID of the complaint transaction. + /// Allowed comparison operators: `=`. + /// * `transactionType` - The transaction type of the complaint + /// transaction. Must be one of \[TransactionType][google.cloud.paymentgateway.issuerswitch.v1.TransactionType\] values. For complaint + /// transactions, only valid transaction types are + /// `TRANSACTION_TYPE_CHECK_STATUS`, `TRANSACTION_TYPE_COMPLAINT`, + /// `TRANSACTION_TYPE_REVERSAL`, `TRANSACTION_TYPE_DISPUTE`, + /// `TRANSACTION_TYPE_REFUND` or `TRANSACTION_TYPE_STATUS_UPDATE`. Allowed + /// comparison operators: `=`. + /// * `originalRRN` - The retrieval reference number of the original + /// transaction for which complaint / dispute was raised / resolved. Allowed + /// comparison operators: `=`. + /// * `createTime` - The time at which the transaction was created + /// (received) by the issuer switch. The value should be in + /// the format `YYYY-MM-DDTHH:MM:SSZ`. Allowed comparison + /// operators: `>`, `<`. + /// * `state` - The state of the transaction. Must be one of + /// \[TransactionInfo.State][google.cloud.paymentgateway.issuerswitch.v1.TransactionInfo.State\] values. Allowed comparison operators: `=`. + /// * `errorCode` - Use this filter to list complaint transactions which + /// have failed a particular error code. Allowed comparison + /// operators: `=`. + /// You can combine multiple expressions by enclosing each expression in + /// parentheses. Expressions are combined with AND logic. No other logical + /// operators are supported. + /// + /// Here are a few examples: + /// + /// * `state = SUCCEEDED` - The transaction's state is _SUCCEEDED_. + /// * (createTime < "2021-08-15T14:50:00Z")` + /// - The transaction was received before _2021-08-15 14:50:00 UTC_. + /// * `createTime > "2021-08-15T14:50:00Z" AND createTime < + /// "2021-08-16T14:50:00Z"` - The transaction was received between + /// _2021-08-15 14:50:00 UTC_ and _2021-08-16 14:50:00 UTC_. + #[prost(string, tag = "4")] + pub filter: ::prost::alloc::string::String, +} +/// Response for the `ListMetadataTransactions` method. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMetadataTransactionsResponse { + /// List of non financial metadata transactions satisfying the filtered + /// request. + #[prost(message, repeated, tag = "1")] + pub metadata_transactions: ::prost::alloc::vec::Vec, + /// Pass this token in the ListMetadataTransactionsRequest to continue to list + /// results. If all results have been returned, this field is an empty string + /// or not present in the response. + #[prost(string, tag = "2")] + pub next_page_token: ::prost::alloc::string::String, +} +/// Response for the `ListFinancialTransactions` method. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListFinancialTransactionsResponse { + /// List of financial transactions satisfying the filtered request. + #[prost(message, repeated, tag = "1")] + pub financial_transactions: ::prost::alloc::vec::Vec, + /// Pass this token in the ListFinancialTransactionsRequest to continue to list + /// results. If all results have been returned, this field is an empty string + /// or not present in the response. + #[prost(string, tag = "2")] + pub next_page_token: ::prost::alloc::string::String, +} +/// Response for the `ListMandateTransactionsResponse` method. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMandateTransactionsResponse { + /// List of mandate transactions satisfying the filtered request. + #[prost(message, repeated, tag = "1")] + pub mandate_transactions: ::prost::alloc::vec::Vec, + /// Pass this token in the ListMandateTransactionsRequest to continue to list + /// results. If all results have been returned, this field is an empty string + /// or not present in the response. + #[prost(string, tag = "2")] + pub next_page_token: ::prost::alloc::string::String, +} +/// Response for the `ListComplaintTransactionsResponse` method. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListComplaintTransactionsResponse { + /// List of complaint transactions satisfying the filtered request. + #[prost(message, repeated, tag = "1")] + pub complaint_transactions: ::prost::alloc::vec::Vec, + /// Pass this token in the ListComplaintTransactionsRequest to continue to list + /// results. If all results have been returned, this field is an empty string + /// or not present in the response. + #[prost(string, tag = "2")] + pub next_page_token: ::prost::alloc::string::String, +} +/// Request for the `ExportFinancialTransactions` method. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ExportFinancialTransactionsRequest { + /// Required. The parent resource for the transactions. The format is + /// `projects/{project}`. + #[prost(string, tag = "1")] + pub parent: ::prost::alloc::string::String, + /// Transaction type for the financial transaction API. The possible values for + /// transaction type are + /// + /// * TRANSACTION_TYPE_CREDIT + /// * TRANSACTION_TYPE_DEBIT + /// * TRANSACTION_TYPE_REVERSAL + /// + /// If no transaction type is specified, records of all the above transaction + /// types will be exported. + #[prost(enumeration = "TransactionType", tag = "2")] + pub transaction_type: i32, + /// The start time for the query. + #[prost(message, optional, tag = "3")] + pub start_time: ::core::option::Option<::prost_types::Timestamp>, + /// The end time for the query. + #[prost(message, optional, tag = "4")] + pub end_time: ::core::option::Option<::prost_types::Timestamp>, +} +/// Request for the `ExportMetadataTransactions` method. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ExportMetadataTransactionsRequest { + /// Required. The parent resource for the transactions. The format is + /// `projects/{project}`. + #[prost(string, tag = "1")] + pub parent: ::prost::alloc::string::String, + /// API type of the metadata transaction API. The possible values for API type + /// are + /// + /// * BALANCE + /// * CHECK_STATUS + /// * HEART_BEAT + /// * INITIATE_REGISTRATION + /// * LIST_ACCOUNTS + /// * UPDATE_CREDENTIALS + /// * VALIDATE_REGISTRATION + /// + /// If no API type is specified, records of all the above API types will be + /// exported. + #[prost(enumeration = "ApiType", tag = "2")] + pub api_type: i32, + /// The start time for the query. + #[prost(message, optional, tag = "3")] + pub start_time: ::core::option::Option<::prost_types::Timestamp>, + /// The end time for the query. + #[prost(message, optional, tag = "4")] + pub end_time: ::core::option::Option<::prost_types::Timestamp>, +} +/// Request for the `ExportMandateTransactions` method. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ExportMandateTransactionsRequest { + /// Required. The parent resource for the transactions. The format is + /// `projects/{project}`. + #[prost(string, tag = "1")] + pub parent: ::prost::alloc::string::String, + /// Transaction type for the mandate transaction API. The possible values for + /// transaction type are + /// + /// * TRANSACTION_TYPE_CREATE + /// * TRANSACTION_TYPE_REVOKE + /// * TRANSACTION_TYPE_UPDATE + /// + /// If no transaction type is specified, records of all the above transaction + /// types will be exported. + #[prost(enumeration = "TransactionType", tag = "2")] + pub transaction_type: i32, + /// The start time for the query. + #[prost(message, optional, tag = "3")] + pub start_time: ::core::option::Option<::prost_types::Timestamp>, + /// The end time for the query. + #[prost(message, optional, tag = "4")] + pub end_time: ::core::option::Option<::prost_types::Timestamp>, +} +/// Request for the `ExportComplaintTransactions` method. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ExportComplaintTransactionsRequest { + /// Required. The parent resource for the transactions. The format is + /// `projects/{project}`. + #[prost(string, tag = "1")] + pub parent: ::prost::alloc::string::String, + /// Transaction type for the complaint transaction API. The possible values for + /// transaction type are + /// + /// * TRANSACTION_TYPE_CHECK_STATUS + /// * TRANSACTION_TYPE_COMPLAINT + /// * TRANSACTION_TYPE_DISPUTE + /// * TRANSACTION_TYPE_REFUND + /// * TRANSACTION_TYPE_REVERSAL + /// * TRANSACTION_TYPE_STATUS_UPDATE + /// + /// If no transaction type is specified, records of all the above transaction + /// types will be exported. + #[prost(enumeration = "TransactionType", tag = "2")] + pub transaction_type: i32, + /// The start time for the query. + #[prost(message, optional, tag = "3")] + pub start_time: ::core::option::Option<::prost_types::Timestamp>, + /// The end time for the query. + #[prost(message, optional, tag = "4")] + pub end_time: ::core::option::Option<::prost_types::Timestamp>, +} +/// Response for the `ExportFinancialTransactions` method. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ExportFinancialTransactionsResponse { + /// URI of the exported file. + #[prost(string, tag = "1")] + pub target_uri: ::prost::alloc::string::String, +} +/// Response for the `ExportMetadataTransactions` method. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ExportMetadataTransactionsResponse { + /// URI of the exported file. + #[prost(string, tag = "1")] + pub target_uri: ::prost::alloc::string::String, +} +/// Response for the `ExportMandateTransactions` method. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ExportMandateTransactionsResponse { + /// URI of the exported file. + #[prost(string, tag = "1")] + pub target_uri: ::prost::alloc::string::String, +} +/// Response for the `ExportComplaintTransactions` method. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ExportComplaintTransactionsResponse { + /// URI of the exported file. + #[prost(string, tag = "1")] + pub target_uri: ::prost::alloc::string::String, +} +/// Metadata for ExportFinancialTransactions. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ExportFinancialTransactionsMetadata { + /// Output only. The time at which the operation was created. + #[prost(message, optional, tag = "1")] + pub create_time: ::core::option::Option<::prost_types::Timestamp>, +} +/// Metadata for ExportMandateTransactions. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ExportMandateTransactionsMetadata { + /// Output only. The time at which the operation was created. + #[prost(message, optional, tag = "1")] + pub create_time: ::core::option::Option<::prost_types::Timestamp>, +} +/// Metadata for ExportMetadataTransactions. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ExportMetadataTransactionsMetadata { + /// Output only. The time at which the operation was created. + #[prost(message, optional, tag = "1")] + pub create_time: ::core::option::Option<::prost_types::Timestamp>, +} +/// Metadata for ExportComplaintTransactions. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ExportComplaintTransactionsMetadata { + /// Output only. The time at which the operation was created. + #[prost(message, optional, tag = "1")] + pub create_time: ::core::option::Option<::prost_types::Timestamp>, +} +/// Generated client implementations. +pub mod issuer_switch_transactions_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + /// Lists and exports transactions processed by the issuer switch. + #[derive(Debug, Clone)] + pub struct IssuerSwitchTransactionsClient { + inner: tonic::client::Grpc, } - impl RecurrencePatternType { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - RecurrencePatternType::Unspecified => { - "RECURRENCE_PATTERN_TYPE_UNSPECIFIED" - } - RecurrencePatternType::AsPresented => "AS_PRESENTED", - RecurrencePatternType::Bimonthly => "BIMONTHLY", - RecurrencePatternType::Daily => "DAILY", - RecurrencePatternType::Fortnightly => "FORTNIGHTLY", - RecurrencePatternType::HalfYearly => "HALF_YEARLY", - RecurrencePatternType::Monthly => "MONTHLY", - RecurrencePatternType::OneTime => "ONE_TIME", - RecurrencePatternType::Quarterly => "QUARTERLY", - RecurrencePatternType::Weekly => "WEEKLY", - RecurrencePatternType::Yearly => "YEARLY", - } + impl IssuerSwitchTransactionsClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: std::convert::TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) } } - /// RecurrenceRuleType specifies the recurrence rule type of mandate. - #[derive( - Clone, - Copy, - Debug, - PartialEq, - Eq, - Hash, - PartialOrd, - Ord, - ::prost::Enumeration - )] - #[repr(i32)] - pub enum RecurrenceRuleType { - /// Unspecified recurrence rule type. - Unspecified = 0, - /// After recurrence rule type. - After = 1, - /// Before recurrence rule type. - Before = 2, - /// On recurrence rule type. - On = 3, - } - impl RecurrenceRuleType { - /// String value of the enum field names used in the ProtoBuf definition. + impl IssuerSwitchTransactionsClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> IssuerSwitchTransactionsClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + IssuerSwitchTransactionsClient::new( + InterceptedService::new(inner, interceptor), + ) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// List metadata transactions that satisfy the specified filter criteria. + pub async fn list_metadata_transactions( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.paymentgateway.issuerswitch.v1.IssuerSwitchTransactions/ListMetadataTransactions", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// List financial transactions that satisfy specified filter criteria. + pub async fn list_financial_transactions( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.paymentgateway.issuerswitch.v1.IssuerSwitchTransactions/ListFinancialTransactions", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// List mandate transactions that satisfy specified filter criteria. + pub async fn list_mandate_transactions( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.paymentgateway.issuerswitch.v1.IssuerSwitchTransactions/ListMandateTransactions", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// List complaint transactions that satisfy specified filter criteria. + pub async fn list_complaint_transactions( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.paymentgateway.issuerswitch.v1.IssuerSwitchTransactions/ListComplaintTransactions", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Export financial transactions received within the specified time range as a + /// file into a configured target location. The returned `Operation` type has + /// the following method-specific fields: + /// + /// - `metadata`: [ExportFinancialTransactionsMetadata][google.cloud.paymentgateway.issuerswitch.v1.ExportFinancialTransactionsMetadata] + /// - `response`: [ExportFinancialTransactionsResponse][google.cloud.paymentgateway.issuerswitch.v1.ExportFinancialTransactionsResponse] + /// + /// The exported file will be in the standard CSV format where each row in the + /// file represents a transaction. The file has the following fields in order: + /// + /// 1. `TransactionID` + /// * **Min Length** - 35 characters + /// * **Max Length** - 35 characters + /// * **Description** - UPI transaction ID. + /// 1. `TransactionType` + /// * **Min Length** - 22 characters + /// * **Max Length** - 25 characters + /// * **Description** - Type of the transaction. This will be one of + /// `TRANSACTION_TYPE_CREDIT`, `TRANSACTION_TYPE_DEBIT` or + /// `TRANSACTION_TYPE_REVERSAL`. + /// 1. `TransactionSubType` + /// * **Min Length** - 3 characters + /// * **Max Length** - 7 characters + /// * **Description** - Subtype of the transaction. This will be one of + /// `COLLECT`, or `PAY`. + /// 1. `RequestReceivedTimestamp` + /// * **Min Length** - 20 characters + /// * **Max Length** - 20 characters + /// * **Description** - Timestamp (in UTC) indicating when the transaction + /// API request was received by the issuer switch. The format will be as + /// per RFC-3339. Example : 2022-11-22T23:00:05Z + /// 1. `CreationTime` + /// * **Min Length** - 20 characters + /// * **Max Length** - 20 characters + /// * **Description** - Timestamp (in UTC) indicating when the issuer + /// switch created the transaction resource for processing the transaction. + /// The format will be as per RFC-3339. Example : 2022-11-22T23:00:05Z + /// 1. `State` + /// * **Min Length** - 6 characters + /// * **Max Length** - 9 characters + /// * **Description** - State of the transaction. This will be one of + /// `FAILED`, `SUCCEEDED`, or `TIMED_OUT`. + /// 1. `RRN` + /// * **Min Length** - 12 characters + /// * **Max Length** - 12 characters + /// * **Description** - Retrieval reference number associated with the + /// transaction. + /// 1. `PayerVPA` + /// * **Min Length** - 3 characters + /// * **Max Length** - 255 characters + /// * **Description** - Virtual Payment Address (VPA) of the payer. + /// 1. `PayerMobileNumber` + /// * **Min Length** - 12 characters + /// * **Max Length** - 12 characters + /// * **Description** - Mobile number of the payer. + /// 1. `PayerIFSC` + /// * **Min Length** - 11 characters + /// * **Max Length** - 11 characters + /// * **Description** - IFSC of the payer's bank account. + /// 1. `PayerAccountNumber` + /// * **Min Length** - 1 characters + /// * **Max Length** - 30 characters + /// * **Description** - Payer's bank account number. + /// 1. `PayerAccountType` + /// * **Min Length** - 3 characters + /// * **Max Length** - 7 characters + /// * **Description** - Payer's bank account type. This will be one of + /// `SAVINGS`, `DEFAULT`, `CURRENT`, `NRE`, `NRO`, `PPIWALLET`, + /// `BANKWALLET`, `CREDIT`, `SOD`, or `UOD`. + /// 1. `PayeeVPA` + /// * **Min Length** - 3 characters + /// * **Max Length** - 255 characters + /// * **Description** - Virtual Payment Address (VPA) of the payee. + /// 1. `PayeeMobileNumber` + /// * **Min Length** - 12 characters + /// * **Max Length** - 12 characters + /// * **Description** - Payee's mobile number. + /// 1. `PayeeIFSC` + /// * **Min Length** - 11 characters + /// * **Max Length** - 11 characters + /// * **Description** - IFSC of the payee's bank account. + /// 1. `PayeeAccountNumber` + /// * **Min Length** - 1 characters + /// * **Max Length** - 30 characters + /// * **Description** - Payee's bank account number. + /// 1 `PayeeAccountType` + /// * **Min Length** - 3 characters + /// * **Max Length** - 10 characters + /// * **Description** - Payee's bank account type. This will be one of + /// `SAVINGS`, `DEFAULT`, `CURRENT`, `NRE`, `NRO`, `PPIWALLET`, + /// `BANKWALLET`, `CREDIT`, `SOD`, or `UOD`. + /// 1. `PayeeMerchantID` + /// * **Min Length** - 1 characters + /// * **Max Length** - 255 characters + /// * **Description** - Payee's merchant ID, only if the payee is a + /// merchant. + /// 1. `PayeeMerchantName` + /// * **Min Length** - 1 characters + /// * **Max Length** - 99 characters + /// * **Description** - Payee's merchant name, only if the payee is a + /// merchant. + /// 1. `PayeeMCC` + /// * **Min Length** - 4 characters + /// * **Max Length** - 4 characters + /// * **Description** - Payee's Merchant Category Code (MCC), only if the + /// payee is a merchant. + /// 1. `Currency` + /// * **Min Length** - 3 characters + /// * **Max Length** - 3 characters + /// * **Description** - Currency of the amount involved in the transaction. + /// The currency codes are defined in ISO 4217. + /// 1. `Amount` + /// * **Description** - Amount involved in the transaction. + /// 1. `BankAdapterRequestIDs` + /// * **Min Length** - 0 characters + /// * **Max Length** - 2,000 characters + /// * **Description** - List of Request IDs (colon separated) used when + /// invoking the Bank Adapter APIs for fulfilling a transaction request. + /// 1. `ErrorCode` + /// * **Min Length** - 0 characters + /// * **Max Length** - 255 characters + /// * **Description** - Error code of a failed transaction. + /// 1. `ErrorMessage` + /// * **Min Length** - 0 characters + /// * **Max Length** - 10,000 characters + /// * **Description** - Error description for a failed transaction. + /// 1. `UPIErrorCode` + /// * **Min Length** - 0 characters + /// * **Max Length** - 3 characters + /// * **Description** - Error code as per the UPI specification. The issuer + /// switch maps the ErrorCode to an appropriate error code that complies + /// with the UPI specification. + pub async fn export_financial_transactions( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.paymentgateway.issuerswitch.v1.IssuerSwitchTransactions/ExportFinancialTransactions", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Export metadata transactions received within the specified time range as a + /// file into a configured target location. The returned `Operation` type has + /// the following method-specific fields: + /// + /// - `metadata`: [ExportMetadataTransactionsMetadata][google.cloud.paymentgateway.issuerswitch.v1.ExportMetadataTransactionsMetadata] + /// - `response`: [ExportMetadataTransactionsResponse][google.cloud.paymentgateway.issuerswitch.v1.ExportMetadataTransactionsResponse] + /// + /// The exported file will be in the standard CSV format where each row in the + /// file represents a transaction. The file has the following fields in order: + /// + /// 1. `TransactionID` + /// * **Min Length** - 35 characters + /// * **Max Length** - 35 characters + /// * **Description** - UPI transaction ID. + /// 1. `APIType` + /// * **Description** - The transaction's API type. The value will be of + /// the [ApiType][google.cloud.paymentgateway.issuerswitch.v1.ApiType] enum. + /// 1. `TransactionType` + /// * **Description** - Type of the transaction. The value will be of the + /// [TransactionType][google.cloud.paymentgateway.issuerswitch.v1.TransactionType] enum. + /// 1. `RequestReceivedTimestamp` + /// * **Min Length** - 20 characters + /// * **Max Length** - 20 characters + /// * **Description** - Timestamp (in UTC) indicating when the transaction + /// API request was received by the issuer switch. The format will be as + /// per RFC-3339. Example : 2022-11-22T23:00:05Z + /// 1. `CreationTime` + /// * **Min Length** - 20 characters + /// * **Max Length** - 20 characters + /// * **Description** - Timestamp (in UTC) indicating when the issuer + /// switch created the transaction resource for processing the transaction. + /// The format will be as per RFC-3339. Example : 2022-11-22T23:00:05Z + /// 1. `State` + /// * **Min Length** - 6 characters + /// * **Max Length** - 9 characters + /// * **Description** - State of the transaction. This will be one of + /// `FAILED`, `SUCCEEDED`, or `TIMED_OUT`. + /// 1. `OriginVPA` + /// * **Min Length** - 3 characters + /// * **Max Length** - 255 characters + /// * **Description** - Virtual Payment Address (VPA) of the originator of + /// the transaction. + /// 1. `BankAdapterRequestIDs` + /// * **Min Length** - 0 characters + /// * **Max Length** - 2,000 characters + /// * **Description** - List of Request IDs (colon separated) used when + /// invoking the Bank Adapter APIs for fulfilling a transaction request. + /// 1. `ErrorCode` + /// * **Min Length** - 0 characters + /// * **Max Length** - 255 characters + /// * **Description** - Error code of the failed transaction. + /// 1. `ErrorMessage` + /// * **Min Length** - 0 characters + /// * **Max Length** - 10,000 characters + /// * **Description** - Error description for the failed transaction. + /// 1. `UPIErrorCode` + /// * **Min Length** - 0 characters + /// * **Max Length** - 3 characters + /// * **Description** - Error code as per the UPI specification. The issuer + /// switch maps the ErrorCode to an appropriate error code that complies + /// with the UPI specification. + pub async fn export_metadata_transactions( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.paymentgateway.issuerswitch.v1.IssuerSwitchTransactions/ExportMetadataTransactions", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Export mandate transactions received within the specified time range as a + /// file into a configured target location. The returned `Operation` type has + /// the following method-specific fields: /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - RecurrenceRuleType::Unspecified => "RECURRENCE_RULE_TYPE_UNSPECIFIED", - RecurrenceRuleType::After => "AFTER", - RecurrenceRuleType::Before => "BEFORE", - RecurrenceRuleType::On => "ON", - } + /// - `metadata`: [ExportMandateTransactionsMetadata][google.cloud.paymentgateway.issuerswitch.v1.ExportMandateTransactionsMetadata] + /// - `response`: [ExportMandateTransactionsResponse][google.cloud.paymentgateway.issuerswitch.v1.ExportMandateTransactionsResponse] + /// + /// The exported file will be in the standard CSV format where each row in the + /// file represents a transaction. The file has the following fields in order: + /// + /// 1. `TransactionID` + /// * **Min Length** - 35 characters + /// * **Max Length** - 35 characters + /// * **Description** - UPI transaction ID. + /// 1. `UniqueMandateNumber` + /// * **Min Length** - 3 characters + /// * **Max Length** - 70 characters + /// * **Description** - UPI Unique Mandate Number. + /// 1. `TransactionType` + /// * **Min Length** - 23 characters + /// * **Max Length** - 23 characters + /// * **Description** - Type of the transaction. This will be one of + /// `TRANSACTION_TYPE_CREATE`, `TRANSACTION_TYPE_REVOKE` or + /// `TRANSACTION_TYPE_UPDATE`. + /// 1. `RequestReceivedTimestamp` + /// * **Min Length** - 20 characters + /// * **Max Length** - 20 characters + /// * **Description** - Timestamp (in UTC) indicating when the mandate + /// API request was received by the issuer switch. The format will be as + /// per RFC-3339. Example : 2022-11-22T23:00:05Z + /// 1. `CreationTime` + /// * **Min Length** - 20 characters + /// * **Max Length** - 20 characters + /// * **Description** - Timestamp (in UTC) indicating when the issuer + /// switch created the transaction resource for processing the transaction. + /// The format will be as per RFC-3339. Example : 2022-11-22T23:00:05Z + /// 1. `State` + /// * **Min Length** - 6 characters + /// * **Max Length** - 9 characters + /// * **Description** - State of the transaction. This will be one of + /// `FAILED`, `SUCCEEDED`, or `TIMED_OUT`. + /// 1. `PayerVPA` + /// * **Min Length** - 3 characters + /// * **Max Length** - 255 characters + /// * **Description** - Virtual Payment Address (VPA) of the payer. + /// 1. `PayerMobileNumber` + /// * **Min Length** - 12 characters + /// * **Max Length** - 12 characters + /// * **Description** - Mobile number of the payer. + /// 1. `PayeeVPA` + /// * **Min Length** - 3 characters + /// * **Max Length** - 255 characters + /// * **Description** - Virtual Payment Address (VPA) of the payee. + /// 1. `PayeeMobileNumber` + /// * **Min Length** - 12 characters + /// * **Max Length** - 12 characters + /// * **Description** - Mobile number of the payee. + /// 1. `PayeeMerchantID` + /// * **Min Length** - 1 characters + /// * **Max Length** - 30 characters + /// * **Description** - Payee's merchant ID, only if the payee is a + /// merchant + /// 1. `Amount` + /// * **Description** - Amount specified in the mandate. + /// 1. `RecurrencePattern` + /// * **Description** - Reccurence pattern of the mandate. The value will + /// be of the [MandateTransaction.RecurrencePatternType][google.cloud.paymentgateway.issuerswitch.v1.MandateTransaction.RecurrencePatternType] enum. + /// 1. `RecurrenceRuleType` + /// * **Description** - Reccurrence rule type of the mandate. The value + /// will be of the [MandateTransaction.RecurrenceRuleType][google.cloud.paymentgateway.issuerswitch.v1.MandateTransaction.RecurrenceRuleType] enum. + /// 1. `RecurrenceRuleValue` + /// * **Min Length** - 0 characters + /// * **Max Length** - 2 characters + /// * **Description** - Recurrence rule value of the mandate. This will be + /// an integer between 1 and 31. + /// 1. `Revokeable` + /// * **Min Length** - 4 characters + /// * **Max Length** - 5 characters + /// * **Description** - Boolean value specifying if the mandate is + /// revokable. + /// 1. `StartDate` + /// * **Min Length** - 10 characters + /// * **Max Length** - 10 characters + /// * **Description** - The start date of the mandate in `YYYY-MM-DD` + /// format. + /// 1. `EndDate` + /// * **Min Length** - 10 characters + /// * **Max Length** - 10 characters + /// * **Description** - The end date of the mandate in `YYYY-MM-DD` format. + /// 1. `AmountRuleType` + /// * **Description** - The amount rule of the mandate. The value will be + /// of the [MandateTransaction.AmountRuleType][google.cloud.paymentgateway.issuerswitch.v1.MandateTransaction.AmountRuleType] enum. + /// 1. `ApprovalReference` + /// * **Min Length** - 6 characters + /// * **Max Length** - 9 characters + /// * **Description** - The block funds reference generated by the bank, if + /// funds have been blocked for the mandate. This column will have a value + /// only when the RecurrencePattern is ONETIME. + /// 1. `BlockFunds` + /// * **Min Length** - 4 characters + /// * **Max Length** - 5 characters + /// * **Description** - Boolean value specifying if the mandate transaction + /// requested to block funds. + /// 1. `LastUpdateTime` + /// * **Min Length** - 20 characters + /// * **Max Length** - 20 characters + /// * **Description** - Timestamp (in UTC) indicating when was the last + /// modification made to the mandate. The format will be as per RFC-3339. + /// Example : 2022-11-22T23:00:05Z + /// 1. `BankAdapterRequestIDs` + /// * **Min Length** - 0 characters + /// * **Max Length** - 2,000 characters + /// * **Description** - List of Request IDs (colon separated) used when + /// invoking the Bank Adapter APIs for fulfilling a transaction request. + /// 1. `ErrorCode` + /// * **Min Length** - 0 characters + /// * **Max Length** - 255 characters + /// * **Description** - Error code of the failed transaction. + /// 1. `ErrorMessage` + /// * **Min Length** - 0 characters + /// * **Max Length** - 10,000 characters + /// * **Description** - Error description for the failed transaction. + /// 1. `UPIErrorCode` + /// * **Min Length** - 0 characters + /// * **Max Length** - 3 characters + /// * **Description** - Error code as per the UPI specification. The issuer + /// switch maps the ErrorCode to an appropriate error code that complies + /// with the UPI specification. + pub async fn export_mandate_transactions( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.paymentgateway.issuerswitch.v1.IssuerSwitchTransactions/ExportMandateTransactions", + ); + self.inner.unary(request.into_request(), path, codec).await } - } - /// AmountRuleType specifies the type of rule associated with the mandate - /// amount. - #[derive( - Clone, - Copy, - Debug, - PartialEq, - Eq, - Hash, - PartialOrd, - Ord, - ::prost::Enumeration - )] - #[repr(i32)] - pub enum AmountRuleType { - /// Unspecified amount rule. - Unspecified = 0, - /// Exact amount rule. Amount specified is the exact amount for which - /// mandate could be granted. - Exact = 1, - /// Max amount rule. Amount specified is the maximum amount for which - /// mandate could be granted. - Max = 2, - } - impl AmountRuleType { - /// String value of the enum field names used in the ProtoBuf definition. + /// Export complaint transactions received within the specified time range as a + /// file into a configured target location. The returned `Operation` type has + /// the following method-specific fields: /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - AmountRuleType::Unspecified => "AMOUNT_RULE_TYPE_UNSPECIFIED", - AmountRuleType::Exact => "EXACT", - AmountRuleType::Max => "MAX", - } + /// - `metadata`: [ExportComplaintTransactionsMetadata][google.cloud.paymentgateway.issuerswitch.v1.ExportComplaintTransactionsMetadata] + /// - `response`: [ExportComplaintTransactionsResponse][google.cloud.paymentgateway.issuerswitch.v1.ExportComplaintTransactionsResponse] + /// + /// The exported file will be in the standard CSV format where each row in the + /// file represents a transaction. The file has the following fields in order: + /// + /// 1. `TransactionID` + /// * **Min Length** - 35 characters + /// * **Max Length** - 35 characters + /// * **Description** - UPI transaction ID. + /// 1. `TransactionType` + /// * **Min Length** - 23 characters + /// * **Max Length** - 30 characters + /// * **Description** - Type of the transaction. This will be one of + /// `TRANSACTION_TYPE_CHECK_STATUS`, `TRANSACTION_TYPE_COMPLAINT`, + /// `TRANSACTION_TYPE_REVERSAL`, `TRANSACTION_TYPE_DISPUTE`, + /// `TRANSACTION_TYPE_REFUND`, or `TRANSACTION_TYPE_STATUS_UPDATE`. + /// 1. `CreationTime` + /// * **Min Length** - 20 characters + /// * **Max Length** - 20 characters + /// * **Description** - Timestamp (in UTC) indicating when the issuer + /// switch created the transaction resource for processing the transaction. + /// The format will be as per RFC-3339. Example : 2022-11-22T23:00:05Z + /// 1: `State` + /// * **Min Length** - 6 characters + /// * **Max Length** - 9 characters + /// * **Description** - State of the transaction. This will be one of + /// `FAILED`, `SUCCEEDED`, or `TIMED_OUT`. + /// 1. `OriginalRRN` + /// * **Min Length** - 12 characters + /// * **Max Length** - 12 characters + /// * **Description** - Retrieval reference number of the original payment + /// transaction. + /// 1. `BankType` + /// * **Min Length** - 8 characters + /// * **Max Length** - 11 characters + /// * **Description** - The subtype of the transaction based on the bank + /// involved. This will be one of `BENEFICIARY`, or `REMITTER`. + /// 1. `OriginalTransactionID` + /// * **Min Length** - 35 characters + /// * **Max Length** - 35 characters + /// * **Description** - Transaction ID of the original unresolved + /// transaction. + /// 1. `RaiseComplaintAdjFlag` + /// * **Min Length** - 0 characters + /// * **Max Length** - 255 characters + /// * **Description** - Indicates the type of action to raise the + /// complaint. + /// 1. `RaiseComplaintAdjCode` + /// * **Min Length** - 0 characters + /// * **Max Length** - 255 characters + /// * **Description** - Indicates the reason of action to raise the + /// complaint. + /// 1. `ResolveComplaintAdjFlag` + /// * **Min Length** - 0 characters + /// * **Max Length** - 255 characters + /// * **Description** - Indicates the type of action to resolve the + /// complaint. + /// 1. `ResolveComplaintAdjCode` + /// * **Min Length** - 0 characters + /// * **Max Length** - 255 characters + /// * **Description** - Indicates the reason of action to resolve the + /// complaint. + /// 1. `RaiseDisputeAdjFlag` + /// * **Min Length** - 0 characters + /// * **Max Length** - 255 characters + /// * **Description** - Indicates the type of action to raise the dispute. + /// 1. `RaiseDisputeAdjCode` + /// * **Min Length** - 0 characters + /// * **Max Length** - 255 characters + /// * **Description** - Indicates the reason of action to raise the + /// dispute. + /// 1. `ResolveDisputeAdjFlag` + /// * **Min Length** - 0 characters + /// * **Max Length** - 255 characters + /// * **Description** - Indicates the type of action to resolve the + /// dispute. + /// 1. `ResolveDisputeAdjCode` + /// * **Min Length** - 0 characters + /// * **Max Length** - 255 characters + /// * **Description** - Indicates the reason of action to resolve the + /// dispute. + /// 1. `Amount` + /// * **Description** - Amount to be resolved. + /// 1. `CurrentCycle` + /// * **Min Length** - 4 characters + /// * **Max Length** - 5 characters + /// * **Description** - Boolean value specifying if the complaint / dispute + /// belongs to current settlement cycle or not. + /// 1. `CRN` + /// * **Min Length** - 0 characters + /// * **Max Length** - 255 characters + /// * **Description** - Defines the Complaint Reference number. + /// 1. `AdjTime` + /// * **Min Length** - 0 characters + /// * **Max Length** - 255 characters + /// * **Description** - Indicates the time when the resolution was done. + /// 1. `RespAdjFlag` + /// * **Min Length** - 0 characters + /// * **Max Length** - 255 characters + /// * **Description** - Indicates the response category type. + /// 1. `RespAdjCode` + /// * **Min Length** - 0 characters + /// * **Max Length** - 255 characters + /// * **Description** - Indicates the response reason used. + /// 1. `AdjRemarks` + /// * **Min Length** - 0 characters + /// * **Max Length** - 255 characters + /// * **Description** - Indicates the additional remarks for the complaint + /// / dispute. + /// 1. `BankAdapterRequestIDs` + /// * **Min Length** - 0 characters + /// * **Max Length** - 2,000 characters + /// * **Description** - List of Request IDs (colon separated) used when + /// invoking the Bank Adapter APIs for fulfilling a transaction request. + /// 1. `ErrorCode` + /// * **Min Length** - 0 characters + /// * **Max Length** - 255 characters + /// * **Description** - Error code of the failed transaction. + /// 1. `ErrorMessage` + /// * **Min Length** - 0 characters + /// * **Max Length** - 10,000 characters + /// * **Description** - Error description for the failed transaction. + /// 1. `UPIErrorCode` + /// * **Min Length** - 0 characters + /// * **Max Length** - 3 characters + /// * **Description** - Error code as per the UPI specification. The issuer + /// switch service maps the ErrorCode to an appropriate error code that + /// complies with the UPI specification. + pub async fn export_complaint_transactions( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.paymentgateway.issuerswitch.v1.IssuerSwitchTransactions/ExportComplaintTransactions", + ); + self.inner.unary(request.into_request(), path, codec).await } } } -/// A complaint API transaction processed by the issuer switch. In -/// UPI, this maps to the Complaint API. +/// The payload for the log entry. #[derive(Clone, PartialEq, ::prost::Message)] -pub struct ComplaintTransaction { - /// The name of the complaint transaction. This uniquely identifies the - /// transaction. Format of name is - /// projects/{project_id}/complaintTransactions/{complaint_transaction_id}. +pub struct UpiTransaction { + /// A human readable message about the log entry. #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, - /// Information about the transaction. - #[prost(message, optional, tag = "2")] - pub info: ::core::option::Option, - /// Information about the complaint transaction. It can be one of Complaint or - /// Dispute. - #[prost(oneof = "complaint_transaction::Case", tags = "3, 4")] - pub case: ::core::option::Option, + pub description: ::prost::alloc::string::String, + /// The severity of the log entry. + #[prost( + enumeration = "super::super::super::super::logging::r#type::LogSeverity", + tag = "2" + )] + pub severity: i32, + /// The API type of the transaction. + #[prost(enumeration = "ApiType", tag = "3")] + pub api_type: i32, + /// The XML API type of the transaction. + #[prost(enumeration = "XmlApiType", tag = "4")] + pub xml_api_type: i32, + /// The type of the transaction. + #[prost(enumeration = "TransactionType", tag = "5")] + pub transaction_type: i32, + /// UPI's transaction ID. + #[prost(string, tag = "6")] + pub transaction_id: ::prost::alloc::string::String, + /// UPI's message ID. + #[prost(string, tag = "7")] + pub message_id: ::prost::alloc::string::String, + /// The payment's RRN. This will be present only for payment related + /// transactions. + #[prost(string, tag = "8")] + pub rrn: ::prost::alloc::string::String, + /// The timestamp at which the payload was received by the issuer switch. + #[prost(message, optional, tag = "9")] + pub payload_receipt_time: ::core::option::Option<::prost_types::Timestamp>, + /// The timestamp at which the payload was sent by the issuer switch. + #[prost(message, optional, tag = "10")] + pub payload_sent_time: ::core::option::Option<::prost_types::Timestamp>, + /// Status of the transaction which could be SUCCESS or FAILURE. This will be + /// populated only after transaction is complete. + #[prost(enumeration = "transaction_info::State", tag = "11")] + pub status: i32, + /// Issuer switch error code. This will be present only for failed + /// transactions. + #[prost(string, tag = "12")] + pub error_code: ::prost::alloc::string::String, + /// UPI error code that was sent back to NPCI. This will be present only for + /// failed transactions. + #[prost(string, tag = "13")] + pub upi_error_code: ::prost::alloc::string::String, + /// Issuer switch error message. This will be present only for failed + /// transactions. + #[prost(string, tag = "14")] + pub error_message: ::prost::alloc::string::String, + /// The ack, request or response payload. + #[prost(oneof = "upi_transaction::Payload", tags = "15, 16")] + pub payload: ::core::option::Option, } -/// Nested message and enum types in `ComplaintTransaction`. -pub mod complaint_transaction { - /// Information about the complaint transaction. It can be one of Complaint or - /// Dispute. +/// Nested message and enum types in `UpiTransaction`. +pub mod upi_transaction { + /// The ack, request or response payload. #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Case { - /// Output only. Information about the complaint transaction when it is of type complaint. - #[prost(message, tag = "3")] - Complaint(super::Complaint), - /// Output only. Information about the complaint transaction when it is of type dispute. - #[prost(message, tag = "4")] - Dispute(super::Dispute), + pub enum Payload { + /// The payload in XML format sent to the issuer switch. + #[prost(string, tag = "15")] + Sent(::prost::alloc::string::String), + /// The payload in XML format received by the issuer switch. + #[prost(string, tag = "16")] + Received(::prost::alloc::string::String), } } -/// Request for the `ListMetadataTransactions` method. Callers can request for -/// transactions to be filtered by the given filter criteria and specified -/// pagination parameters. +/// A rule that is executed by the issuer switch while processing an +/// API transaction. #[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListMetadataTransactionsRequest { - /// Required. The parent resource. The format is `projects/{project}`. +pub struct Rule { + /// The unique identifier for this resource. + /// Format: projects/{project}/rules/{rule} #[prost(string, tag = "1")] - pub parent: ::prost::alloc::string::String, - /// The maximum number of transactions to return. The service may return fewer - /// than this value. If unspecified or if the specified value is less than 1, - /// at most 50 transactions will be returned. The maximum value is 1000; values - /// above 1000 will be coerced to 1000. While paginating, you can specify a new - /// page size parameter for each page of transactions to be listed. - #[prost(int32, tag = "2")] - pub page_size: i32, - /// A page token, received from a previous `ListMetadataTransactions` call. - /// Specify this parameter to retrieve the next page of transactions. - /// - /// When paginating, you must specify only the `page_token` parameter. The - /// filter that was specified in the initial call to the - /// `ListMetadataTransactions` method that returned the page token will be - /// reused for all further calls where the page token parameter is specified. - #[prost(string, tag = "3")] - pub page_token: ::prost::alloc::string::String, - /// An expression that filters the list of metadata transactions. - /// - /// A filter expression consists of a field name, a comparison - /// operator, and a value for filtering. The value must be a string, a - /// number, or a boolean. The comparison operator must be one of: `<`, `>` or - /// `=`. Filters are not case sensitive. - /// - /// The following fields in the `MetadataTransaction` are eligible for - /// filtering: - /// - /// * `apiType` - The API type of the metadata transaction. Must be one of - /// \[ApiType][google.cloud.paymentgateway.issuerswitch.v1.ApiType\] values. Allowed comparison operators: `=`. - /// * `transactionType` - The transaction type of the metadata transaction. - /// Must be one of \[TransactionType][google.cloud.paymentgateway.issuerswitch.v1.TransactionType\] values. Allowed comparison - /// operators: `=`. - /// * `transactionID` - The UPI transaction ID of the metadata transaction. - /// Allowed comparison operators: `=`. - /// * `originVPA` - The VPA of the orignitator of a metadata transaction. - /// Allowed comparison operators: `=`. - /// * `createTime` - The time at which the transaction was created - /// (received) by the issuer switch. The value should be in - /// the format `YYYY-MM-DDTHH:MM:SSZ`. Allowed comparison operators: `>`, - /// `<`. - /// * `state` - The state of the transaction. Must be one of - /// \[TransactionInfo.State][google.cloud.paymentgateway.issuerswitch.v1.TransactionInfo.State\] values. Allowed comparison operators: `=`. - /// * `errorCode` - Use this filter to list financial transactions which - /// have failed a particular error code. Allowed comparison operators: - /// `=`. - /// * `bankAdapterRequestID` - Request ID used when invoking the Bank - /// Adapter API for fulfilling a transaction request. Allowed comparison - /// operators: `=`. - /// - /// You can combine multiple expressions by enclosing each expression in - /// parentheses. Expressions are combined with AND logic. No other logical - /// operators are supported. - /// - /// Here are a few examples: - /// - /// * `apiType = LIST_ACCOUNTS` - - The API type is _LIST_ACCOUNTS_. - /// * `state = SUCCEEDED` - The transaction's state is _SUCCEEDED_. - /// * `(apiType = LIST_ACCOUNTS) AND (create_time < - /// \"2021-08-15T14:50:00Z\")` - The API type is _LIST_ACCOUNTS_ and - /// the transaction was received before _2021-08-15 14:50:00 UTC_. - #[prost(string, tag = "4")] - pub filter: ::prost::alloc::string::String, + pub name: ::prost::alloc::string::String, + /// The description of the rule. + #[prost(string, tag = "2")] + pub rule_description: ::prost::alloc::string::String, + /// The API Type for which this rule gets executed. A value of + /// `API_TYPE_UNSPECIFIED` indicates that the rule is executed for all API + /// transactions. + #[prost(enumeration = "ApiType", tag = "3")] + pub api_type: i32, + /// The transaction type for which this rule gets executed. A value of + /// `TRANSACTION_TYPE_UNSPECIFIED` indicates that the rule is executed for + /// all transaction types. + #[prost(enumeration = "TransactionType", tag = "4")] + pub transaction_type: i32, +} +/// The metadata associated with a rule. This defines data that are used by the +/// rule during execution. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RuleMetadata { + /// The unique identifier for this resource. + /// Format: projects/{project}/rules/{rule}/metadata/{metadata} + #[prost(string, tag = "1")] + pub name: ::prost::alloc::string::String, + /// The description of the rule metadata. + #[prost(string, tag = "2")] + pub description: ::prost::alloc::string::String, + /// Type of rule metadata. + #[prost(enumeration = "rule_metadata::Type", tag = "3")] + pub r#type: i32, +} +/// Nested message and enum types in `RuleMetadata`. +pub mod rule_metadata { + /// The type of metadata. + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum Type { + /// Unspecified type. + Unspecified = 0, + /// List type. Indicates that the metadata contains a list of values which + /// the rule requires for execution. + List = 1, + } + impl Type { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Type::Unspecified => "TYPE_UNSPECIFIED", + Type::List => "LIST", + } + } + } } -/// Request for the `ListFinancialTransactions` method. Callers can request for -/// transactions to be filtered by the given filter criteria and specified -/// pagination parameters. +/// Represent a single value in a rule's metadata. #[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListFinancialTransactionsRequest { - /// Required. The parent resource. The format is `projects/{project}`. +pub struct RuleMetadataValue { + /// Output only. The unique identifier for this resource. + /// Format: projects/{project}/rules/{rule}/metadata/{metadata}/values/{value} #[prost(string, tag = "1")] - pub parent: ::prost::alloc::string::String, - /// The maximum number of transactions to return. The service may return fewer - /// than this value. If unspecified or if the specified value is less than 1, - /// at most 50 transactions will be returned. The maximum value is 1000; values - /// above 1000 will be coerced to 1000. While paginating, you can specify a new - /// page size parameter for each page of transactions to be listed. - #[prost(int32, tag = "2")] - pub page_size: i32, - /// A page token, received from a previous `ListFinancialTransactions` call. - /// Specify this parameter to retrieve the next page of transactions. - /// - /// When paginating, you must specify only the `page_token` parameter. The - /// filter that was specified in the initial call to the - /// `ListFinancialTransactions` method that returned the page token will be - /// reused for all further calls where the page token parameter is specified. - #[prost(string, tag = "3")] - pub page_token: ::prost::alloc::string::String, - /// An expression that filters the list of financial transactions. - /// - /// A filter expression consists of a field name, a comparison operator, and - /// a value for filtering. The value must be a string, a number, or a - /// boolean. The comparison operator must be one of: `<`, `>`, or `=`. - /// Filters are not case sensitive. - /// - /// The following fields in the `FinancialTransaction` are eligible for - /// filtering: - /// - /// * `transactionType` - The transaction type of the financial - /// transaction. Must be one of \[TransactionType][google.cloud.paymentgateway.issuerswitch.v1.TransactionType\] values. For financial - /// transactions, only valid transaction types are `TRANSACTION_TYPE_CREDIT`, - /// `TRANSACTION_TYPE_DEBIT` and `TRANSACTION_TYPE_REVERSAL`. Allowed - /// comparison operators: `=`. - /// * `transactionID` - The UPI transaction ID of the financial - /// transaction. Allowed comparison operators: `=`. - /// * `RRN` - The retrieval reference number of the transaction. Allowed - /// comparison operators: `=`. - /// * `payerVPA` - The VPA of the payer in a financial transaction. Allowed - /// comparison operators: `=`. - /// * `payeeVPA` - The VPA of the payee in a financial transaction. Allowed - /// comparison operators: `=`. - /// * `payerMobileNumber` - The mobile number of the payer in a financial - /// transaction. Allowed comparison operators: `=`. - /// * `payeeMobileNumber` - The mobile number of the payee in a financial - /// transaction. Allowed comparison operators: `=`. - /// * `payeeMerchantId` - The merchant id of the payee in a financial - /// transaction. Allowed comparison operators: `=`. - /// * `createTime` - The time at which the transaction was created - /// (received) by the issuer switch. The value should be in - /// the format `YYYY-MM-DDTHH:MM:SSZ`. Allowed comparison operators: `>`, - /// `<`. - /// * `state` - The state of the transaction. Must be one of - /// \[TransactionInfo.State][google.cloud.paymentgateway.issuerswitch.v1.TransactionInfo.State\] values. Allowed comparison operators: `=`. - /// * `errorCode` - Use this filter to list financial transactions which - /// have failed a particular error code. Allowed comparison operators: `=`. - /// * `bankAdapterRequestID` - Request ID used when invoking the Bank - /// Adapter API for fulfilling a transaction request. Allowed comparison - /// operators: `=`. - /// - /// You can combine multiple expressions by enclosing each expression in - /// parentheses. Expressions are combined with AND logic. No other logical - /// operators are supported. + pub name: ::prost::alloc::string::String, + /// The value of the resource which could be of type string or + /// AccountReference. The metadata values for rules + /// BlockedPayeeAccountReqPayDebitRule, BlockedPayerAccountReqPayDebitRule, + /// BlockedPayeeAccountReqPayCreditRule and BlockedPayerAccountReqPayCreditRule + /// should be of type AccountReference. For all other rules, metadata values + /// should be of type string. /// - /// Here are a few examples: + /// The length of the `value` field depends on the type of + /// the value being used for the rule metadata. The following are the minimum + /// and maximum lengths for the different types of values. /// - /// * `transactionType = CREDIT` - The transaction type is _CREDIT_. - /// * `state = SUCCEEDED` - The transaction's state is _SUCCEEDED_. - /// * `payerVpa = example@okbank` - The VPA of the payer is the string - /// _example@okbank_. - /// * `(transactionType = DEBIT) AND (createTime < "2021-08-15T14:50:00Z")` - /// - The transaction type is _DEBIT_ and the transaction was received - /// before _2021-08-15 14:50:00 UTC_. - /// * `createTime > "2021-08-15T14:50:00Z" AND createTime < - /// "2021-08-16T14:50:00Z"` - The transaction was received between - /// _2021-08-15 14:50:00 UTC_ and _2021-08-16 14:50:00 UTC_. - #[prost(string, tag = "4")] - pub filter: ::prost::alloc::string::String, + /// Value Type | Minimum Length | Maximum Length | + /// -------- | -------- | -------- | + /// Bank account IFSC | 11 | 11 | + /// Bank account number | 1 | 255 | + /// Device identifier | 1 | 255 | + /// Mobile number | 12 | 12 | + /// Virtual private address (VPA) | 3 | 255 | + #[prost(oneof = "rule_metadata_value::Value", tags = "2, 3")] + pub value: ::core::option::Option, } -/// Request for the `ListMandateTransactions` method. Callers can request for -/// transactions to be filtered by the given filter criteria and specified -/// pagination parameters. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListMandateTransactionsRequest { - /// Required. The parent resource. The format is `projects/{project}`. - #[prost(string, tag = "1")] - pub parent: ::prost::alloc::string::String, - /// The maximum number of transactions to return. The service may return fewer - /// than this value. If unspecified or if the specified value is less than 1, - /// at most 50 transactions will be returned. The maximum value is 1000; values - /// above 1000 will be coerced to 1000. While paginating, you can specify a new - /// page size parameter for each page of transactions to be listed. - #[prost(int32, tag = "2")] - pub page_size: i32, - /// A page token, received from a previous `ListMandateTransactions` call. - /// Specify this parameter to retrieve the next page of transactions. - /// - /// When paginating, you must specify only the `page_token` parameter. The - /// filter that was specified in the initial call to the - /// `ListMandateTransactions` method that returned the page token will be - /// reused for all further calls where the page token parameter is specified. - #[prost(string, tag = "3")] - pub page_token: ::prost::alloc::string::String, - /// An expression that filters the list of mandate transactions. - /// - /// A filter expression consists of a field name, a comparison operator, and - /// a value for filtering. The value must be a string, a number, or a - /// boolean. The comparison operator must be one of: `<`, `>`, or `=`. - /// Filters are not case sensitive. - /// - /// The following fields in the `Mandate` are eligible for - /// filtering: +/// Nested message and enum types in `RuleMetadataValue`. +pub mod rule_metadata_value { + /// The value of the resource which could be of type string or + /// AccountReference. The metadata values for rules + /// BlockedPayeeAccountReqPayDebitRule, BlockedPayerAccountReqPayDebitRule, + /// BlockedPayeeAccountReqPayCreditRule and BlockedPayerAccountReqPayCreditRule + /// should be of type AccountReference. For all other rules, metadata values + /// should be of type string. /// - /// * `uniqueMandateNumber` - UPI Unique Mandate Number (UMN). Allowed - /// comparison operators: `=`. - /// * `transactionID` - The transaction ID of the mandate transaction. - /// Allowed comparison operators: `=`. - /// * `transactionType` - The transaction type of the mandate - /// transaction. Must be one of \[TransactionType][google.cloud.paymentgateway.issuerswitch.v1.TransactionType\] values. For mandate - /// transactions, only valid transaction types are - /// `TRANSACTION_TYPE_CREATE`, `TRANSACTION_TYPE_REVOKE` and - /// `TRANSACTION_TYPE_UPDATE`. Allowed comparison operators: `=`. - /// * `payerVPA` - The VPA of the payer in a mandate transaction. Allowed - /// comparison operators: `=`. - /// * `payeeVPA` - The VPA of the payee in a mandate transaction. Allowed - /// comparison operators: `=`. - /// * `payeeMerchantID` - The merchant ID of the payee in a mandate - /// transaction. Allowed comparison operators: `=`. - /// * `payerMobileNumber` - The mobile number of the payer in a mandate - /// transaction. Allowed comparison operators: `=`. - /// * `payeeMobileNumber` - The mobile number of the payee in a mandate - /// transaction. Allowed comparison operators: `=`. - /// * `createTime` - The time at which the transaction was created - /// (received) by the issuer switch. The value should be in - /// the format `YYYY-MM-DDTHH:MM:SSZ`. Allowed comparison - /// operators: `>`, `<`. - /// * `state` - The state of the transaction. Must be one of - /// \[TransactionInfo.State][google.cloud.paymentgateway.issuerswitch.v1.TransactionInfo.State\] values. Allowed comparison operators: `=`. - /// * `recurrencePattern` - The recurrence pattern of the mandate. Must be - /// one of \[MandateTransaction.RecurrencePatternType][google.cloud.paymentgateway.issuerswitch.v1.MandateTransaction.RecurrencePatternType\] values. Allowed - /// comparison operators: `=`. - /// * `startDate` - The start date of the mandate. The value should be in - /// the format `YYYY-MM-DD`. Allowed comparison operators: `<` and `>`. - /// * `endDate` - The end date of the mandate. The value should be in - /// the format `YYYY-MM-DD`. Allowed comparison operators: `<` and `>`. - /// * `errorCode` - Use this filter to list mandate transactions which - /// have failed a particular error code. Allowed comparison - /// operators: `=`. - /// * `bankAdapterRequestID` - Request ID used when invoking the Bank - /// Adapter API for fulfilling a transaction request. Allowed comparison - /// operators: `=`. - /// You can combine multiple expressions by enclosing each expression in - /// parentheses. Expressions are combined with AND logic. No other logical - /// operators are supported. + /// The length of the `value` field depends on the type of + /// the value being used for the rule metadata. The following are the minimum + /// and maximum lengths for the different types of values. /// - /// Here are a few examples: - /// * `recurrencePattern = MONTHLY` - The recurrence pattern type is - /// monthly. - /// * `state = SUCCEEDED` - The transaction's state is _SUCCEEDED_. - /// * `payerVPA = example@okbank` - The VPA of the payer is the string - /// _example@okbank_. - /// * `(payerVPA = example@okbank) AND (createTime < - /// "2021-08-15T14:50:00Z")` - /// - The payer VPA example@okbank and the transaction was received - /// before _2021-08-15 14:50:00 UTC_. - /// * `createTime > "2021-08-15T14:50:00Z" AND createTime < - /// "2021-08-16T14:50:00Z"` - The transaction was received between - /// _2021-08-15 14:50:00 UTC_ and _2021-08-16 14:50:00 UTC_. - /// * `startDate > "2021-08-15" AND startDate < "2021-08-17"` - The start - /// date for mandate is between _2021-08-15_ and _2021-08-17_. - #[prost(string, tag = "4")] - pub filter: ::prost::alloc::string::String, -} -/// Request for the `ListComplaintTransactions` method. Callers can request for -/// transactions to be filtered by the given filter criteria and specified -/// pagination parameters. + /// Value Type | Minimum Length | Maximum Length | + /// -------- | -------- | -------- | + /// Bank account IFSC | 11 | 11 | + /// Bank account number | 1 | 255 | + /// Device identifier | 1 | 255 | + /// Mobile number | 12 | 12 | + /// Virtual private address (VPA) | 3 | 255 | + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Value { + /// The value for string metadata. + #[prost(string, tag = "2")] + Id(::prost::alloc::string::String), + /// The value for account reference metadata. + #[prost(message, tag = "3")] + AccountReference(super::AccountReference), + } +} +/// Request body for the `ListRules` method. #[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListComplaintTransactionsRequest { - /// Required. The parent resource. The format is `projects/{project}`. +pub struct ListRulesRequest { + /// Required. The parent resource must have the format of `projects/{project}`. #[prost(string, tag = "1")] pub parent: ::prost::alloc::string::String, - /// The maximum number of transactions to return. The service may return fewer - /// than this value. If unspecified or if the specified value is less than 1, - /// at most 50 transactions will be returned. The maximum value is 1000; values - /// above 1000 will be coerced to 1000. While paginating, you can specify a new - /// page size parameter for each page of transactions to be listed. + /// The maximum number of rules to return. The service may return fewer + /// than this value. If unspecified or if the specified value is less than 50, + /// at most 50 rules will be returned. The maximum value is 1000; values above + /// 1000 will be coerced to 1000. #[prost(int32, tag = "2")] pub page_size: i32, - /// A page token, received from a previous `ListComplaintTransactions` call. - /// Specify this parameter to retrieve the next page of transactions. - /// - /// When paginating, you must specify only the `page_token` parameter. The - /// filter that was specified in the initial call to the - /// `ListComplaintTransactions` method that returned the page token will be - /// reused for all further calls where the page token parameter is specified. + /// A page token, received from a previous `ListRulesRequest` call. + /// Specify this parameter to retrieve the next page of rules. #[prost(string, tag = "3")] pub page_token: ::prost::alloc::string::String, - /// An expression that filters the list of complaint transactions. - /// - /// A filter expression consists of a field name, a comparison operator, and - /// a value for filtering. The value must be a string, a number, or a - /// boolean. The comparison operator must be one of: `<`, `>`, or `=`. - /// Filters are not case sensitive. - /// - /// The following fields in the `Complaint` are eligible for - /// filtering: - /// - /// * `transactionID` - The transaction ID of the complaint transaction. - /// Allowed comparison operators: `=`. - /// * `transactionType` - The transaction type of the complaint - /// transaction. Must be one of \[TransactionType][google.cloud.paymentgateway.issuerswitch.v1.TransactionType\] values. For complaint - /// transactions, only valid transaction types are - /// `TRANSACTION_TYPE_CHECK_STATUS`, `TRANSACTION_TYPE_COMPLAINT`, - /// `TRANSACTION_TYPE_REVERSAL`, `TRANSACTION_TYPE_DISPUTE`, - /// `TRANSACTION_TYPE_REFUND` or `TRANSACTION_TYPE_STATUS_UPDATE`. Allowed - /// comparison operators: `=`. - /// * `originalRRN` - The retrieval reference number of the original - /// transaction for which complaint / dispute was raised / resolved. Allowed - /// comparison operators: `=`. - /// * `createTime` - The time at which the transaction was created - /// (received) by the issuer switch. The value should be in - /// the format `YYYY-MM-DDTHH:MM:SSZ`. Allowed comparison - /// operators: `>`, `<`. - /// * `state` - The state of the transaction. Must be one of - /// \[TransactionInfo.State][google.cloud.paymentgateway.issuerswitch.v1.TransactionInfo.State\] values. Allowed comparison operators: `=`. - /// * `errorCode` - Use this filter to list complaint transactions which - /// have failed a particular error code. Allowed comparison - /// operators: `=`. - /// You can combine multiple expressions by enclosing each expression in - /// parentheses. Expressions are combined with AND logic. No other logical - /// operators are supported. - /// - /// Here are a few examples: - /// - /// * `state = SUCCEEDED` - The transaction's state is _SUCCEEDED_. - /// * (createTime < "2021-08-15T14:50:00Z")` - /// - The transaction was received before _2021-08-15 14:50:00 UTC_. - /// * `createTime > "2021-08-15T14:50:00Z" AND createTime < - /// "2021-08-16T14:50:00Z"` - The transaction was received between - /// _2021-08-15 14:50:00 UTC_ and _2021-08-16 14:50:00 UTC_. - #[prost(string, tag = "4")] - pub filter: ::prost::alloc::string::String, -} -/// Response for the `ListMetadataTransactions` method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListMetadataTransactionsResponse { - /// List of non financial metadata transactions satisfying the filtered - /// request. - #[prost(message, repeated, tag = "1")] - pub metadata_transactions: ::prost::alloc::vec::Vec, - /// Pass this token in the ListMetadataTransactionsRequest to continue to list - /// results. If all results have been returned, this field is an empty string - /// or not present in the response. - #[prost(string, tag = "2")] - pub next_page_token: ::prost::alloc::string::String, } -/// Response for the `ListFinancialTransactions` method. +/// Response body for the `ListRules` method. #[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListFinancialTransactionsResponse { - /// List of financial transactions satisfying the filtered request. +pub struct ListRulesResponse { + /// List of rules satisfying the specified filter criteria. #[prost(message, repeated, tag = "1")] - pub financial_transactions: ::prost::alloc::vec::Vec, - /// Pass this token in the ListFinancialTransactionsRequest to continue to list + pub rules: ::prost::alloc::vec::Vec, + /// Pass this token in a subsequent `ListRulesRequest` call to continue to list /// results. If all results have been returned, this field is an empty string /// or not present in the response. #[prost(string, tag = "2")] pub next_page_token: ::prost::alloc::string::String, + /// Total number of rules matching request criteria across all pages. + #[prost(int64, tag = "3")] + pub total_size: i64, } -/// Response for the `ListMandateTransactionsResponse` method. +/// Request body for the `ListRuleMetadata` method. #[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListMandateTransactionsResponse { - /// List of mandate transactions satisfying the filtered request. - #[prost(message, repeated, tag = "1")] - pub mandate_transactions: ::prost::alloc::vec::Vec, - /// Pass this token in the ListMandateTransactionsRequest to continue to list - /// results. If all results have been returned, this field is an empty string - /// or not present in the response. - #[prost(string, tag = "2")] - pub next_page_token: ::prost::alloc::string::String, +pub struct ListRuleMetadataRequest { + /// Required. The parent resource. The format is `projects/{project}/rules/{rule}`. + #[prost(string, tag = "1")] + pub parent: ::prost::alloc::string::String, + /// The maximum number of rule metadata to return. The service may return fewer + /// than this value. If unspecified or if the specified value is less than 50, + /// at most 50 rule metadata will be returned. The maximum value is 1000; + /// values above 1000 will be coerced to 1000. + #[prost(int32, tag = "2")] + pub page_size: i32, + /// A page token, received from a previous `ListRuleMetadataRequest` call. + /// Specify this parameter to retrieve the next page of rule metadata. + #[prost(string, tag = "3")] + pub page_token: ::prost::alloc::string::String, } -/// Response for the `ListComplaintTransactionsResponse` method. +/// Response body for the `ListRuleMetadata` method. #[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListComplaintTransactionsResponse { - /// List of complaint transactions satisfying the filtered request. +pub struct ListRuleMetadataResponse { + /// List of rule metadata associated with the rule. #[prost(message, repeated, tag = "1")] - pub complaint_transactions: ::prost::alloc::vec::Vec, - /// Pass this token in the ListComplaintTransactionsRequest to continue to list - /// results. If all results have been returned, this field is an empty string - /// or not present in the response. + pub rule_metadata: ::prost::alloc::vec::Vec, + /// Pass this token in a subsequent `ListRuleMetadataRequest` call to continue + /// to list results. If all results have been returned, this field is an empty + /// string or not present in the response. #[prost(string, tag = "2")] pub next_page_token: ::prost::alloc::string::String, + /// Total number of rule metadata matching request criteria across all pages. + #[prost(int64, tag = "3")] + pub total_size: i64, } -/// Request for the `ExportFinancialTransactions` method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ExportFinancialTransactionsRequest { - /// Required. The parent resource for the transactions. The format is - /// `projects/{project}`. - #[prost(string, tag = "1")] - pub parent: ::prost::alloc::string::String, - /// Transaction type for the financial transaction API. The possible values for - /// transaction type are - /// - /// * TRANSACTION_TYPE_CREDIT - /// * TRANSACTION_TYPE_DEBIT - /// * TRANSACTION_TYPE_REVERSAL - /// - /// If no transaction type is specified, records of all the above transaction - /// types will be exported. - #[prost(enumeration = "TransactionType", tag = "2")] - pub transaction_type: i32, - /// The start time for the query. - #[prost(message, optional, tag = "3")] - pub start_time: ::core::option::Option<::prost_types::Timestamp>, - /// The end time for the query. - #[prost(message, optional, tag = "4")] - pub end_time: ::core::option::Option<::prost_types::Timestamp>, -} -/// Request for the `ExportMetadataTransactions` method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ExportMetadataTransactionsRequest { - /// Required. The parent resource for the transactions. The format is - /// `projects/{project}`. - #[prost(string, tag = "1")] - pub parent: ::prost::alloc::string::String, - /// API type of the metadata transaction API. The possible values for API type - /// are - /// - /// * BALANCE - /// * CHECK_STATUS - /// * HEART_BEAT - /// * INITIATE_REGISTRATION - /// * LIST_ACCOUNTS - /// * UPDATE_CREDENTIALS - /// * VALIDATE_REGISTRATION - /// - /// If no API type is specified, records of all the above API types will be - /// exported. - #[prost(enumeration = "ApiType", tag = "2")] - pub api_type: i32, - /// The start time for the query. - #[prost(message, optional, tag = "3")] - pub start_time: ::core::option::Option<::prost_types::Timestamp>, - /// The end time for the query. - #[prost(message, optional, tag = "4")] - pub end_time: ::core::option::Option<::prost_types::Timestamp>, -} -/// Request for the `ExportMandateTransactions` method. +/// Request body for the `ListRuleMetadataValues` method. #[derive(Clone, PartialEq, ::prost::Message)] -pub struct ExportMandateTransactionsRequest { - /// Required. The parent resource for the transactions. The format is - /// `projects/{project}`. +pub struct ListRuleMetadataValuesRequest { + /// Required. The parent resource. The format is + /// `projects/{project}/rules/{rule}/metadata/{metadata}`. #[prost(string, tag = "1")] pub parent: ::prost::alloc::string::String, - /// Transaction type for the mandate transaction API. The possible values for - /// transaction type are - /// - /// * TRANSACTION_TYPE_CREATE - /// * TRANSACTION_TYPE_REVOKE - /// * TRANSACTION_TYPE_UPDATE - /// - /// If no transaction type is specified, records of all the above transaction - /// types will be exported. - #[prost(enumeration = "TransactionType", tag = "2")] - pub transaction_type: i32, - /// The start time for the query. - #[prost(message, optional, tag = "3")] - pub start_time: ::core::option::Option<::prost_types::Timestamp>, - /// The end time for the query. - #[prost(message, optional, tag = "4")] - pub end_time: ::core::option::Option<::prost_types::Timestamp>, + /// The maximum number of metadata values to return. The service may return + /// fewer than this value. If unspecified or if the specified value is less + /// than 1, at most 50 rule metadata values will be returned. The maximum + /// value is 1000; values above 1000 will be coerced to 1000. + #[prost(int32, tag = "2")] + pub page_size: i32, + /// A page token received from a previous `ListRuleMetadataValuesRequest` + /// call. Specify this parameter to retrieve the next page of rule metadata + /// values. + #[prost(string, tag = "3")] + pub page_token: ::prost::alloc::string::String, } -/// Request for the `ExportComplaintTransactions` method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ExportComplaintTransactionsRequest { - /// Required. The parent resource for the transactions. The format is - /// `projects/{project}`. - #[prost(string, tag = "1")] - pub parent: ::prost::alloc::string::String, - /// Transaction type for the complaint transaction API. The possible values for - /// transaction type are - /// - /// * TRANSACTION_TYPE_CHECK_STATUS - /// * TRANSACTION_TYPE_COMPLAINT - /// * TRANSACTION_TYPE_DISPUTE - /// * TRANSACTION_TYPE_REFUND - /// * TRANSACTION_TYPE_REVERSAL - /// * TRANSACTION_TYPE_STATUS_UPDATE - /// - /// If no transaction type is specified, records of all the above transaction - /// types will be exported. - #[prost(enumeration = "TransactionType", tag = "2")] - pub transaction_type: i32, - /// The start time for the query. - #[prost(message, optional, tag = "3")] - pub start_time: ::core::option::Option<::prost_types::Timestamp>, - /// The end time for the query. - #[prost(message, optional, tag = "4")] - pub end_time: ::core::option::Option<::prost_types::Timestamp>, +/// Response body for ListRuleMetadataValues. Contains a List of values for a +/// given rule metadata resource. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListRuleMetadataValuesResponse { + /// List of values for a given rule metadata resource identifier. + #[prost(message, repeated, tag = "1")] + pub rule_metadata_values: ::prost::alloc::vec::Vec, + /// Pass this token in a subsequent `ListRuleMetadataValuesRequest` call to + /// continue to list results. If all results have been returned, this field is + /// an empty string or not present in the response. + #[prost(string, tag = "2")] + pub next_page_token: ::prost::alloc::string::String, } -/// Response for the `ExportFinancialTransactions` method. +/// Request body for the `BatchCreateRuleMetadataValues` method. #[derive(Clone, PartialEq, ::prost::Message)] -pub struct ExportFinancialTransactionsResponse { - /// URI of the exported file. +pub struct BatchCreateRuleMetadataValuesRequest { + /// The parent resource shared by all ruleMetadataValue being created. The + /// format is `projects/{project}/rules/{rule}/metadata/{metadata}`. The + /// \[CreateRuleMetadataValueRequest.parent][google.cloud.paymentgateway.issuerswitch.v1.CreateRuleMetadataValueRequest.parent\] field in the + /// \[CreateRuleMetadataValueRequest][google.cloud.paymentgateway.issuerswitch.v1.CreateRuleMetadataValueRequest\] messages contained in this request must + /// match this field. #[prost(string, tag = "1")] - pub target_uri: ::prost::alloc::string::String, + pub parent: ::prost::alloc::string::String, + /// Required. The request message specifying the resources to create. + /// A maximum of 1000 RuleMetadataValues can be created in a batch. + #[prost(message, repeated, tag = "2")] + pub requests: ::prost::alloc::vec::Vec, } -/// Response for the `ExportMetadataTransactions` method. +/// Response body for the `BatchCreateRuleMetadataValues` method. #[derive(Clone, PartialEq, ::prost::Message)] -pub struct ExportMetadataTransactionsResponse { - /// URI of the exported file. - #[prost(string, tag = "1")] - pub target_uri: ::prost::alloc::string::String, +pub struct BatchCreateRuleMetadataValuesResponse { + /// List of RuleMetadataValue created. + #[prost(message, repeated, tag = "1")] + pub rule_metadata_value: ::prost::alloc::vec::Vec, } -/// Response for the `ExportMandateTransactions` method. +/// Request for creating a single `RuleMetadataValue`. #[derive(Clone, PartialEq, ::prost::Message)] -pub struct ExportMandateTransactionsResponse { - /// URI of the exported file. +pub struct CreateRuleMetadataValueRequest { + /// Required. The parent resource where this RuleMetadataValue will be created. The + /// format is `projects/{project}/rules/{rule}/metadata/{metadata}`. #[prost(string, tag = "1")] - pub target_uri: ::prost::alloc::string::String, + pub parent: ::prost::alloc::string::String, + /// Required. The rule metadata value to create or add to a list. + #[prost(message, optional, tag = "2")] + pub rule_metadata_value: ::core::option::Option, } -/// Response for the `ExportComplaintTransactions` method. +/// Request body for the `BatchDeleteRuleMetadataValues` method. #[derive(Clone, PartialEq, ::prost::Message)] -pub struct ExportComplaintTransactionsResponse { - /// URI of the exported file. +pub struct BatchDeleteRuleMetadataValuesRequest { + /// The parent resource shared by all RuleMetadataValues being deleted. The + /// format is `projects/{project}/rules/{rule}/metadata/{metadata}`. If this is + /// set, the parent of all of the RuleMetadataValues specified in the + /// list of names must match this field. #[prost(string, tag = "1")] - pub target_uri: ::prost::alloc::string::String, + pub parent: ::prost::alloc::string::String, + /// Required. The names of the rule metadata values to delete. + /// A maximum of 1000 RuleMetadataValue can be deleted in a batch. + /// Format: projects/{project}/rules/{rule}/metadata/{metadata}/values/{value} + #[prost(string, repeated, tag = "2")] + pub names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } -/// Metadata for ExportFinancialTransactions. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ExportFinancialTransactionsMetadata {} -/// Metadata for ExportMandateTransactions. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ExportMandateTransactionsMetadata {} -/// Metadata for ExportMetadataTransactions. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ExportMetadataTransactionsMetadata {} -/// Metadata for ExportComplaintTransactions. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ExportComplaintTransactionsMetadata {} /// Generated client implementations. -pub mod issuer_switch_transactions_client { +pub mod issuer_switch_rules_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; use tonic::codegen::http::Uri; - /// Lists and exports transactions processed by the issuer switch. + /// Manages rules used by the issuer switch's rules engine. #[derive(Debug, Clone)] - pub struct IssuerSwitchTransactionsClient { + pub struct IssuerSwitchRulesClient { inner: tonic::client::Grpc, } - impl IssuerSwitchTransactionsClient { + impl IssuerSwitchRulesClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -3154,7 +3914,7 @@ pub mod issuer_switch_transactions_client { Ok(Self::new(conn)) } } - impl IssuerSwitchTransactionsClient + impl IssuerSwitchRulesClient where T: tonic::client::GrpcService, T::Error: Into, @@ -3172,7 +3932,7 @@ pub mod issuer_switch_transactions_client { pub fn with_interceptor( inner: T, interceptor: F, - ) -> IssuerSwitchTransactionsClient> + ) -> IssuerSwitchRulesClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -3186,9 +3946,7 @@ pub mod issuer_switch_transactions_client { http::Request, >>::Error: Into + Send + Sync, { - IssuerSwitchTransactionsClient::new( - InterceptedService::new(inner, interceptor), - ) + IssuerSwitchRulesClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -3205,83 +3963,12 @@ pub mod issuer_switch_transactions_client { self.inner = self.inner.accept_compressed(encoding); self } - /// List metadata transactions that satisfy the specified filter criteria. - pub async fn list_metadata_transactions( - &mut self, - request: impl tonic::IntoRequest, - ) -> Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/google.cloud.paymentgateway.issuerswitch.v1.IssuerSwitchTransactions/ListMetadataTransactions", - ); - self.inner.unary(request.into_request(), path, codec).await - } - /// List financial transactions that satisfy specified filter criteria. - pub async fn list_financial_transactions( - &mut self, - request: impl tonic::IntoRequest, - ) -> Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/google.cloud.paymentgateway.issuerswitch.v1.IssuerSwitchTransactions/ListFinancialTransactions", - ); - self.inner.unary(request.into_request(), path, codec).await - } - /// List mandate transactions that satisfy specified filter criteria. - pub async fn list_mandate_transactions( - &mut self, - request: impl tonic::IntoRequest, - ) -> Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/google.cloud.paymentgateway.issuerswitch.v1.IssuerSwitchTransactions/ListMandateTransactions", - ); - self.inner.unary(request.into_request(), path, codec).await - } - /// List complaint transactions that satisfy specified filter criteria. - pub async fn list_complaint_transactions( + /// List all rules that are applied on transactions by the issuer switch. Rules + /// can be filtered on API type and transaction type. + pub async fn list_rules( &mut self, - request: impl tonic::IntoRequest, - ) -> Result< - tonic::Response, - tonic::Status, - > { + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { self.inner .ready() .await @@ -3293,65 +3980,15 @@ pub mod issuer_switch_transactions_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/google.cloud.paymentgateway.issuerswitch.v1.IssuerSwitchTransactions/ListComplaintTransactions", + "/google.cloud.paymentgateway.issuerswitch.v1.IssuerSwitchRules/ListRules", ); self.inner.unary(request.into_request(), path, codec).await } - /// Export financial transactions received within the specified time range as a - /// file into a configured target location. The returned `Operation` type has - /// the following method-specific fields: - /// - /// - `metadata`: [ExportFinancialTransactionsMetadata][google.cloud.paymentgateway.issuerswitch.v1.ExportFinancialTransactionsMetadata] - /// - `response`: [ExportFinancialTransactionsResponse][google.cloud.paymentgateway.issuerswitch.v1.ExportFinancialTransactionsResponse] - /// - /// The exported file will be in the standard CSV format where each row in the - /// file represents a transaction. The file has the following fields in order: - /// - /// - `TransactionID` - UPI transaction ID. - /// - `TransactionType` - Type of the transaction. This will be one of - /// `TRANSACTION_TYPE_CREDIT`, `TRANSACTION_TYPE_DEBIT` or - /// `TRANSACTION_TYPE_REVERSAL`. - /// - `TransactionSubType` - Subtype of the transaction. This will be one - /// of `COLLECT`, `DEBIT` or `PAY`. - /// - `RequestReceivedTimestamp` - Timestamp (in UTC) indicating when the - /// transaction API request was received by the issuer switch. - /// - `CreationTime` - Timestamp (in UTC) indicating when the - /// issuer switch created the transaction resource for processing the - /// transaction. - /// - `State` - State of the transaction. This will be one of `FAILED` or - /// `SUCCEEDED`. - /// - `RRN` - Retrieval reference number associated with the transaction. - /// - `PayerVPA` - Virtual Payment Address (VPA) of the payer. - /// - `PayerMobileNumber` - Mobile number of the payer. - /// - `PayerIFSCCode` - IFSC code of the payer's bank account. - /// - `PayerAccountNumber` - Payer's bank account number. - /// - `PayerAccountType` - Payer's bank account type. - /// - `PayeeVPA` - Virtual Payment Address (VPA) of the payee. - /// - `PayeeMobileNumber` - Payee's mobile number. - /// - `PayeeIFSCCode` - IFSC code of the payee's bank account. - /// - `PayeeAccountNumber` - Payee's bank account number. - /// - `PayeeAccountType` - Payee's bank account type. - /// - `PayeeMerchantID` - Payee's merchant ID, only if the payee is a merchant. - /// - `PayeeMerchantName` - Payee's merchant name, only if the payee is a - /// merchant. - /// - `PayeeMCC` - Payee's Merchant Category Code (MCC), only if the payee is a - /// merchant. - /// - `Currency` - Currency of the amount involved in the transaction. - /// - `Amount` - Amount involved in the transaction. - /// - `BankAdapterRequestIDs` - List of Request IDs (colon separated) used when - /// invoking the Bank Adapter APIs for fulfilling a transaction request. - /// - `ErrorCode` - Error code of the failed transaction. - /// - `ErrorMessage` - Error description for the failed transaction. - /// - `UPIErrorCode` - Error code as per the UPI specification. The issuer - /// switch maps the ErrorCode to an appropriate error code that complies with - /// the UPI specification. - pub async fn export_financial_transactions( + /// List all rule metadata for a given rule identifier. + pub async fn list_rule_metadata( &mut self, - request: impl tonic::IntoRequest, - ) -> Result< - tonic::Response, - tonic::Status, - > { + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { self.inner .ready() .await @@ -3363,46 +4000,16 @@ pub mod issuer_switch_transactions_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/google.cloud.paymentgateway.issuerswitch.v1.IssuerSwitchTransactions/ExportFinancialTransactions", + "/google.cloud.paymentgateway.issuerswitch.v1.IssuerSwitchRules/ListRuleMetadata", ); self.inner.unary(request.into_request(), path, codec).await } - /// Export metadata transactions received within the specified time range as a - /// file into a configured target location. The returned `Operation` type has - /// the following method-specific fields: - /// - /// - `metadata`: [ExportMetadataTransactionsMetadata][google.cloud.paymentgateway.issuerswitch.v1.ExportMetadataTransactionsMetadata] - /// - `response`: [ExportMetadataTransactionsResponse][google.cloud.paymentgateway.issuerswitch.v1.ExportMetadataTransactionsResponse] - /// - /// The exported file will be in the standard CSV format where each row in the - /// file represents a transaction. The file has the following fields in order: - /// - /// - `TransactionID` - UPI transaction ID. - /// - `APIType` - The transaction's API type. The value will be of the - /// [ApiType][google.cloud.paymentgateway.issuerswitch.v1.ApiType] enum. - /// - `TransactionType` - Type of the transaction. The value will be of the - /// [TransactionType][google.cloud.paymentgateway.issuerswitch.v1.TransactionType] enum. - /// - `RequestReceivedTimestamp` - Timestamp (in UTC) indicating when the - /// transaction's API request was received by the issuer switch. - /// - `CreationTime` - Timestamp (in UTC) indicating when the - /// issuer switch created the transaction resource for processing the - /// transaction. - /// - `State` - State of transaction. This will be one of `FAILED` or - /// `SUCCEEDED`. - /// - `OriginVPA` - Virtual Payment Address (VPA) of the originator of the - /// transaction. - /// - `BankAdapterRequestIDs` - List of Request IDs (colon separated) used when - /// invoking the Bank Adapter APIs for fulfilling a transaction request. - /// - `ErrorCode` - Error code of the failed transaction. - /// - `ErrorMessage` - Error description for the failed transaction. - /// - `UPIErrorCode` - Error code as per the UPI specification. The issuer - /// switch maps the ErrorCode to an appropriate error code that complies with - /// the UPI specification. - pub async fn export_metadata_transactions( + /// List all metadata values for a rule metadata identifier. + pub async fn list_rule_metadata_values( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -3416,67 +4023,17 @@ pub mod issuer_switch_transactions_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/google.cloud.paymentgateway.issuerswitch.v1.IssuerSwitchTransactions/ExportMetadataTransactions", + "/google.cloud.paymentgateway.issuerswitch.v1.IssuerSwitchRules/ListRuleMetadataValues", ); self.inner.unary(request.into_request(), path, codec).await } - /// Export mandate transactions received within the specified time range as a - /// file into a configured target location. The returned `Operation` type has - /// the following method-specific fields: - /// - /// - `metadata`: [ExportMandateTransactionsMetadata][google.cloud.paymentgateway.issuerswitch.v1.ExportMandateTransactionsMetadata] - /// - `response`: [ExportMandateTransactionsResponse][google.cloud.paymentgateway.issuerswitch.v1.ExportMandateTransactionsResponse] - /// - /// The exported file will be in the standard CSV format where each row in the - /// file represents a transaction. The file has the following fields in order: - /// - /// - `TransactionID` - UPI transaction ID. - /// - `UniqueMandateNumber` - UPI Unique Mandate Number. - /// - `TransactionType` - Type of the transaction. This will be one of - /// `TRANSACTION_TYPE_CREATE`, `TRANSACTION_TYPE_REVOKE` or - /// `TRANSACTION_TYPE_UPDATE`. - /// - `RequestReceivedTimestamp` - Timestamp (in UTC) indicating when the - /// mandate API request was received by the issuer switch. - /// - `CreationTime` - Timestamp (in UTC) indicating when the - /// issuer switch created the transaction resource for processing the - /// transaction. - /// - `State` - State of the transaction. This will be one of - /// `FAILED` or `SUCCEEDED`. - /// - `PayerVPA` - Virtual Payment Address (VPA) of the payer. - /// - `PayerMobileNumber` - Mobile number of the payer. - /// - `PayeeVPA` - Virtual Payment Address (VPA) of the payee. - /// - `PayeeMobileNumber` - Mobile number of the payee. - /// - `PayeeMerchantID` - Payee's merchant ID. - /// - `Amount` - Amount specified in the mandate. - /// - `RecurrencePattern` - Reccurence pattern of the mandate. The value will - /// be of the [MandateTransaction.RecurrencePattern][] enum. - /// - `RecurrenceRuleType` - Reccurrence rule type of the mandate. The value - /// will be of the [MandateTransaction.RecurrenceRuleType][google.cloud.paymentgateway.issuerswitch.v1.MandateTransaction.RecurrenceRuleType] enum. - /// - `RecurrenceRuleValue` - Recurrence rule value of the mandate. - /// - `Revokeable` - Boolean value specifying if the mandate is revokable. - /// - `StartDate` - The start date of the mandate in `YYYY-MM-DD` format. - /// - `EndDate` - The end date of the mandate in `YYYY-MM-DD` format. - /// - `AmountRuleType` - The amount rule of the mandate. The value will - /// be of the [MandateTransaction.AmountRuleType][google.cloud.paymentgateway.issuerswitch.v1.MandateTransaction.AmountRuleType] enum. - /// - `ApprovalReference` - The block funds reference generated by the bank, - /// if funds have been blocked for the mandate. This column have a value only - /// when the RecurrencePattern is ONETIME. - /// - `BlockFunds` - Boolean value specifying if the mandate transaction - /// requested to block funds. - /// - `LastUpdateTime` - Timestamp (in UTC) indicating when was the last - /// modification made to the mandate. - /// - `BankAdapterRequestIDs` - List of Request IDs (colon separated) used when - /// invoking the Bank Adapter APIs for fulfilling a transaction request. - /// - `ErrorCode` - Error code of the failed transaction. - /// - `ErrorMessage` - Error description for the failed transaction. - /// - `UPIErrorCode` - Error code as per the UPI specification. The issuer - /// switch maps the ErrorCode to an appropriate error code that complies with - /// the UPI specification. - pub async fn export_mandate_transactions( + /// Create (add) multiple values to the list of values under the specified rule + /// metadata resource. + pub async fn batch_create_rule_metadata_values( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -3490,72 +4047,16 @@ pub mod issuer_switch_transactions_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/google.cloud.paymentgateway.issuerswitch.v1.IssuerSwitchTransactions/ExportMandateTransactions", + "/google.cloud.paymentgateway.issuerswitch.v1.IssuerSwitchRules/BatchCreateRuleMetadataValues", ); self.inner.unary(request.into_request(), path, codec).await } - /// Export complaint transactions received within the specified time range as a - /// file into a configured target location. The returned `Operation` type has - /// the following method-specific fields: - /// - /// - `metadata`: [ExportComplaintTransactionsMetadata][google.cloud.paymentgateway.issuerswitch.v1.ExportComplaintTransactionsMetadata] - /// - `response`: [ExportComplaintTransactionsResponse][google.cloud.paymentgateway.issuerswitch.v1.ExportComplaintTransactionsResponse] - /// - /// The exported file will be in the standard CSV format where each row in the - /// file represents a transaction. The file has the following fields in order: - /// - /// - `TransactionID` - UPI transaction ID. - /// - `TransactionType` - Type of the transaction. This will be one of - /// `TRANSACTION_TYPE_CHECK_STATUS`, `TRANSACTION_TYPE_COMPLAINT`, - /// `TRANSACTION_TYPE_REVERSAL`, `TRANSACTION_TYPE_DISPUTE`, - /// `TRANSACTION_TYPE_REFUND` or `TRANSACTION_TYPE_STATUS_UPDATE`. - /// - `CreationTime` - Timestamp (in UTC) indicating when the issuer switch - /// created the transaction resource for processing the transaction. - /// - `State` - State of the transaction. This will be one of - /// `FAILED` or `SUCCEEDED`. - /// - `OriginalRRN` - RRN of the original payment transaction. - /// - `BankType` - The subtype of the transaction based on the bank involved. - /// - `OriginalTransactionID` - Transaction ID of the original unresolved - /// transaction. - /// - `RaiseComplaintAdjFlag` - Indicates the type of action to raise the - /// complaint. - /// - `RaiseComplaintAdjCode` - Indicates the reason of action to raise the - /// complaint. - /// - `ResolveComplaintAdjFlag` - Indicates the type of action to resolve the - /// complaint. - /// - `ResolveComplaintAdjCode` - Indicates the reason of action to resolve the - /// complaint. - /// - `RaiseDisputeAdjFlag` - Indicates the type of action to raise the - /// dispute. - /// - `RaiseDisputeAdjCode` - Indicates the reason of action to raise the - /// dispute. - /// - `ResolveDisputeAdjFlag` - Indicates the type of action to resolve the - /// dispute. - /// - `ResolveDisputeAdjCode` - Indicates the reason of action to resolve the - /// dispute. - /// - `Amount` - Amount to be resolved. - /// - `CurrentCycle` - Boolean value specifying if the complaint / dispute - /// belongs to current settlement cycle or not. - /// - `CRN` - Defines the Complaint Reference number. - /// - `AdjTime` - Indicates the time when the resolution was done. - /// - `RespAdjFlag` - Indicates the response category type. - /// - `RespAdjCode` - Indicates the response reason used. - /// - `AdjRemarks` - Indicates the additional remarks for the complaint / - /// dispute. - /// - `BankAdapterRequestIDs` - List of Request IDs (colon separated) used when - /// invoking the Bank Adapter APIs for fulfilling a transaction request. - /// - `ErrorCode` - Error code of the failed transaction. - /// - `ErrorMessage` - Error description for the failed transaction. - /// - `UPIErrorCode` - Error code as per the UPI specification. The issuer - /// switch service maps the ErrorCode to an appropriate error code that - /// complies with the UPI specification. - pub async fn export_complaint_transactions( + /// Delete (remove) multiple values from the list of values under the specified + /// rules metadata resource. + pub async fn batch_delete_rule_metadata_values( &mut self, - request: impl tonic::IntoRequest, - ) -> Result< - tonic::Response, - tonic::Status, - > { + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { self.inner .ready() .await @@ -3567,7 +4068,7 @@ pub mod issuer_switch_transactions_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/google.cloud.paymentgateway.issuerswitch.v1.IssuerSwitchTransactions/ExportComplaintTransactions", + "/google.cloud.paymentgateway.issuerswitch.v1.IssuerSwitchRules/BatchDeleteRuleMetadataValues", ); self.inner.unary(request.into_request(), path, codec).await } diff --git a/gcloud-sdk/genproto/google.cloud.pubsublite.v1.rs b/gcloud-sdk/genproto/google.cloud.pubsublite.v1.rs index b7aa428b2..c2aa44bab 100644 --- a/gcloud-sdk/genproto/google.cloud.pubsublite.v1.rs +++ b/gcloud-sdk/genproto/google.cloud.pubsublite.v1.rs @@ -240,10 +240,18 @@ pub mod subscription { /// destination. User subscriber clients must not connect to this subscription. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ExportConfig { - /// The desired state of this export. + /// The desired state of this export. Setting this to values other than + /// `ACTIVE` and `PAUSED` will result in an error. #[prost(enumeration = "export_config::State", tag = "1")] pub desired_state: i32, - /// Output only. The export statuses of each partition. This field is output only. + /// Output only. The current state of the export, which may be different to the desired + /// state due to errors. + #[prost(enumeration = "export_config::State", tag = "6")] + pub current_state: i32, + /// Output only. Deprecated: replaced by `current_state`. + /// + /// The export statuses of each partition. + #[deprecated] #[prost(message, repeated, tag = "4")] pub statuses: ::prost::alloc::vec::Vec, /// Optional. The name of an optional Pub/Sub Lite topic to publish messages that can not @@ -289,7 +297,7 @@ pub mod export_config { #[prost(string, tag = "1")] pub topic: ::prost::alloc::string::String, } - /// An export state. + /// The desired export state. #[derive( Clone, Copy, @@ -309,6 +317,10 @@ pub mod export_config { Active = 1, /// Exporting messages is suspended. Paused = 2, + /// Messages cannot be exported due to permission denied errors. Output only. + PermissionDenied = 3, + /// Messages cannot be exported due to missing resources. Output only. + NotFound = 4, } impl State { /// String value of the enum field names used in the ProtoBuf definition. @@ -320,6 +332,8 @@ pub mod export_config { State::Unspecified => "STATE_UNSPECIFIED", State::Active => "ACTIVE", State::Paused => "PAUSED", + State::PermissionDenied => "PERMISSION_DENIED", + State::NotFound => "NOT_FOUND", } } } diff --git a/gcloud-sdk/genproto/google.cloud.securitycenter.v1.rs b/gcloud-sdk/genproto/google.cloud.securitycenter.v1.rs index 728d78807..244bb26d3 100644 --- a/gcloud-sdk/genproto/google.cloud.securitycenter.v1.rs +++ b/gcloud-sdk/genproto/google.cloud.securitycenter.v1.rs @@ -1060,6 +1060,8 @@ pub mod mitre_attack { AccessTokenManipulation = 33, /// T1548 AbuseElevationControlMechanism = 34, + /// T1078.001 + DefaultAccounts = 35, } impl Technique { /// String value of the enum field names used in the ProtoBuf definition. @@ -1113,6 +1115,7 @@ pub mod mitre_attack { Technique::AbuseElevationControlMechanism => { "ABUSE_ELEVATION_CONTROL_MECHANISM" } + Technique::DefaultAccounts => "DEFAULT_ACCOUNTS", } } } @@ -1679,6 +1682,9 @@ pub struct Finding { /// Database associated with the finding. #[prost(message, optional, tag = "44")] pub database: ::core::option::Option, + /// File associated with the finding. + #[prost(message, repeated, tag = "46")] + pub files: ::prost::alloc::vec::Vec, } /// Nested message and enum types in `Finding`. pub mod finding { @@ -3315,7 +3321,7 @@ pub struct SetFindingStateRequest { /// Required. The relative resource name of the finding. See: /// /// Example: - /// "organizations/{organization_id}/sources/{source_id}/finding/{finding_id}". + /// "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}". #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, /// Required. The desired State of the finding. @@ -3331,9 +3337,9 @@ pub struct SetMuteRequest { /// Required. The relative resource name of the finding. See: /// /// Example: - /// "organizations/{organization_id}/sources/{source_id}/finding/{finding_id}", - /// "folders/{folder_id}/sources/{source_id}/finding/{finding_id}", - /// "projects/{project_id}/sources/{source_id}/finding/{finding_id}". + /// "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", + /// "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", + /// "projects/{project_id}/sources/{source_id}/findings/{finding_id}". #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, /// Required. The desired state of the Mute. @@ -3477,7 +3483,7 @@ pub struct UpdateBigQueryExportRequest { #[prost(message, optional, tag = "2")] pub update_mask: ::core::option::Option<::prost_types::FieldMask>, } -/// Request message for listing BigQuery exports at a given scope e.g. +/// Request message for listing BigQuery exports at a given scope e.g. /// organization, folder or project. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListBigQueryExportsRequest { diff --git a/gcloud-sdk/genproto/google.cloud.shell.v1.rs b/gcloud-sdk/genproto/google.cloud.shell.v1.rs index 63c06a7e7..c77770abe 100644 --- a/gcloud-sdk/genproto/google.cloud.shell.v1.rs +++ b/gcloud-sdk/genproto/google.cloud.shell.v1.rs @@ -316,6 +316,9 @@ pub mod cloud_shell_error_details { /// The user has exhausted their weekly Cloud Shell quota, and Cloud Shell /// will be disabled until the quota resets. QuotaExceeded = 5, + /// The Cloud Shell environment is unavailable and cannot be connected to at + /// the moment. + EnvironmentUnavailable = 6, } impl CloudShellErrorCode { /// String value of the enum field names used in the ProtoBuf definition. @@ -329,6 +332,7 @@ pub mod cloud_shell_error_details { CloudShellErrorCode::CloudShellDisabled => "CLOUD_SHELL_DISABLED", CloudShellErrorCode::TosViolation => "TOS_VIOLATION", CloudShellErrorCode::QuotaExceeded => "QUOTA_EXCEEDED", + CloudShellErrorCode::EnvironmentUnavailable => "ENVIRONMENT_UNAVAILABLE", } } } diff --git a/gcloud-sdk/genproto/google.cloud.storageinsights.v1.rs b/gcloud-sdk/genproto/google.cloud.storageinsights.v1.rs index 246b28240..9e2e59687 100644 --- a/gcloud-sdk/genproto/google.cloud.storageinsights.v1.rs +++ b/gcloud-sdk/genproto/google.cloud.storageinsights.v1.rs @@ -47,10 +47,10 @@ pub struct CreateReportConfigRequest { /// Required. The resource being created #[prost(message, optional, tag = "3")] pub report_config: ::core::option::Option, - /// Optional. An optional request ID to identify requests. Specify a unique request ID - /// so that if you must retry your request, the server will know to ignore - /// the request if it has already been completed. The server will guarantee - /// that for at least 60 minutes since the first request. + /// Optional. An optional request ID to identify requests. Specify a unique + /// request ID so that if you must retry your request, the server will know to + /// ignore the request if it has already been completed. The server will + /// guarantee that for at least 60 minutes since the first request. /// /// For example, consider a situation where you make an initial request and t /// he request times out. If you make the request again with the same request @@ -76,10 +76,10 @@ pub struct UpdateReportConfigRequest { /// Required. The resource being updated #[prost(message, optional, tag = "2")] pub report_config: ::core::option::Option, - /// Optional. An optional request ID to identify requests. Specify a unique request ID - /// so that if you must retry your request, the server will know to ignore - /// the request if it has already been completed. The server will guarantee - /// that for at least 60 minutes since the first request. + /// Optional. An optional request ID to identify requests. Specify a unique + /// request ID so that if you must retry your request, the server will know to + /// ignore the request if it has already been completed. The server will + /// guarantee that for at least 60 minutes since the first request. /// /// For example, consider a situation where you make an initial request and t /// he request times out. If you make the request again with the same request @@ -101,10 +101,10 @@ pub struct DeleteReportConfigRequest { /// Optional. If set, all ReportDetails for this ReportConfig will be deleted. #[prost(bool, tag = "2")] pub force: bool, - /// Optional. An optional request ID to identify requests. Specify a unique request ID - /// so that if you must retry your request, the server will know to ignore - /// the request if it has already been completed. The server will guarantee - /// that for at least 60 minutes after the first request. + /// Optional. An optional request ID to identify requests. Specify a unique + /// request ID so that if you must retry your request, the server will know to + /// ignore the request if it has already been completed. The server will + /// guarantee that for at least 60 minutes after the first request. /// /// For example, consider a situation where you make an initial request and t /// he request times out. If you make the request again with the same request @@ -221,30 +221,29 @@ pub struct OperationMetadata { pub status_message: ::prost::alloc::string::String, /// Output only. Identifies whether the user has requested cancellation /// of the operation. Operations that have been cancelled successfully - /// have \[Operation.error][\] value with a \[google.rpc.Status.code][google.rpc.Status.code\] of 1, - /// corresponding to `Code.CANCELLED`. + /// have \[Operation.error][\] value with a + /// \[google.rpc.Status.code][google.rpc.Status.code\] of 1, corresponding to + /// `Code.CANCELLED`. #[prost(bool, tag = "6")] pub requested_cancellation: bool, /// Output only. API version used to start the operation. #[prost(string, tag = "7")] pub api_version: ::prost::alloc::string::String, } -/// ************************************************************************* -/// * * -/// * ReportConfig Resource * -/// * * -/// ************************************************************************* +/// ReportConfig Resource: +/// /// Options to setup frequency of report generation. #[derive(Clone, PartialEq, ::prost::Message)] pub struct FrequencyOptions { /// Frequency of report generation. #[prost(enumeration = "frequency_options::Frequency", tag = "1")] pub frequency: i32, - /// The date from which report generation should start. // UTC Timezone. + /// The date from which report generation should start. + /// UTC time zone. #[prost(message, optional, tag = "2")] pub start_date: ::core::option::Option, - /// The date on which report generation should stop (Inclusive). // UTC - /// Timezone. + /// The date on which report generation should stop (Inclusive). + /// UTC time zone. #[prost(message, optional, tag = "3")] pub end_date: ::core::option::Option, } diff --git a/gcloud-sdk/genproto/google.cloud.video.transcoder.v1.rs b/gcloud-sdk/genproto/google.cloud.video.transcoder.v1.rs index 63b4dcb67..2b6d88821 100644 --- a/gcloud-sdk/genproto/google.cloud.video.transcoder.v1.rs +++ b/gcloud-sdk/genproto/google.cloud.video.transcoder.v1.rs @@ -378,12 +378,22 @@ pub struct SpriteSheet { /// source aspect ratio, set the \[SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels\] field or /// the \[SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels\] field, but not both (the API will /// automatically calculate the missing field). + /// + /// For portrait videos that contain horizontal ASR and rotation metadata, + /// provide the width, in pixels, per the horizontal ASR. The API calculates + /// the height per the horizontal ASR. The API detects any rotation metadata + /// and swaps the requested height and width for the output. #[prost(int32, tag = "3")] pub sprite_width_pixels: i32, /// Required. The height of sprite in pixels. Must be an even integer. To preserve the /// source aspect ratio, set the \[SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels\] field or /// the \[SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels\] field, but not both (the API will /// automatically calculate the missing field). + /// + /// For portrait videos that contain horizontal ASR and rotation metadata, + /// provide the height, in pixels, per the horizontal ASR. The API calculates + /// the width per the horizontal ASR. The API detects any rotation metadata + /// and swaps the requested height and width for the output. #[prost(int32, tag = "4")] pub sprite_height_pixels: i32, /// The maximum number of sprites per row in a sprite sheet. The default is 0, @@ -594,6 +604,9 @@ pub struct PreprocessingConfig { /// Specify the video pad filter configuration. #[prost(message, optional, tag = "6")] pub pad: ::core::option::Option, + /// Specify the video deinterlace configuration. + #[prost(message, optional, tag = "7")] + pub deinterlace: ::core::option::Option, } /// Nested message and enum types in `PreprocessingConfig`. pub mod preprocessing_config { @@ -711,6 +724,82 @@ pub mod preprocessing_config { #[prost(int32, tag = "4")] pub right_pixels: i32, } + /// Deinterlace configuration for input video. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Deinterlace { + /// Specify the video deinterlacing filter. The default is `yadif`. + #[prost(oneof = "deinterlace::DeinterlacingFilter", tags = "1, 2")] + pub deinterlacing_filter: ::core::option::Option< + deinterlace::DeinterlacingFilter, + >, + } + /// Nested message and enum types in `Deinterlace`. + pub mod deinterlace { + /// Yet Another Deinterlacing Filter Configuration. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct YadifConfig { + /// Specifies the deinterlacing mode to adopt. + /// The default is `send_frame`. + /// Supported values: + /// + /// - `send_frame`: Output one frame for each frame + /// - `send_field`: Output one frame for each field + #[prost(string, tag = "1")] + pub mode: ::prost::alloc::string::String, + /// Disable spacial interlacing. + /// The default is `false`. + #[prost(bool, tag = "2")] + pub disable_spatial_interlacing: bool, + /// The picture field parity assumed for the input interlaced video. + /// The default is `auto`. + /// Supported values: + /// + /// - `tff`: Assume the top field is first + /// - `bff`: Assume the bottom field is first + /// - `auto`: Enable automatic detection of field parity + #[prost(string, tag = "3")] + pub parity: ::prost::alloc::string::String, + /// Deinterlace all frames rather than just the frames identified as + /// interlaced. The default is `false`. + #[prost(bool, tag = "4")] + pub deinterlace_all_frames: bool, + } + /// Bob Weaver Deinterlacing Filter Configuration. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct BwdifConfig { + /// Specifies the deinterlacing mode to adopt. + /// The default is `send_frame`. + /// Supported values: + /// + /// - `send_frame`: Output one frame for each frame + /// - `send_field`: Output one frame for each field + #[prost(string, tag = "1")] + pub mode: ::prost::alloc::string::String, + /// The picture field parity assumed for the input interlaced video. + /// The default is `auto`. + /// Supported values: + /// + /// - `tff`: Assume the top field is first + /// - `bff`: Assume the bottom field is first + /// - `auto`: Enable automatic detection of field parity + #[prost(string, tag = "2")] + pub parity: ::prost::alloc::string::String, + /// Deinterlace all frames rather than just the frames identified as + /// interlaced. The default is `false`. + #[prost(bool, tag = "3")] + pub deinterlace_all_frames: bool, + } + /// Specify the video deinterlacing filter. The default is `yadif`. + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum DeinterlacingFilter { + /// Specifies the Yet Another Deinterlacing Filter Configuration. + #[prost(message, tag = "1")] + Yadif(YadifConfig), + /// Specifies the Bob Weaver Deinterlacing Filter Configuration. + #[prost(message, tag = "2")] + Bwdif(BwdifConfig), + } + } } /// Video stream resource. #[derive(Clone, PartialEq, ::prost::Message)] @@ -727,11 +816,21 @@ pub mod video_stream { /// The width of the video in pixels. Must be an even integer. /// When not specified, the width is adjusted to match the specified height /// and input aspect ratio. If both are omitted, the input width is used. + /// + /// For portrait videos that contain horizontal ASR and rotation metadata, + /// provide the width, in pixels, per the horizontal ASR. The API calculates + /// the height per the horizontal ASR. The API detects any rotation metadata + /// and swaps the requested height and width for the output. #[prost(int32, tag = "1")] pub width_pixels: i32, /// The height of the video in pixels. Must be an even integer. /// When not specified, the height is adjusted to match the specified width /// and input aspect ratio. If both are omitted, the input height is used. + /// + /// For portrait videos that contain horizontal ASR and rotation metadata, + /// provide the height, in pixels, per the horizontal ASR. The API calculates + /// the width per the horizontal ASR. The API detects any rotation metadata + /// and swaps the requested height and width for the output. #[prost(int32, tag = "2")] pub height_pixels: i32, /// Required. The target video frame rate in frames per second (FPS). Must be less than @@ -870,11 +969,21 @@ pub mod video_stream { /// The width of the video in pixels. Must be an even integer. /// When not specified, the width is adjusted to match the specified height /// and input aspect ratio. If both are omitted, the input width is used. + /// + /// For portrait videos that contain horizontal ASR and rotation metadata, + /// provide the width, in pixels, per the horizontal ASR. The API calculates + /// the height per the horizontal ASR. The API detects any rotation metadata + /// and swaps the requested height and width for the output. #[prost(int32, tag = "1")] pub width_pixels: i32, /// The height of the video in pixels. Must be an even integer. /// When not specified, the height is adjusted to match the specified width /// and input aspect ratio. If both are omitted, the input height is used. + /// + /// For portrait videos that contain horizontal ASR and rotation metadata, + /// provide the height, in pixels, per the horizontal ASR. The API calculates + /// the width per the horizontal ASR. The API detects any rotation metadata + /// and swaps the requested height and width for the output. #[prost(int32, tag = "2")] pub height_pixels: i32, /// Required. The target video frame rate in frames per second (FPS). Must be less than @@ -1020,11 +1129,21 @@ pub mod video_stream { /// The width of the video in pixels. Must be an even integer. /// When not specified, the width is adjusted to match the specified height /// and input aspect ratio. If both are omitted, the input width is used. + /// + /// For portrait videos that contain horizontal ASR and rotation metadata, + /// provide the width, in pixels, per the horizontal ASR. The API calculates + /// the height per the horizontal ASR. The API detects any rotation metadata + /// and swaps the requested height and width for the output. #[prost(int32, tag = "1")] pub width_pixels: i32, /// The height of the video in pixels. Must be an even integer. /// When not specified, the height is adjusted to match the specified width /// and input aspect ratio. If both are omitted, the input height is used. + /// + /// For portrait videos that contain horizontal ASR and rotation metadata, + /// provide the height, in pixels, per the horizontal ASR. The API calculates + /// the width per the horizontal ASR. The API detects any rotation metadata + /// and swaps the requested height and width for the output. #[prost(int32, tag = "2")] pub height_pixels: i32, /// Required. The target video frame rate in frames per second (FPS). Must be less than diff --git a/gcloud-sdk/genproto/google.container.v1.rs b/gcloud-sdk/genproto/google.container.v1.rs index 61884b4e0..2963d9a00 100644 --- a/gcloud-sdk/genproto/google.container.v1.rs +++ b/gcloud-sdk/genproto/google.container.v1.rs @@ -2948,6 +2948,9 @@ pub struct NodePool { /// Upgrade settings control disruption and speed of the upgrade. #[prost(message, optional, tag = "107")] pub upgrade_settings: ::core::option::Option, + /// Specifies the node placement policy. + #[prost(message, optional, tag = "108")] + pub placement_policy: ::core::option::Option, /// Output only. [Output only] Update info contains relevant information during a node /// pool update. #[prost(message, optional, tag = "109")] @@ -3110,6 +3113,49 @@ pub mod node_pool { } } } + /// PlacementPolicy defines the placement policy used by the node pool. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct PlacementPolicy { + /// The type of placement. + #[prost(enumeration = "placement_policy::Type", tag = "1")] + pub r#type: i32, + } + /// Nested message and enum types in `PlacementPolicy`. + pub mod placement_policy { + /// Type defines the type of placement policy. + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum Type { + /// TYPE_UNSPECIFIED specifies no requirements on nodes + /// placement. + Unspecified = 0, + /// COMPACT specifies node placement in the same availability domain to + /// ensure low communication latency. + Compact = 1, + } + impl Type { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Type::Unspecified => "TYPE_UNSPECIFIED", + Type::Compact => "COMPACT", + } + } + } + } /// The current status of the node pool instance. #[derive( Clone,