From ed3224c5aed784523eaa53e265b628fa021dcad3 Mon Sep 17 00:00:00 2001 From: skarimo <40482491+skarimo@users.noreply.github.com> Date: Fri, 23 Feb 2024 16:07:20 -0500 Subject: [PATCH] Fix edge case naming (#18) --- .generator/src/generator/utils.py | 5 ++ src/datadogV1/api/api_organizations.rs | 8 +- .../api/api_service_level_objectives.rs | 10 +-- src/datadogV1/model/mod.rs | 8 +- ...e_io_t_hour.rs => model_usage_iot_hour.rs} | 0 ...esponse.rs => model_usage_iot_response.rs} | 0 ...th_n_mappings.rs => api_authn_mappings.rs} | 42 +++++----- src/datadogV2/api/api_organizations.rs | 10 +-- src/datadogV2/api/mod.rs | 2 +- src/datadogV2/model/mod.rs | 68 +++++++-------- ...th_n_mapping.rs => model_authn_mapping.rs} | 0 ...s.rs => model_authn_mapping_attributes.rs} | 0 ... model_authn_mapping_create_attributes.rs} | 0 ....rs => model_authn_mapping_create_data.rs} | 0 ...del_authn_mapping_create_relationships.rs} | 0 ... => model_authn_mapping_create_request.rs} | 0 ...ded.rs => model_authn_mapping_included.rs} | 0 ...s => model_authn_mapping_relationships.rs} | 0 ...nse.rs => model_authn_mapping_response.rs} | 0 ... model_authn_mapping_update_attributes.rs} | 0 ....rs => model_authn_mapping_update_data.rs} | 0 ...del_authn_mapping_update_relationships.rs} | 0 ... => model_authn_mapping_update_request.rs} | 0 ...se.rs => model_authn_mappings_response.rs} | 0 ...s_sort.rs => model_authn_mappings_sort.rs} | 0 ...s_type.rs => model_authn_mappings_type.rs} | 0 ...ata.rs => model_idp_metadata_form_data.rs} | 0 tests/scenarios/function_mappings.rs | 83 +++++++++---------- 28 files changed, 118 insertions(+), 118 deletions(-) rename src/datadogV1/model/{model_usage_io_t_hour.rs => model_usage_iot_hour.rs} (100%) rename src/datadogV1/model/{model_usage_io_t_response.rs => model_usage_iot_response.rs} (100%) rename src/datadogV2/api/{api_auth_n_mappings.rs => api_authn_mappings.rs} (94%) rename src/datadogV2/model/{model_auth_n_mapping.rs => model_authn_mapping.rs} (100%) rename src/datadogV2/model/{model_auth_n_mapping_attributes.rs => model_authn_mapping_attributes.rs} (100%) rename src/datadogV2/model/{model_auth_n_mapping_create_attributes.rs => model_authn_mapping_create_attributes.rs} (100%) rename src/datadogV2/model/{model_auth_n_mapping_create_data.rs => model_authn_mapping_create_data.rs} (100%) rename src/datadogV2/model/{model_auth_n_mapping_create_relationships.rs => model_authn_mapping_create_relationships.rs} (100%) rename src/datadogV2/model/{model_auth_n_mapping_create_request.rs => model_authn_mapping_create_request.rs} (100%) rename src/datadogV2/model/{model_auth_n_mapping_included.rs => model_authn_mapping_included.rs} (100%) rename src/datadogV2/model/{model_auth_n_mapping_relationships.rs => model_authn_mapping_relationships.rs} (100%) rename src/datadogV2/model/{model_auth_n_mapping_response.rs => model_authn_mapping_response.rs} (100%) rename src/datadogV2/model/{model_auth_n_mapping_update_attributes.rs => model_authn_mapping_update_attributes.rs} (100%) rename src/datadogV2/model/{model_auth_n_mapping_update_data.rs => model_authn_mapping_update_data.rs} (100%) rename src/datadogV2/model/{model_auth_n_mapping_update_relationships.rs => model_authn_mapping_update_relationships.rs} (100%) rename src/datadogV2/model/{model_auth_n_mapping_update_request.rs => model_authn_mapping_update_request.rs} (100%) rename src/datadogV2/model/{model_auth_n_mappings_response.rs => model_authn_mappings_response.rs} (100%) rename src/datadogV2/model/{model_auth_n_mappings_sort.rs => model_authn_mappings_sort.rs} (100%) rename src/datadogV2/model/{model_auth_n_mappings_type.rs => model_authn_mappings_type.rs} (100%) rename src/datadogV2/model/{model_id_p_metadata_form_data.rs => model_idp_metadata_form_data.rs} (100%) diff --git a/.generator/src/generator/utils.py b/.generator/src/generator/utils.py index a26543cb9..67e43c979 100644 --- a/.generator/src/generator/utils.py +++ b/.generator/src/generator/utils.py @@ -7,8 +7,13 @@ PATTERN_FOLLOWING_ALPHA = re.compile(r"([a-z0-9])([A-Z])") PATTERN_WHITESPACE = re.compile(r"\W") +EDGE_CASES = {"IdP": "Idp", "AuthNMapping": "AuthnMapping", "AuthN ": "Authn ", "IoT": "Iot", "SLOs": "Slos"} + def snake_case(value): + for token, replacement in EDGE_CASES.items(): + value = value.replace(token, replacement) + s1 = PATTERN_LEADING_ALPHA.sub(r"\1_\2", value) s1 = PATTERN_FOLLOWING_ALPHA.sub(r"\1_\2", s1).lower() s1 = PATTERN_WHITESPACE.sub("_", s1) diff --git a/src/datadogV1/api/api_organizations.rs b/src/datadogV1/api/api_organizations.rs index 629723dfa..689dc05b0 100644 --- a/src/datadogV1/api/api_organizations.rs +++ b/src/datadogV1/api/api_organizations.rs @@ -54,7 +54,7 @@ pub enum UpdateOrgError { UnknownValue(serde_json::Value), } -/// UploadIdPForOrgError is a struct for typed errors of method [`OrganizationsAPI::upload_id_p_for_org`] +/// UploadIdPForOrgError is a struct for typed errors of method [`OrganizationsAPI::upload_idp_for_org`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum UploadIdPForOrgError { @@ -468,13 +468,13 @@ impl OrganizationsAPI { /// * **Multipart Form-Data**: Post the IdP metadata file using a form post. /// /// * **XML Body:** Post the IdP metadata file as the body of the request. - pub async fn upload_id_p_for_org( + pub async fn upload_idp_for_org( &self, public_id: String, idp_file: Vec, ) -> Result, Error> { match self - .upload_id_p_for_org_with_http_info(public_id, idp_file) + .upload_idp_for_org_with_http_info(public_id, idp_file) .await { Ok(response_content) => Ok(response_content.entity), @@ -488,7 +488,7 @@ impl OrganizationsAPI { /// * **Multipart Form-Data**: Post the IdP metadata file using a form post. /// /// * **XML Body:** Post the IdP metadata file as the body of the request. - pub async fn upload_id_p_for_org_with_http_info( + pub async fn upload_idp_for_org_with_http_info( &self, public_id: String, idp_file: Vec, diff --git a/src/datadogV1/api/api_service_level_objectives.rs b/src/datadogV1/api/api_service_level_objectives.rs index 47c5f5330..df3e056f0 100644 --- a/src/datadogV1/api/api_service_level_objectives.rs +++ b/src/datadogV1/api/api_service_level_objectives.rs @@ -62,7 +62,7 @@ impl GetSLOHistoryOptionalParams { } } -/// ListSLOsOptionalParams is a struct for passing parameters to the method [`ServiceLevelObjectivesAPI::list_sl_os`] +/// ListSLOsOptionalParams is a struct for passing parameters to the method [`ServiceLevelObjectivesAPI::list_slos`] #[non_exhaustive] #[derive(Clone, Default, Debug)] pub struct ListSLOsOptionalParams { @@ -228,7 +228,7 @@ pub enum GetSLOHistoryError { UnknownValue(serde_json::Value), } -/// ListSLOsError is a struct for typed errors of method [`ServiceLevelObjectivesAPI::list_sl_os`] +/// ListSLOsError is a struct for typed errors of method [`ServiceLevelObjectivesAPI::list_slos`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ListSLOsError { @@ -857,18 +857,18 @@ impl ServiceLevelObjectivesAPI { } /// Get a list of service level objective objects for your organization. - pub async fn list_sl_os( + pub async fn list_slos( &self, params: ListSLOsOptionalParams, ) -> Result, Error> { - match self.list_sl_os_with_http_info(params).await { + match self.list_slos_with_http_info(params).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } } /// Get a list of service level objective objects for your organization. - pub async fn list_sl_os_with_http_info( + pub async fn list_slos_with_http_info( &self, params: ListSLOsOptionalParams, ) -> Result, Error> diff --git a/src/datadogV1/model/mod.rs b/src/datadogV1/model/mod.rs index a39e0bc72..4e2f1f306 100644 --- a/src/datadogV1/model/mod.rs +++ b/src/datadogV1/model/mod.rs @@ -1548,10 +1548,10 @@ pub mod model_usage_ingested_spans_response; pub use self::model_usage_ingested_spans_response::UsageIngestedSpansResponse; pub mod model_usage_ingested_spans_hour; pub use self::model_usage_ingested_spans_hour::UsageIngestedSpansHour; -pub mod model_usage_io_t_response; -pub use self::model_usage_io_t_response::UsageIoTResponse; -pub mod model_usage_io_t_hour; -pub use self::model_usage_io_t_hour::UsageIoTHour; +pub mod model_usage_iot_response; +pub use self::model_usage_iot_response::UsageIoTResponse; +pub mod model_usage_iot_hour; +pub use self::model_usage_iot_hour::UsageIoTHour; pub mod model_usage_logs_response; pub use self::model_usage_logs_response::UsageLogsResponse; pub mod model_usage_logs_hour; diff --git a/src/datadogV1/model/model_usage_io_t_hour.rs b/src/datadogV1/model/model_usage_iot_hour.rs similarity index 100% rename from src/datadogV1/model/model_usage_io_t_hour.rs rename to src/datadogV1/model/model_usage_iot_hour.rs diff --git a/src/datadogV1/model/model_usage_io_t_response.rs b/src/datadogV1/model/model_usage_iot_response.rs similarity index 100% rename from src/datadogV1/model/model_usage_io_t_response.rs rename to src/datadogV1/model/model_usage_iot_response.rs diff --git a/src/datadogV2/api/api_auth_n_mappings.rs b/src/datadogV2/api/api_authn_mappings.rs similarity index 94% rename from src/datadogV2/api/api_auth_n_mappings.rs rename to src/datadogV2/api/api_authn_mappings.rs index 7004a033b..8917feccc 100644 --- a/src/datadogV2/api/api_auth_n_mappings.rs +++ b/src/datadogV2/api/api_authn_mappings.rs @@ -5,7 +5,7 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// ListAuthNMappingsOptionalParams is a struct for passing parameters to the method [`AuthNMappingsAPI::list_auth_n_mappings`] +/// ListAuthNMappingsOptionalParams is a struct for passing parameters to the method [`AuthNMappingsAPI::list_authn_mappings`] #[non_exhaustive] #[derive(Clone, Default, Debug)] pub struct ListAuthNMappingsOptionalParams { @@ -42,7 +42,7 @@ impl ListAuthNMappingsOptionalParams { } } -/// CreateAuthNMappingError is a struct for typed errors of method [`AuthNMappingsAPI::create_auth_n_mapping`] +/// CreateAuthNMappingError is a struct for typed errors of method [`AuthNMappingsAPI::create_authn_mapping`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CreateAuthNMappingError { @@ -53,7 +53,7 @@ pub enum CreateAuthNMappingError { UnknownValue(serde_json::Value), } -/// DeleteAuthNMappingError is a struct for typed errors of method [`AuthNMappingsAPI::delete_auth_n_mapping`] +/// DeleteAuthNMappingError is a struct for typed errors of method [`AuthNMappingsAPI::delete_authn_mapping`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum DeleteAuthNMappingError { @@ -63,7 +63,7 @@ pub enum DeleteAuthNMappingError { UnknownValue(serde_json::Value), } -/// GetAuthNMappingError is a struct for typed errors of method [`AuthNMappingsAPI::get_auth_n_mapping`] +/// GetAuthNMappingError is a struct for typed errors of method [`AuthNMappingsAPI::get_authn_mapping`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GetAuthNMappingError { @@ -73,7 +73,7 @@ pub enum GetAuthNMappingError { UnknownValue(serde_json::Value), } -/// ListAuthNMappingsError is a struct for typed errors of method [`AuthNMappingsAPI::list_auth_n_mappings`] +/// ListAuthNMappingsError is a struct for typed errors of method [`AuthNMappingsAPI::list_authn_mappings`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ListAuthNMappingsError { @@ -82,7 +82,7 @@ pub enum ListAuthNMappingsError { UnknownValue(serde_json::Value), } -/// UpdateAuthNMappingError is a struct for typed errors of method [`AuthNMappingsAPI::update_auth_n_mapping`] +/// UpdateAuthNMappingError is a struct for typed errors of method [`AuthNMappingsAPI::update_authn_mapping`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum UpdateAuthNMappingError { @@ -117,19 +117,19 @@ impl AuthNMappingsAPI { } /// Create an AuthN Mapping. - pub async fn create_auth_n_mapping( + pub async fn create_authn_mapping( &self, body: crate::datadogV2::model::AuthNMappingCreateRequest, ) -> Result, Error> { - match self.create_auth_n_mapping_with_http_info(body).await { + match self.create_authn_mapping_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } } /// Create an AuthN Mapping. - pub async fn create_auth_n_mapping_with_http_info( + pub async fn create_authn_mapping_with_http_info( &self, body: crate::datadogV2::model::AuthNMappingCreateRequest, ) -> Result< @@ -192,12 +192,12 @@ impl AuthNMappingsAPI { } /// Delete an AuthN Mapping specified by AuthN Mapping UUID. - pub async fn delete_auth_n_mapping( + pub async fn delete_authn_mapping( &self, authn_mapping_id: String, ) -> Result, Error> { match self - .delete_auth_n_mapping_with_http_info(authn_mapping_id) + .delete_authn_mapping_with_http_info(authn_mapping_id) .await { Ok(response_content) => Ok(response_content.entity), @@ -206,7 +206,7 @@ impl AuthNMappingsAPI { } /// Delete an AuthN Mapping specified by AuthN Mapping UUID. - pub async fn delete_auth_n_mapping_with_http_info( + pub async fn delete_authn_mapping_with_http_info( &self, authn_mapping_id: String, ) -> Result, Error> { @@ -261,13 +261,13 @@ impl AuthNMappingsAPI { } /// Get an AuthN Mapping specified by the AuthN Mapping UUID. - pub async fn get_auth_n_mapping( + pub async fn get_authn_mapping( &self, authn_mapping_id: String, ) -> Result, Error> { match self - .get_auth_n_mapping_with_http_info(authn_mapping_id) + .get_authn_mapping_with_http_info(authn_mapping_id) .await { Ok(response_content) => Ok(response_content.entity), @@ -276,7 +276,7 @@ impl AuthNMappingsAPI { } /// Get an AuthN Mapping specified by the AuthN Mapping UUID. - pub async fn get_auth_n_mapping_with_http_info( + pub async fn get_authn_mapping_with_http_info( &self, authn_mapping_id: String, ) -> Result< @@ -336,19 +336,19 @@ impl AuthNMappingsAPI { } /// List all AuthN Mappings in the org. - pub async fn list_auth_n_mappings( + pub async fn list_authn_mappings( &self, params: ListAuthNMappingsOptionalParams, ) -> Result, Error> { - match self.list_auth_n_mappings_with_http_info(params).await { + match self.list_authn_mappings_with_http_info(params).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } } /// List all AuthN Mappings in the org. - pub async fn list_auth_n_mappings_with_http_info( + pub async fn list_authn_mappings_with_http_info( &self, params: ListAuthNMappingsOptionalParams, ) -> Result< @@ -427,14 +427,14 @@ impl AuthNMappingsAPI { } /// Edit an AuthN Mapping. - pub async fn update_auth_n_mapping( + pub async fn update_authn_mapping( &self, authn_mapping_id: String, body: crate::datadogV2::model::AuthNMappingUpdateRequest, ) -> Result, Error> { match self - .update_auth_n_mapping_with_http_info(authn_mapping_id, body) + .update_authn_mapping_with_http_info(authn_mapping_id, body) .await { Ok(response_content) => Ok(response_content.entity), @@ -443,7 +443,7 @@ impl AuthNMappingsAPI { } /// Edit an AuthN Mapping. - pub async fn update_auth_n_mapping_with_http_info( + pub async fn update_authn_mapping_with_http_info( &self, authn_mapping_id: String, body: crate::datadogV2::model::AuthNMappingUpdateRequest, diff --git a/src/datadogV2/api/api_organizations.rs b/src/datadogV2/api/api_organizations.rs index a372d5141..3316ffa58 100644 --- a/src/datadogV2/api/api_organizations.rs +++ b/src/datadogV2/api/api_organizations.rs @@ -5,7 +5,7 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// UploadIdPMetadataOptionalParams is a struct for passing parameters to the method [`OrganizationsAPI::upload_id_p_metadata`] +/// UploadIdPMetadataOptionalParams is a struct for passing parameters to the method [`OrganizationsAPI::upload_idp_metadata`] #[non_exhaustive] #[derive(Clone, Default, Debug)] pub struct UploadIdPMetadataOptionalParams { @@ -21,7 +21,7 @@ impl UploadIdPMetadataOptionalParams { } } -/// UploadIdPMetadataError is a struct for typed errors of method [`OrganizationsAPI::upload_id_p_metadata`] +/// UploadIdPMetadataError is a struct for typed errors of method [`OrganizationsAPI::upload_idp_metadata`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum UploadIdPMetadataError { @@ -55,11 +55,11 @@ impl OrganizationsAPI { /// Endpoint for uploading IdP metadata for SAML setup. /// /// Use this endpoint to upload or replace IdP metadata for SAML login configuration. - pub async fn upload_id_p_metadata( + pub async fn upload_idp_metadata( &self, params: UploadIdPMetadataOptionalParams, ) -> Result, Error> { - match self.upload_id_p_metadata_with_http_info(params).await { + match self.upload_idp_metadata_with_http_info(params).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -68,7 +68,7 @@ impl OrganizationsAPI { /// Endpoint for uploading IdP metadata for SAML setup. /// /// Use this endpoint to upload or replace IdP metadata for SAML login configuration. - pub async fn upload_id_p_metadata_with_http_info( + pub async fn upload_idp_metadata_with_http_info( &self, params: UploadIdPMetadataOptionalParams, ) -> Result, Error> { diff --git a/src/datadogV2/api/mod.rs b/src/datadogV2/api/mod.rs index ce2c5b32b..34cefc319 100644 --- a/src/datadogV2/api/mod.rs +++ b/src/datadogV2/api/mod.rs @@ -4,7 +4,7 @@ pub mod api_apm_retention_filters; pub mod api_audit; -pub mod api_auth_n_mappings; +pub mod api_authn_mappings; pub mod api_ci_visibility_pipelines; pub mod api_ci_visibility_tests; pub mod api_cloud_cost_management; diff --git a/src/datadogV2/model/mod.rs b/src/datadogV2/model/mod.rs index ce96eefed..72b3c5844 100644 --- a/src/datadogV2/model/mod.rs +++ b/src/datadogV2/model/mod.rs @@ -212,16 +212,16 @@ pub mod model_audit_logs_query_options; pub use self::model_audit_logs_query_options::AuditLogsQueryOptions; pub mod model_audit_logs_query_page_options; pub use self::model_audit_logs_query_page_options::AuditLogsQueryPageOptions; -pub mod model_auth_n_mappings_sort; -pub use self::model_auth_n_mappings_sort::AuthNMappingsSort; -pub mod model_auth_n_mappings_response; -pub use self::model_auth_n_mappings_response::AuthNMappingsResponse; -pub mod model_auth_n_mapping; -pub use self::model_auth_n_mapping::AuthNMapping; -pub mod model_auth_n_mapping_attributes; -pub use self::model_auth_n_mapping_attributes::AuthNMappingAttributes; -pub mod model_auth_n_mapping_relationships; -pub use self::model_auth_n_mapping_relationships::AuthNMappingRelationships; +pub mod model_authn_mappings_sort; +pub use self::model_authn_mappings_sort::AuthNMappingsSort; +pub mod model_authn_mappings_response; +pub use self::model_authn_mappings_response::AuthNMappingsResponse; +pub mod model_authn_mapping; +pub use self::model_authn_mapping::AuthNMapping; +pub mod model_authn_mapping_attributes; +pub use self::model_authn_mapping_attributes::AuthNMappingAttributes; +pub mod model_authn_mapping_relationships; +pub use self::model_authn_mapping_relationships::AuthNMappingRelationships; pub mod model_relationship_to_role; pub use self::model_relationship_to_role::RelationshipToRole; pub mod model_relationship_to_saml_assertion_attribute; @@ -230,36 +230,36 @@ pub mod model_relationship_to_saml_assertion_attribute_data; pub use self::model_relationship_to_saml_assertion_attribute_data::RelationshipToSAMLAssertionAttributeData; pub mod model_saml_assertion_attributes_type; pub use self::model_saml_assertion_attributes_type::SAMLAssertionAttributesType; -pub mod model_auth_n_mappings_type; -pub use self::model_auth_n_mappings_type::AuthNMappingsType; +pub mod model_authn_mappings_type; +pub use self::model_authn_mappings_type::AuthNMappingsType; pub mod model_saml_assertion_attribute; pub use self::model_saml_assertion_attribute::SAMLAssertionAttribute; pub mod model_saml_assertion_attribute_attributes; pub use self::model_saml_assertion_attribute_attributes::SAMLAssertionAttributeAttributes; -pub mod model_auth_n_mapping_included; -pub use self::model_auth_n_mapping_included::AuthNMappingIncluded; +pub mod model_authn_mapping_included; +pub use self::model_authn_mapping_included::AuthNMappingIncluded; pub mod model_response_meta_attributes; pub use self::model_response_meta_attributes::ResponseMetaAttributes; pub mod model_pagination; pub use self::model_pagination::Pagination; -pub mod model_auth_n_mapping_create_request; -pub use self::model_auth_n_mapping_create_request::AuthNMappingCreateRequest; -pub mod model_auth_n_mapping_create_data; -pub use self::model_auth_n_mapping_create_data::AuthNMappingCreateData; -pub mod model_auth_n_mapping_create_attributes; -pub use self::model_auth_n_mapping_create_attributes::AuthNMappingCreateAttributes; -pub mod model_auth_n_mapping_create_relationships; -pub use self::model_auth_n_mapping_create_relationships::AuthNMappingCreateRelationships; -pub mod model_auth_n_mapping_response; -pub use self::model_auth_n_mapping_response::AuthNMappingResponse; -pub mod model_auth_n_mapping_update_request; -pub use self::model_auth_n_mapping_update_request::AuthNMappingUpdateRequest; -pub mod model_auth_n_mapping_update_data; -pub use self::model_auth_n_mapping_update_data::AuthNMappingUpdateData; -pub mod model_auth_n_mapping_update_attributes; -pub use self::model_auth_n_mapping_update_attributes::AuthNMappingUpdateAttributes; -pub mod model_auth_n_mapping_update_relationships; -pub use self::model_auth_n_mapping_update_relationships::AuthNMappingUpdateRelationships; +pub mod model_authn_mapping_create_request; +pub use self::model_authn_mapping_create_request::AuthNMappingCreateRequest; +pub mod model_authn_mapping_create_data; +pub use self::model_authn_mapping_create_data::AuthNMappingCreateData; +pub mod model_authn_mapping_create_attributes; +pub use self::model_authn_mapping_create_attributes::AuthNMappingCreateAttributes; +pub mod model_authn_mapping_create_relationships; +pub use self::model_authn_mapping_create_relationships::AuthNMappingCreateRelationships; +pub mod model_authn_mapping_response; +pub use self::model_authn_mapping_response::AuthNMappingResponse; +pub mod model_authn_mapping_update_request; +pub use self::model_authn_mapping_update_request::AuthNMappingUpdateRequest; +pub mod model_authn_mapping_update_data; +pub use self::model_authn_mapping_update_data::AuthNMappingUpdateData; +pub mod model_authn_mapping_update_attributes; +pub use self::model_authn_mapping_update_attributes::AuthNMappingUpdateAttributes; +pub mod model_authn_mapping_update_relationships; +pub use self::model_authn_mapping_update_relationships::AuthNMappingUpdateRelationships; pub mod model_ci_app_create_pipeline_event_request; pub use self::model_ci_app_create_pipeline_event_request::CIAppCreatePipelineEventRequest; pub mod model_ci_app_create_pipeline_event_request_data; @@ -1766,8 +1766,8 @@ pub mod model_rum_event_type; pub use self::model_rum_event_type::RUMEventType; pub mod model_rum_search_events_request; pub use self::model_rum_search_events_request::RUMSearchEventsRequest; -pub mod model_id_p_metadata_form_data; -pub use self::model_id_p_metadata_form_data::IdPMetadataFormData; +pub mod model_idp_metadata_form_data; +pub use self::model_idp_metadata_form_data::IdPMetadataFormData; pub mod model_outcomes_response; pub use self::model_outcomes_response::OutcomesResponse; pub mod model_outcomes_response_data_item; diff --git a/src/datadogV2/model/model_auth_n_mapping.rs b/src/datadogV2/model/model_authn_mapping.rs similarity index 100% rename from src/datadogV2/model/model_auth_n_mapping.rs rename to src/datadogV2/model/model_authn_mapping.rs diff --git a/src/datadogV2/model/model_auth_n_mapping_attributes.rs b/src/datadogV2/model/model_authn_mapping_attributes.rs similarity index 100% rename from src/datadogV2/model/model_auth_n_mapping_attributes.rs rename to src/datadogV2/model/model_authn_mapping_attributes.rs diff --git a/src/datadogV2/model/model_auth_n_mapping_create_attributes.rs b/src/datadogV2/model/model_authn_mapping_create_attributes.rs similarity index 100% rename from src/datadogV2/model/model_auth_n_mapping_create_attributes.rs rename to src/datadogV2/model/model_authn_mapping_create_attributes.rs diff --git a/src/datadogV2/model/model_auth_n_mapping_create_data.rs b/src/datadogV2/model/model_authn_mapping_create_data.rs similarity index 100% rename from src/datadogV2/model/model_auth_n_mapping_create_data.rs rename to src/datadogV2/model/model_authn_mapping_create_data.rs diff --git a/src/datadogV2/model/model_auth_n_mapping_create_relationships.rs b/src/datadogV2/model/model_authn_mapping_create_relationships.rs similarity index 100% rename from src/datadogV2/model/model_auth_n_mapping_create_relationships.rs rename to src/datadogV2/model/model_authn_mapping_create_relationships.rs diff --git a/src/datadogV2/model/model_auth_n_mapping_create_request.rs b/src/datadogV2/model/model_authn_mapping_create_request.rs similarity index 100% rename from src/datadogV2/model/model_auth_n_mapping_create_request.rs rename to src/datadogV2/model/model_authn_mapping_create_request.rs diff --git a/src/datadogV2/model/model_auth_n_mapping_included.rs b/src/datadogV2/model/model_authn_mapping_included.rs similarity index 100% rename from src/datadogV2/model/model_auth_n_mapping_included.rs rename to src/datadogV2/model/model_authn_mapping_included.rs diff --git a/src/datadogV2/model/model_auth_n_mapping_relationships.rs b/src/datadogV2/model/model_authn_mapping_relationships.rs similarity index 100% rename from src/datadogV2/model/model_auth_n_mapping_relationships.rs rename to src/datadogV2/model/model_authn_mapping_relationships.rs diff --git a/src/datadogV2/model/model_auth_n_mapping_response.rs b/src/datadogV2/model/model_authn_mapping_response.rs similarity index 100% rename from src/datadogV2/model/model_auth_n_mapping_response.rs rename to src/datadogV2/model/model_authn_mapping_response.rs diff --git a/src/datadogV2/model/model_auth_n_mapping_update_attributes.rs b/src/datadogV2/model/model_authn_mapping_update_attributes.rs similarity index 100% rename from src/datadogV2/model/model_auth_n_mapping_update_attributes.rs rename to src/datadogV2/model/model_authn_mapping_update_attributes.rs diff --git a/src/datadogV2/model/model_auth_n_mapping_update_data.rs b/src/datadogV2/model/model_authn_mapping_update_data.rs similarity index 100% rename from src/datadogV2/model/model_auth_n_mapping_update_data.rs rename to src/datadogV2/model/model_authn_mapping_update_data.rs diff --git a/src/datadogV2/model/model_auth_n_mapping_update_relationships.rs b/src/datadogV2/model/model_authn_mapping_update_relationships.rs similarity index 100% rename from src/datadogV2/model/model_auth_n_mapping_update_relationships.rs rename to src/datadogV2/model/model_authn_mapping_update_relationships.rs diff --git a/src/datadogV2/model/model_auth_n_mapping_update_request.rs b/src/datadogV2/model/model_authn_mapping_update_request.rs similarity index 100% rename from src/datadogV2/model/model_auth_n_mapping_update_request.rs rename to src/datadogV2/model/model_authn_mapping_update_request.rs diff --git a/src/datadogV2/model/model_auth_n_mappings_response.rs b/src/datadogV2/model/model_authn_mappings_response.rs similarity index 100% rename from src/datadogV2/model/model_auth_n_mappings_response.rs rename to src/datadogV2/model/model_authn_mappings_response.rs diff --git a/src/datadogV2/model/model_auth_n_mappings_sort.rs b/src/datadogV2/model/model_authn_mappings_sort.rs similarity index 100% rename from src/datadogV2/model/model_auth_n_mappings_sort.rs rename to src/datadogV2/model/model_authn_mappings_sort.rs diff --git a/src/datadogV2/model/model_auth_n_mappings_type.rs b/src/datadogV2/model/model_authn_mappings_type.rs similarity index 100% rename from src/datadogV2/model/model_auth_n_mappings_type.rs rename to src/datadogV2/model/model_authn_mappings_type.rs diff --git a/src/datadogV2/model/model_id_p_metadata_form_data.rs b/src/datadogV2/model/model_idp_metadata_form_data.rs similarity index 100% rename from src/datadogV2/model/model_id_p_metadata_form_data.rs rename to src/datadogV2/model/model_idp_metadata_form_data.rs diff --git a/tests/scenarios/function_mappings.rs b/tests/scenarios/function_mappings.rs index 0e8052f37..5b19c5483 100644 --- a/tests/scenarios/function_mappings.rs +++ b/tests/scenarios/function_mappings.rs @@ -44,7 +44,7 @@ pub struct ApiInstances { pub v2_api_spans_metrics: Option, pub v2_api_apm_retention_filters: Option, pub v2_api_audit: Option, - pub v2_api_auth_n_mappings: Option, + pub v2_api_authn_mappings: Option, pub v2_api_ci_visibility_pipelines: Option, pub v2_api_ci_visibility_tests: Option, pub v2_api_container_images: Option, @@ -342,8 +342,8 @@ pub fn initialize_api_instance(world: &mut DatadogWorld, api: String) { ); } "AuthNMappings" => { - world.api_instances.v2_api_auth_n_mappings = Some( - datadogV2::api::api_auth_n_mappings::AuthNMappingsAPI::with_config( + world.api_instances.v2_api_authn_mappings = Some( + datadogV2::api::api_authn_mappings::AuthNMappingsAPI::with_config( world.config.clone(), ), ); @@ -1133,7 +1133,7 @@ pub fn collect_function_calls(world: &mut DatadogWorld) { .insert("v1.DowngradeOrg".into(), test_v1_downgrade_org); world .function_mappings - .insert("v1.UploadIdPForOrg".into(), test_v1_upload_id_p_for_org); + .insert("v1.UploadIdPForOrg".into(), test_v1_upload_idp_for_org); world.function_mappings.insert( "v1.AddSecurityMonitoringSignalToIncident".into(), test_v1_add_security_monitoring_signal_to_incident, @@ -1148,7 +1148,7 @@ pub fn collect_function_calls(world: &mut DatadogWorld) { ); world .function_mappings - .insert("v1.ListSLOs".into(), test_v1_list_sl_os); + .insert("v1.ListSLOs".into(), test_v1_list_slos); world .function_mappings .insert("v1.CreateSLO".into(), test_v1_create_slo); @@ -1426,22 +1426,19 @@ pub fn collect_function_calls(world: &mut DatadogWorld) { .insert("v2.SearchAuditLogs".into(), test_v2_search_audit_logs); world .function_mappings - .insert("v2.ListAuthNMappings".into(), test_v2_list_auth_n_mappings); - world.function_mappings.insert( - "v2.CreateAuthNMapping".into(), - test_v2_create_auth_n_mapping, - ); - world.function_mappings.insert( - "v2.DeleteAuthNMapping".into(), - test_v2_delete_auth_n_mapping, - ); + .insert("v2.ListAuthNMappings".into(), test_v2_list_authn_mappings); world .function_mappings - .insert("v2.GetAuthNMapping".into(), test_v2_get_auth_n_mapping); - world.function_mappings.insert( - "v2.UpdateAuthNMapping".into(), - test_v2_update_auth_n_mapping, - ); + .insert("v2.CreateAuthNMapping".into(), test_v2_create_authn_mapping); + world + .function_mappings + .insert("v2.DeleteAuthNMapping".into(), test_v2_delete_authn_mapping); + world + .function_mappings + .insert("v2.GetAuthNMapping".into(), test_v2_get_authn_mapping); + world + .function_mappings + .insert("v2.UpdateAuthNMapping".into(), test_v2_update_authn_mapping); world.function_mappings.insert( "v2.CreateCIAppPipelineEvent".into(), test_v2_create_ci_app_pipeline_event, @@ -2130,7 +2127,7 @@ pub fn collect_function_calls(world: &mut DatadogWorld) { .insert("v2.SearchRUMEvents".into(), test_v2_search_rum_events); world .function_mappings - .insert("v2.UploadIdPMetadata".into(), test_v2_upload_id_p_metadata); + .insert("v2.UploadIdPMetadata".into(), test_v2_upload_idp_metadata); world.function_mappings.insert( "v2.ListScorecardOutcomes".into(), test_v2_list_scorecard_outcomes, @@ -7500,7 +7497,7 @@ fn test_v1_downgrade_org(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v1_upload_idp_for_org(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances .v1_api_organizations @@ -7514,7 +7511,7 @@ fn test_v1_upload_id_p_for_org(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -7624,7 +7621,7 @@ fn test_v1_edit_security_monitoring_signal_state( world.response.code = response.status.as_u16(); } -fn test_v1_list_sl_os(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v1_list_slos(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances .v1_api_service_level_objectives @@ -7656,7 +7653,7 @@ fn test_v1_list_sl_os(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -10040,10 +10037,10 @@ fn test_v2_search_audit_logs(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_list_authn_mappings(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_auth_n_mappings + .v2_api_authn_mappings .as_ref() .expect("api instance not found"); let page_size = _parameters @@ -10058,13 +10055,12 @@ fn test_v2_list_auth_n_mappings(world: &mut DatadogWorld, _parameters: &HashMap< let filter = _parameters .get("filter") .and_then(|param| Some(serde_json::from_value(param.clone()).unwrap())); - let mut params = - datadogV2::api::api_auth_n_mappings::ListAuthNMappingsOptionalParams::default(); + let mut params = datadogV2::api::api_authn_mappings::ListAuthNMappingsOptionalParams::default(); params.page_size = page_size; params.page_number = page_number; params.sort = sort; params.filter = filter; - let response = match block_on(api.list_auth_n_mappings_with_http_info(params)) { + let response = match block_on(api.list_authn_mappings_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -10082,14 +10078,14 @@ fn test_v2_list_auth_n_mappings(world: &mut DatadogWorld, _parameters: &HashMap< world.response.code = response.status.as_u16(); } -fn test_v2_create_auth_n_mapping(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_create_authn_mapping(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_auth_n_mappings + .v2_api_authn_mappings .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let response = match block_on(api.create_auth_n_mapping_with_http_info(body)) { + let response = match block_on(api.create_authn_mapping_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -10107,15 +10103,15 @@ fn test_v2_create_auth_n_mapping(world: &mut DatadogWorld, _parameters: &HashMap world.response.code = response.status.as_u16(); } -fn test_v2_delete_auth_n_mapping(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_delete_authn_mapping(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_auth_n_mappings + .v2_api_authn_mappings .as_ref() .expect("api instance not found"); let authn_mapping_id = serde_json::from_value(_parameters.get("authn_mapping_id").unwrap().clone()).unwrap(); - let response = match block_on(api.delete_auth_n_mapping_with_http_info(authn_mapping_id)) { + let response = match block_on(api.delete_authn_mapping_with_http_info(authn_mapping_id)) { Ok(response) => response, Err(error) => { return match error { @@ -10133,15 +10129,15 @@ fn test_v2_delete_auth_n_mapping(world: &mut DatadogWorld, _parameters: &HashMap world.response.code = response.status.as_u16(); } -fn test_v2_get_auth_n_mapping(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_get_authn_mapping(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_auth_n_mappings + .v2_api_authn_mappings .as_ref() .expect("api instance not found"); let authn_mapping_id = serde_json::from_value(_parameters.get("authn_mapping_id").unwrap().clone()).unwrap(); - let response = match block_on(api.get_auth_n_mapping_with_http_info(authn_mapping_id)) { + let response = match block_on(api.get_authn_mapping_with_http_info(authn_mapping_id)) { Ok(response) => response, Err(error) => { return match error { @@ -10159,17 +10155,16 @@ fn test_v2_get_auth_n_mapping(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_update_authn_mapping(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_auth_n_mappings + .v2_api_authn_mappings .as_ref() .expect("api instance not found"); let authn_mapping_id = serde_json::from_value(_parameters.get("authn_mapping_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let response = match block_on(api.update_auth_n_mapping_with_http_info(authn_mapping_id, body)) - { + let response = match block_on(api.update_authn_mapping_with_http_info(authn_mapping_id, body)) { Ok(response) => response, Err(error) => { return match error { @@ -15995,7 +15990,7 @@ fn test_v2_search_rum_events(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_upload_idp_metadata(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances .v2_api_organizations @@ -16006,7 +16001,7 @@ fn test_v2_upload_id_p_metadata(world: &mut DatadogWorld, _parameters: &HashMap< .and_then(|param| Some(param.as_str().unwrap().as_bytes().to_vec())); let mut params = datadogV2::api::api_organizations::UploadIdPMetadataOptionalParams::default(); params.idp_file = idp_file; - let response = match block_on(api.upload_id_p_metadata_with_http_info(params)) { + let response = match block_on(api.upload_idp_metadata_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error {