Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated Protos Update #146

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 97 additions & 8 deletions src/gen/google.api.expr.v1alpha1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,16 @@ pub struct ParsedExpr {
/// operators with the exception of the '.' operator are modelled as function
/// calls. This makes it easy to represent new operators into the existing AST.
///
/// All references within expressions must resolve to a \[Decl][google.api.expr.v1alpha1.Decl\] provided at
/// type-check for an expression to be valid. A reference may either be a bare
/// identifier `name` or a qualified identifier `google.api.name`. References
/// may either refer to a value or a function declaration.
/// All references within expressions must resolve to a
/// \[Decl][google.api.expr.v1alpha1.Decl\] provided at type-check for an
/// expression to be valid. A reference may either be a bare identifier `name` or
/// a qualified identifier `google.api.name`. References may either refer to a
/// value or a function declaration.
///
/// For example, the expression `google.api.name.startsWith('expr')` references
/// the declaration `google.api.name` within a \[Expr.Select][google.api.expr.v1alpha1.Expr.Select\] expression, and
/// the function declaration `startsWith`.
/// the declaration `google.api.name` within a
/// \[Expr.Select][google.api.expr.v1alpha1.Expr.Select\] expression, and the
/// function declaration `startsWith`.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Expr {
Expand All @@ -48,7 +50,8 @@ pub mod expr {
/// Required. Holds a single, unqualified identifier, possibly preceded by a
/// '.'.
///
/// Qualified names are represented by the \[Expr.Select][google.api.expr.v1alpha1.Expr.Select\] expression.
/// Qualified names are represented by the
/// \[Expr.Select][google.api.expr.v1alpha1.Expr.Select\] expression.
#[prost(string, tag="1")]
pub name: ::prost::alloc::string::String,
}
Expand Down Expand Up @@ -260,7 +263,8 @@ pub mod expr {
/// primitives.
///
/// Lists and structs are not included as constants as these aggregate types may
/// contain \[Expr][google.api.expr.v1alpha1.Expr\] elements which require evaluation and are thus not constant.
/// contain \[Expr][google.api.expr.v1alpha1.Expr\] elements which require
/// evaluation and are thus not constant.
///
/// Examples of literals include: `"hello"`, `b'bytes'`, `1u`, `4.2`, `-2`,
/// `true`, `null`.
Expand Down Expand Up @@ -346,6 +350,91 @@ pub struct SourceInfo {
/// value is the call `Expr` that was replaced.
#[prost(map="int64, message", tag="5")]
pub macro_calls: ::std::collections::HashMap<i64, Expr>,
/// A list of tags for extensions that were used while parsing or type checking
/// the source expression. For example, optimizations that require special
/// runtime support may be specified.
///
/// These are used to check feature support between components in separate
/// implementations. This can be used to either skip redundant work or
/// report an error if the extension is unsupported.
#[prost(message, repeated, tag="6")]
pub extensions: ::prost::alloc::vec::Vec<source_info::Extension>,
}
/// Nested message and enum types in `SourceInfo`.
pub mod source_info {
/// An extension that was requested for the source expression.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Extension {
/// Identifier for the extension. Example: constant_folding
#[prost(string, tag="1")]
pub id: ::prost::alloc::string::String,
/// If set, the listed components must understand the extension for the
/// expression to evaluate correctly.
///
/// This field has set semantics, repeated values should be deduplicated.
#[prost(enumeration="extension::Component", repeated, tag="2")]
pub affected_components: ::prost::alloc::vec::Vec<i32>,
/// Version info. May be skipped if it isn't meaningful for the extension.
/// (for example constant_folding might always be v0.0).
#[prost(message, optional, tag="3")]
pub version: ::core::option::Option<extension::Version>,
}
/// Nested message and enum types in `Extension`.
pub mod extension {
/// Version
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Version {
/// Major version changes indicate different required support level from
/// the required components.
#[prost(int64, tag="1")]
pub major: i64,
/// Minor version changes must not change the observed behavior from
/// existing implementations, but may be provided informationally.
#[prost(int64, tag="2")]
pub minor: i64,
}
/// CEL component specifier.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Component {
/// Unspecified, default.
Unspecified = 0,
/// Parser. Converts a CEL string to an AST.
Parser = 1,
/// Type checker. Checks that references in an AST are defined and types
/// agree.
TypeChecker = 2,
/// Runtime. Evaluates a parsed and optionally checked CEL AST against a
/// context.
Runtime = 3,
}
impl Component {
/// 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 {
Component::Unspecified => "COMPONENT_UNSPECIFIED",
Component::Parser => "COMPONENT_PARSER",
Component::TypeChecker => "COMPONENT_TYPE_CHECKER",
Component::Runtime => "COMPONENT_RUNTIME",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"COMPONENT_UNSPECIFIED" => Some(Self::Unspecified),
"COMPONENT_PARSER" => Some(Self::Parser),
"COMPONENT_TYPE_CHECKER" => Some(Self::TypeChecker),
"COMPONENT_RUNTIME" => Some(Self::Runtime),
_ => None,
}
}
}
}
}
/// A specific position in source.
#[allow(clippy::derive_partial_eq_without_eq)]
Expand Down
100 changes: 100 additions & 0 deletions src/gen/google.api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,10 @@ pub struct Publishing {
/// <https://cloud.google.com/pubsub/lite/docs/reference/rpc>
#[prost(string, tag="110")]
pub proto_reference_documentation_uri: ::prost::alloc::string::String,
/// Optional link to REST reference documentation. Example:
/// <https://cloud.google.com/pubsub/lite/docs/reference/rest>
#[prost(string, tag="111")]
pub rest_reference_documentation_uri: ::prost::alloc::string::String,
}
/// Settings for Java client libraries.
#[allow(clippy::derive_partial_eq_without_eq)]
Expand Down Expand Up @@ -696,6 +700,19 @@ pub struct MethodSettings {
/// seconds: 54000 # 90 minutes
#[prost(message, optional, tag="2")]
pub long_running: ::core::option::Option<method_settings::LongRunning>,
/// List of top-level fields of the request message, that should be
/// automatically populated by the client libraries based on their
/// (google.api.field_info).format. Currently supported format: UUID4.
///
/// Example of a YAML configuration:
///
/// publishing:
/// method_settings:
/// - selector: google.example.v1.ExampleService.CreateExample
/// auto_populated_fields:
/// - request_id
#[prost(string, repeated, tag="3")]
pub auto_populated_fields: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Nested message and enum types in `MethodSettings`.
pub mod method_settings {
Expand Down Expand Up @@ -857,6 +874,19 @@ pub enum FieldBehavior {
/// a non-empty value will be returned. The user will not be aware of what
/// non-empty value to expect.
NonEmptyDefault = 7,
/// Denotes that the field in a resource (a message annotated with
/// google.api.resource) is used in the resource name to uniquely identify the
/// resource. For AIP-compliant APIs, this should only be applied to the
/// `name` field on the resource.
///
/// This behavior should not be applied to references to other resources within
/// the message.
///
/// The identifier field of resources often have different field behavior
/// depending on the request it is embedded in (e.g. for Create methods name
/// is optional and unused, while for Update methods it is required). Instead
/// of method-specific annotations, only `IDENTIFIER` is required.
Identifier = 8,
}
impl FieldBehavior {
/// String value of the enum field names used in the ProtoBuf definition.
Expand All @@ -873,6 +903,7 @@ impl FieldBehavior {
FieldBehavior::Immutable => "IMMUTABLE",
FieldBehavior::UnorderedList => "UNORDERED_LIST",
FieldBehavior::NonEmptyDefault => "NON_EMPTY_DEFAULT",
FieldBehavior::Identifier => "IDENTIFIER",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
Expand All @@ -886,10 +917,79 @@ impl FieldBehavior {
"IMMUTABLE" => Some(Self::Immutable),
"UNORDERED_LIST" => Some(Self::UnorderedList),
"NON_EMPTY_DEFAULT" => Some(Self::NonEmptyDefault),
"IDENTIFIER" => Some(Self::Identifier),
_ => None,
}
}
}
/// Rich semantic information of an API field beyond basic typing.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FieldInfo {
/// The standard format of a field value. This does not explicitly configure
/// any API consumer, just documents the API's format for the field it is
/// applied to.
#[prost(enumeration="field_info::Format", tag="1")]
pub format: i32,
}
/// Nested message and enum types in `FieldInfo`.
pub mod field_info {
/// The standard format of a field value. The supported formats are all backed
/// by either an RFC defined by the IETF or a Google-defined AIP.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Format {
/// Default, unspecified value.
Unspecified = 0,
/// Universally Unique Identifier, version 4, value as defined by
/// <https://datatracker.ietf.org/doc/html/rfc4122.> The value may be
/// normalized to entirely lowercase letters. For example, the value
/// `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to
/// `f47ac10b-58cc-0372-8567-0e02b2c3d479`.
Uuid4 = 1,
/// Internet Protocol v4 value as defined by [RFC
/// 791](<https://datatracker.ietf.org/doc/html/rfc791>). The value may be
/// condensed, with leading zeros in each octet stripped. For example,
/// `001.022.233.040` would be condensed to `1.22.233.40`.
Ipv4 = 2,
/// Internet Protocol v6 value as defined by [RFC
/// 2460](<https://datatracker.ietf.org/doc/html/rfc2460>). The value may be
/// normalized to entirely lowercase letters with zeros compressed, following
/// [RFC 5952](<https://datatracker.ietf.org/doc/html/rfc5952>). For example,
/// the value `2001:0DB8:0::0` would be normalized to `2001:db8::`.
Ipv6 = 3,
/// An IP address in either v4 or v6 format as described by the individual
/// values defined herein. See the comments on the IPV4 and IPV6 types for
/// allowed normalizations of each.
Ipv4OrIpv6 = 4,
}
impl Format {
/// 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 {
Format::Unspecified => "FORMAT_UNSPECIFIED",
Format::Uuid4 => "UUID4",
Format::Ipv4 => "IPV4",
Format::Ipv6 => "IPV6",
Format::Ipv4OrIpv6 => "IPV4_OR_IPV6",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"FORMAT_UNSPECIFIED" => Some(Self::Unspecified),
"UUID4" => Some(Self::Uuid4),
"IPV4" => Some(Self::Ipv4),
"IPV6" => Some(Self::Ipv6),
"IPV4_OR_IPV6" => Some(Self::Ipv4OrIpv6),
_ => None,
}
}
}
}
/// Message that represents an arbitrary HTTP body. It should only be used for
/// payload formats that can't be represented as JSON, such as raw binary or
/// an HTML page.
Expand Down
38 changes: 38 additions & 0 deletions src/gen/proto.stream.v1.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// @generated
/// ListStreamsRequest requests all streams registered.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListStreamsRequest {
}
/// A ListStreamsResponse details streams registered.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListStreamsResponse {
#[prost(string, repeated, tag="1")]
pub names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// A AddStreamRequest requests the given stream be added to the connection.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddStreamRequest {
#[prost(string, tag="1")]
pub name: ::prost::alloc::string::String,
}
/// AddStreamResponse is returned after a successful AddStreamRequest.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddStreamResponse {
}
/// A RemoveStreamRequest requests the given stream be removed from the connection.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RemoveStreamRequest {
#[prost(string, tag="1")]
pub name: ::prost::alloc::string::String,
}
/// RemoveStreamResponse is returned after a successful RemoveStreamRequest.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RemoveStreamResponse {
}
// @@protoc_insertion_point(module)
Loading