From 99c8f6dfd2db5949a91849ce123bf7efa5d2c52b Mon Sep 17 00:00:00 2001 From: SzymonZebrowski <25105608+SzymonZebrowski@users.noreply.github.com> Date: Wed, 11 Dec 2024 16:56:32 +0100 Subject: [PATCH] Added autogenerated rust files Signed-off-by: SzymonZebrowski <25105608+SzymonZebrowski@users.noreply.github.com> --- rust/numaflow-models/src/models/mod.rs | 2 + rust/numaflow-models/src/models/sasl.rs | 3 ++ rust/numaflow-models/src/models/saslo_auth.rs | 42 +++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 rust/numaflow-models/src/models/saslo_auth.rs diff --git a/rust/numaflow-models/src/models/mod.rs b/rust/numaflow-models/src/models/mod.rs index 7d890089a8..3783d1fc58 100644 --- a/rust/numaflow-models/src/models/mod.rs +++ b/rust/numaflow-models/src/models/mod.rs @@ -142,6 +142,8 @@ pub mod sasl; pub use self::sasl::Sasl; pub mod sasl_plain; pub use self::sasl_plain::SaslPlain; +pub mod saslo_auth; +pub use self::saslo_auth::SasloAuth; pub mod scale; pub use self::scale::Scale; pub mod serving_source; diff --git a/rust/numaflow-models/src/models/sasl.rs b/rust/numaflow-models/src/models/sasl.rs index a2941f2e93..adc2c80e22 100644 --- a/rust/numaflow-models/src/models/sasl.rs +++ b/rust/numaflow-models/src/models/sasl.rs @@ -23,6 +23,8 @@ pub struct Sasl { /// SASL mechanism to use #[serde(rename = "mechanism")] pub mechanism: String, + #[serde(rename = "oauth", skip_serializing_if = "Option::is_none")] + pub oauth: Option>, #[serde(rename = "plain", skip_serializing_if = "Option::is_none")] pub plain: Option>, #[serde(rename = "scramsha256", skip_serializing_if = "Option::is_none")] @@ -36,6 +38,7 @@ impl Sasl { Sasl { gssapi: None, mechanism, + oauth: None, plain: None, scramsha256: None, scramsha512: None, diff --git a/rust/numaflow-models/src/models/saslo_auth.rs b/rust/numaflow-models/src/models/saslo_auth.rs new file mode 100644 index 0000000000..506002f654 --- /dev/null +++ b/rust/numaflow-models/src/models/saslo_auth.rs @@ -0,0 +1,42 @@ +/* +Copyright 2022 The Numaproj Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by Openapi Generator. DO NOT EDIT. + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SasloAuth { + #[serde(rename = "clientID")] + pub client_id: k8s_openapi::api::core::v1::SecretKeySelector, + #[serde(rename = "clientSecret")] + pub client_secret: k8s_openapi::api::core::v1::SecretKeySelector, + /// TokenEndpoint refers to the token endpoint + #[serde(rename = "tokenEndpoint")] + pub token_endpoint: String, +} + +impl SasloAuth { + pub fn new( + client_id: k8s_openapi::api::core::v1::SecretKeySelector, + client_secret: k8s_openapi::api::core::v1::SecretKeySelector, + token_endpoint: String, + ) -> SasloAuth { + SasloAuth { + client_id, + client_secret, + token_endpoint, + } + } +}