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

update OpenAPI client #580

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
30 changes: 30 additions & 0 deletions crates/cloudtruth-restapi/src/apis/projects_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2452,6 +2452,7 @@ pub fn projects_parameters_values_create(
parameter_pk: &str,
project_pk: &str,
value_create: crate::models::ValueCreate,
environment: Option<&str>,
evaluate: Option<bool>,
) -> Result<crate::models::Value, Error<ProjectsParametersValuesCreateError>> {
let local_var_configuration = configuration;
Expand All @@ -2467,6 +2468,10 @@ pub fn projects_parameters_values_create(
let mut local_var_req_builder =
local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());

if let Some(ref local_var_str) = environment {
local_var_req_builder =
local_var_req_builder.query(&[("environment", &local_var_str.to_string())]);
}
if let Some(ref local_var_str) = evaluate {
local_var_req_builder =
local_var_req_builder.query(&[("evaluate", &local_var_str.to_string())]);
Expand Down Expand Up @@ -2540,6 +2545,7 @@ pub fn projects_parameters_values_destroy(
id: &str,
parameter_pk: &str,
project_pk: &str,
environment: Option<&str>,
evaluate: Option<bool>,
) -> Result<(), Error<ProjectsParametersValuesDestroyError>> {
let local_var_configuration = configuration;
Expand All @@ -2556,6 +2562,10 @@ pub fn projects_parameters_values_destroy(
let mut local_var_req_builder =
local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());

if let Some(ref local_var_str) = environment {
local_var_req_builder =
local_var_req_builder.query(&[("environment", &local_var_str.to_string())]);
}
if let Some(ref local_var_str) = evaluate {
local_var_req_builder =
local_var_req_builder.query(&[("evaluate", &local_var_str.to_string())]);
Expand Down Expand Up @@ -2627,6 +2637,7 @@ pub fn projects_parameters_values_list(
parameter_pk: &str,
project_pk: &str,
as_of: Option<String>,
environment: Option<&str>,
evaluate: Option<bool>,
exclude: Option<&str>,
include: Option<&str>,
Expand All @@ -2652,6 +2663,10 @@ pub fn projects_parameters_values_list(
local_var_req_builder =
local_var_req_builder.query(&[("as_of", &local_var_str.to_string())]);
}
if let Some(ref local_var_str) = environment {
local_var_req_builder =
local_var_req_builder.query(&[("environment", &local_var_str.to_string())]);
}
if let Some(ref local_var_str) = evaluate {
local_var_req_builder =
local_var_req_builder.query(&[("evaluate", &local_var_str.to_string())]);
Expand Down Expand Up @@ -2747,6 +2762,7 @@ pub fn projects_parameters_values_partial_update(
id: &str,
parameter_pk: &str,
project_pk: &str,
environment: Option<&str>,
evaluate: Option<bool>,
patched_value_update: Option<crate::models::PatchedValueUpdate>,
) -> Result<crate::models::ValueUpdate, Error<ProjectsParametersValuesPartialUpdateError>> {
Expand All @@ -2764,6 +2780,10 @@ pub fn projects_parameters_values_partial_update(
let mut local_var_req_builder =
local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());

if let Some(ref local_var_str) = environment {
local_var_req_builder =
local_var_req_builder.query(&[("environment", &local_var_str.to_string())]);
}
if let Some(ref local_var_str) = evaluate {
local_var_req_builder =
local_var_req_builder.query(&[("evaluate", &local_var_str.to_string())]);
Expand Down Expand Up @@ -2838,6 +2858,7 @@ pub fn projects_parameters_values_retrieve(
parameter_pk: &str,
project_pk: &str,
as_of: Option<String>,
environment: Option<&str>,
evaluate: Option<bool>,
exclude: Option<&str>,
include: Option<&str>,
Expand All @@ -2862,6 +2883,10 @@ pub fn projects_parameters_values_retrieve(
local_var_req_builder =
local_var_req_builder.query(&[("as_of", &local_var_str.to_string())]);
}
if let Some(ref local_var_str) = environment {
local_var_req_builder =
local_var_req_builder.query(&[("environment", &local_var_str.to_string())]);
}
if let Some(ref local_var_str) = evaluate {
local_var_req_builder =
local_var_req_builder.query(&[("evaluate", &local_var_str.to_string())]);
Expand Down Expand Up @@ -2949,6 +2974,7 @@ pub fn projects_parameters_values_update(
id: &str,
parameter_pk: &str,
project_pk: &str,
environment: Option<&str>,
evaluate: Option<bool>,
value_update: Option<crate::models::ValueUpdate>,
) -> Result<crate::models::ValueUpdate, Error<ProjectsParametersValuesUpdateError>> {
Expand All @@ -2966,6 +2992,10 @@ pub fn projects_parameters_values_update(
let mut local_var_req_builder =
local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());

if let Some(ref local_var_str) = environment {
local_var_req_builder =
local_var_req_builder.query(&[("environment", &local_var_str.to_string())]);
}
if let Some(ref local_var_str) = evaluate {
local_var_req_builder =
local_var_req_builder.query(&[("evaluate", &local_var_str.to_string())]);
Expand Down
5 changes: 3 additions & 2 deletions crates/cloudtruth-restapi/src/models/environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub struct Environment {
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
/// Environments can inherit from a single parent environment which provides values for parameters when specific environments do not have a value set. Every organization has one default environment that cannot be removed.
#[serde(rename = "parent", skip_serializing_if = "Option::is_none")]
#[serde(rename = "parent")]
pub parent: Option<String>,
/// This is the opposite of `parent`, see that field for more details.
#[serde(rename = "children")]
Expand All @@ -47,6 +47,7 @@ impl Environment {
id: String,
ledger_id: String,
name: String,
parent: Option<String>,
children: Vec<String>,
role: Option<crate::models::RoleEnum>,
created_at: String,
Expand All @@ -58,7 +59,7 @@ impl Environment {
ledger_id,
name,
description: None,
parent: None,
parent,
children,
access_controlled: None,
role: role.map(Box::new),
Expand Down
9 changes: 5 additions & 4 deletions crates/cloudtruth-restapi/src/models/parameter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ pub struct Parameter {
pub name: String,
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "secret", skip_serializing_if = "Option::is_none")]
pub secret: Option<bool>,
/// The type of this Parameter.
#[serde(rename = "secret")]
pub secret: bool,
/// The type of this Parameter. If not provided, this will default to a string for Parameters that are not overrides or to the overridden Parameter's type for Parameters that are overrides.
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
pub _type: Option<String>,
/// Rules applied to this parameter.
Expand Down Expand Up @@ -66,6 +66,7 @@ impl Parameter {
id: String,
ledger_id: String,
name: String,
secret: bool,
rules: Vec<crate::models::ParameterRule>,
project: String,
project_name: String,
Expand All @@ -83,7 +84,7 @@ impl Parameter {
ledger_id,
name,
description: None,
secret: None,
secret,
_type: None,
rules,
project,
Expand Down
2 changes: 1 addition & 1 deletion crates/cloudtruth-restapi/src/models/parameter_create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub struct ParameterCreate {
/// Indicates if this content is secret or not. External values are inspected on-demand to ensure they align with the parameter's secret setting and if they do not, those external values are not allowed to be used.
#[serde(rename = "secret", skip_serializing_if = "Option::is_none")]
pub secret: Option<bool>,
/// The type of this Parameter.
/// The type of this Parameter. If not provided, this will default to a string for Parameters that are not overrides or to the overridden Parameter's type for Parameters that are overrides.
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
pub _type: Option<String>,
}
Expand Down
5 changes: 3 additions & 2 deletions crates/cloudtruth-restapi/src/models/parameter_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pub struct ParameterType {
#[serde(rename = "rules")]
pub rules: Vec<crate::models::ParameterTypeRule>,
/// The URL for this parameter type's parent
#[serde(rename = "parent", skip_serializing_if = "Option::is_none")]
#[serde(rename = "parent")]
pub parent: Option<String>,
/// Name of the parent ParameterType (if any).
#[serde(rename = "parent_name")]
Expand All @@ -45,6 +45,7 @@ impl ParameterType {
ledger_id: String,
name: String,
rules: Vec<crate::models::ParameterTypeRule>,
parent: Option<String>,
parent_name: Option<String>,
created_at: String,
modified_at: Option<String>,
Expand All @@ -56,7 +57,7 @@ impl ParameterType {
name,
description: None,
rules,
parent: None,
parent,
parent_name,
created_at,
modified_at,
Expand Down
9 changes: 5 additions & 4 deletions crates/cloudtruth-restapi/src/models/parameter_update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ pub struct ParameterUpdate {
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
/// Indicates if this content is secret or not. External values are inspected on-demand to ensure they align with the parameter's secret setting and if they do not, those external values are not allowed to be used.
#[serde(rename = "secret", skip_serializing_if = "Option::is_none")]
pub secret: Option<bool>,
/// The type of this Parameter.
#[serde(rename = "secret")]
pub secret: bool,
/// The type of this Parameter. If not provided, this will default to a string for Parameters that are not overrides or to the overridden Parameter's type for Parameters that are overrides.
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
pub _type: Option<String>,
/// The project url.
Expand All @@ -40,6 +40,7 @@ impl ParameterUpdate {
pub fn new(
id: String,
name: String,
secret: bool,
project: String,
created_at: String,
modified_at: Option<String>,
Expand All @@ -48,7 +49,7 @@ impl ParameterUpdate {
id,
name,
description: None,
secret: None,
secret,
_type: None,
project,
created_at,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub struct PatchedParameterUpdate {
/// Indicates if this content is secret or not. External values are inspected on-demand to ensure they align with the parameter's secret setting and if they do not, those external values are not allowed to be used.
#[serde(rename = "secret", skip_serializing_if = "Option::is_none")]
pub secret: Option<bool>,
/// The type of this Parameter.
/// The type of this Parameter. If not provided, this will default to a string for Parameters that are not overrides or to the overridden Parameter's type for Parameters that are overrides.
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
pub _type: Option<String>,
/// The project url.
Expand Down
13 changes: 7 additions & 6 deletions crates/cloudtruth-restapi/src/models/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,18 @@ pub struct Project {
#[serde(rename = "dependents")]
pub dependents: Vec<String>,
/// Project dependencies allow projects to be used for shared configuration, for example a database used by many applications needs to advertise its port number. Projects can depend on another project which will add the parameters from the parent project into the current project. All of the parameter names between the two projects must be unique. When retrieving values or rendering templates, all of the parameters from the parent project will also be available in the current project.
#[serde(rename = "depends_on", skip_serializing_if = "Option::is_none")]
#[serde(rename = "depends_on")]
pub depends_on: Option<String>,
/// Indicates if access control is being enforced through grants.
#[serde(rename = "access_controlled", skip_serializing_if = "Option::is_none")]
pub access_controlled: Option<bool>,
/// Your role in the project, if the project is access-controlled.
#[serde(rename = "role")]
pub role: Option<Box<crate::models::RoleEnum>>,
/// Deprecated. Only shows pushes for aws integrations in /api/v1/.
/// Deprecated. Blank.
#[serde(rename = "pushes")]
pub pushes: Vec<crate::models::AwsPush>,
/// Push actions associated with the project.
pub pushes: Vec<String>,
/// Deprecated. Blank.
#[serde(rename = "push_urls")]
pub push_urls: Vec<String>,
#[serde(rename = "created_at")]
Expand All @@ -60,8 +60,9 @@ impl Project {
ledger_id: String,
name: String,
dependents: Vec<String>,
depends_on: Option<String>,
role: Option<crate::models::RoleEnum>,
pushes: Vec<crate::models::AwsPush>,
pushes: Vec<String>,
push_urls: Vec<String>,
created_at: String,
modified_at: Option<String>,
Expand All @@ -74,7 +75,7 @@ impl Project {
parameter_name_pattern: None,
description: None,
dependents,
depends_on: None,
depends_on,
access_controlled: None,
role: role.map(Box::new),
pushes,
Expand Down
3 changes: 2 additions & 1 deletion crates/cloudtruth-restapi/src/models/tag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct Tag {
/// The URL for the tag.
#[serde(rename = "url")]
pub url: String,
/// A unique identifier for the tag.
Expand All @@ -29,7 +30,7 @@ pub struct Tag {
/// If True, this tag cannot be modified once it is created.
#[serde(rename = "immutable", skip_serializing_if = "Option::is_none")]
pub immutable: Option<bool>,
/// Deprecated. Only shows pushes for aws integrations in /api/v1/.
/// Deprecated. Use `push_urls` instead.
#[serde(rename = "pushes")]
pub pushes: Vec<crate::models::AwsPush>,
/// Push actions associated with the tag.
Expand Down
Loading
Loading