Skip to content

Commit

Permalink
Added autogenerated rust files
Browse files Browse the repository at this point in the history
Signed-off-by: SzymonZebrowski <[email protected]>
  • Loading branch information
SzymonZebrowski committed Dec 26, 2024
1 parent a8371a9 commit 99c8f6d
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rust/numaflow-models/src/models/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions rust/numaflow-models/src/models/sasl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Box<crate::models::SasloAuth>>,
#[serde(rename = "plain", skip_serializing_if = "Option::is_none")]
pub plain: Option<Box<crate::models::SaslPlain>>,
#[serde(rename = "scramsha256", skip_serializing_if = "Option::is_none")]
Expand All @@ -36,6 +38,7 @@ impl Sasl {
Sasl {
gssapi: None,
mechanism,
oauth: None,
plain: None,
scramsha256: None,
scramsha512: None,
Expand Down
42 changes: 42 additions & 0 deletions rust/numaflow-models/src/models/saslo_auth.rs
Original file line number Diff line number Diff line change
@@ -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,
}
}
}

0 comments on commit 99c8f6d

Please sign in to comment.